/* ============================================
   EIRA SITEWELL - Modern Login Page CSS
   Responzivní design pro přihlašovací stránku
   ============================================ */

/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f0f1e 0%, #2a2b45 40%, #3D3E5C 70%, #4a4b68 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

/* Hlavní kontejner */
#stw-login-main,
#stw-pass-recovery-main {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Header s logem */
#stw-header {
    text-align: center;
    margin-bottom: 25px;
    animation: fadeInDown 0.6s ease-out;
}

#stw-header-eira {
    background-image: url('https://www.eira.com/images/eira_cb_negativ_transparent.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    height: 60px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    opacity: 0.6;
}

/* Login box */
#stw-login,
#stw-pass-recovery {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: fadeInUp 0.6s ease-out;
}

/* Formulář */
#loginForm,
#stw-pass-recovery form {
    width: 100%;
}

#stw-login-formDiv,
#stw-resetPassword-formDiv {
    width: 100%;
    border-collapse: collapse;
}

#stw-login-formDiv tr,
#stw-resetPassword-formDiv tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

#stw-login-formDiv tr td,
#stw-resetPassword-formDiv tr td {
    width: 100%;
    padding: 0;
}

/* Label styly */
.stw-login-label {
    font-size: 14px;
    font-weight: 600;
    color: #3D3E5C;
    margin-bottom: 8px;
    display: block;
}

/* Nahrazení textu "Agenda" za nadpis zákazníka */
#stw-login-formDiv tr:first-child {
    margin-bottom: 30px;
}

#stw-login-formDiv tr:first-child .stw-login-label {
    font-size: 0;
    text-align: center;
    margin-bottom: 20px;
}

#stw-login-formDiv tr:first-child .stw-login-label::before {
    font-size: 28px;
    font-weight: 700;
    color: #3D3E5C;
    display: block;
    text-align: center;
    letter-spacing: 0.5px;
}

.stw-login-agenda {
    display: none; /* Skryté pole agendaIdent */
    font-size: 16px;
    font-weight: 700;
    color: #3D3E5C;
    padding: 12px;
    background: #F5F5FA;
    border-radius: 8px;
    border-left: 4px solid #3D3E5C;
}

/* Input pole */
.stw-login-field {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.stw-login-field:focus {
    outline: none;
    border-color: #3D3E5C;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(61, 62, 92, 0.1);
}

.stw-login-field:hover {
    border-color: #3D3E5C;
}

/* Submit tlačítko */
input[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3D3E5C 0%, #4D4E6C 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(61, 62, 92, 0.3);
}

input[type="submit"]:hover {
    background: linear-gradient(135deg, #4D4E6C 0%, #5D5E7C 100%);
    box-shadow: 0 6px 20px rgba(61, 62, 92, 0.4);
    transform: translateY(-2px);
}

input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(61, 62, 92, 0.3);
}

/* OAuth login link */
#stw-oauth-login {
    display: none; /* Skrytý OAuth odkaz */
    margin: 20px 0;
    padding: 12px 24px;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #3D3E5C !important;
    text-decoration: none;
    border: 2px solid #3D3E5C;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#stw-oauth-login:hover {
    background: #3D3E5C;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 62, 92, 0.3);
}

/* Reset hesla */
.stw-login-resetPassword {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.stw-login-resetPassword a {
    color: #3D3E5C;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.stw-login-resetPassword a:hover {
    color: #4D4E6C;
    text-decoration: underline;
}

/* Pozdrav */
#stw-niceDay {
    display: none; /* Skrytý text */
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Sitewell logo */
#stw-link-home {
    display: none; /* Skrytý odkaz a logo */
    text-align: center;
    margin: 20px 0;
}

#stw-link-home img {
    max-width: 150px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#stw-link-home a:hover img {
    opacity: 1;
}

/* Kontakt helpdesk */
#stw-contact {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #F5F5FA;
    border-radius: 8px;
    border-left: 4px solid #3D3E5C;
}

#stw-contact .name {
    font-weight: 600;
    color: #3D3E5C;
    display: inline-block;
    margin-right: 8px;
}

#stw-contact .value a {
    color: #3D3E5C;
    text-decoration: none;
    font-weight: 500;
}

#stw-contact .value a:hover {
    text-decoration: underline;
    color: #4D4E6C;
}

/* Verze */
#stw-version {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #999;
    text-decoration: none;
}

#stw-version:hover {
    color: #3D3E5C;
}

/* Password Recovery Page Specific Styles */
#stw-pass-recovery h1 {
    font-size: 28px;
    font-weight: 700;
    color: #3D3E5C;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.pass-recovery-text {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.stw-back-to-main {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.stw-back-to-main a {
    color: #3D3E5C;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.stw-back-to-main a:hover {
    color: #4D4E6C;
    text-decoration: underline;
}

#stw-quote {
    display: none;
}

/* Password Recovery Form Specific */
#stw-resetPassword-formDiv input[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3D3E5C 0%, #4D4E6C 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(61, 62, 92, 0.3);
    margin-top: 10px;
}

#stw-resetPassword-formDiv input[type="submit"]:hover {
    background: linear-gradient(135deg, #4D4E6C 0%, #5D5E7C 100%);
    box-shadow: 0 6px 20px rgba(61, 62, 92, 0.4);
    transform: translateY(-2px);
}

#stw-resetPassword-formDiv input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(61, 62, 92, 0.3);
}

/* Error messages */
.stw-login-error,
.stw-error-text {
    background: #fff3f3;
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #cc0000;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.errorMessage {
    background: #fff3f3;
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #cc0000;
    font-size: 14px;
    line-height: 1.5;
}

#chromeMessage {
    background: #fffbf0;
    border-color: #ffaa00;
    color: #996600;
}

/* Animace */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONZIVNÍ DESIGN
   ============================================ */

/* Tablety (landscape) */
@media (max-device-width: 768px) {
    #stw-login {
        padding: 30px 25px;
    }

    #stw-header-eira {
        height: 50px;
        max-width: 180px;
    }

    .stw-login-field {
        font-size: 16px; /* Zabraňuje zoom na iOS */
    }
}

/* Mobilní telefony */
@media (max-device-width: 899px) {
    body {
        padding: 0;
        background: linear-gradient(180deg, #0f0f1e 0%, #2a2b45 50%, #3D3E5C 100%);
    }

    #stw-login-main,
    #stw-pass-recovery-main {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0 25px;
    }

    #stw-header {
        background: transparent;
        padding: 25px 0 20px 0;
        margin-bottom: 0;
    }

    #stw-header-eira {
        height: 60px;
        max-width: 220px;
        opacity: 0.85;
    }

    #stw-login,
    #stw-pass-recovery {
        flex: 1;
        width: 100%;
        max-width: 100%;
        background: #ffffff;
        border-radius: 32px;
        padding: 50px 35px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        margin: 0 0 25px 0;
    }

    #loginForm,
    #stw-pass-recovery form {
        width: 100%;
        max-width: 100%;
    }

    #stw-login-formDiv,
    #stw-resetPassword-formDiv {
        width: 100%;
    }

    /* Password Recovery Page Mobile */
    #stw-pass-recovery h1 {
        font-size: 48px;
        margin-bottom: 30px;
        font-weight: 800;
    }

    .pass-recovery-text {
        font-size: 24px;
        line-height: 1.6;
        margin-bottom: 40px;
        padding: 0;
    }

    .stw-back-to-main {
        margin-top: 30px;
        padding-top: 25px;
    }

    .stw-back-to-main a {
        font-size: 24px;
        font-weight: 600;
    }

    #stw-resetPassword-formDiv input[type="submit"] {
        padding: 30px 40px;
        font-size: 32px;
        font-weight: 700;
        border-radius: 16px;
        margin-top: 18px;
    }

    /* Nadpis zákazníka pro mobil */
    #stw-login-formDiv tr:first-child {
        margin-bottom: 50px;
    }

    #stw-login-formDiv tr:first-child .stw-login-label::before {
        font-size: 56px;
        letter-spacing: 1.5px;
        margin-bottom: 18px;
        font-weight: 800;
    }

    #stw-login-formDiv tr,
    #stw-resetPassword-formDiv tr {
        margin-bottom: 40px;
    }

    .stw-login-label {
        font-size: 28px;
        margin-bottom: 16px;
        font-weight: 700;
    }

    .stw-login-field {
        width: 100%;
        padding: 28px 30px;
        font-size: 30px;
        border-width: 3px;
        border-radius: 16px;
    }

    .stw-login-field:focus {
        border-width: 4px;
    }

    input[type="submit"] {
        width: 100%;
        padding: 30px 40px;
        font-size: 32px;
        font-weight: 700;
        border-radius: 16px;
        margin-top: 18px;
    }

    .stw-login-resetPassword {
        padding-top: 32px;
        margin-top: 20px;
    }

    .stw-login-resetPassword a {
        font-size: 28px;
        font-weight: 600;
    }

    #stw-contact {
        padding: 28px;
        font-size: 26px;
        margin: 40px 0;
        border-radius: 16px;
    }

    #stw-contact .name {
        font-size: 26px;
        display: block;
        margin-bottom: 14px;
    }

    #stw-contact .value a {
        font-size: 26px;
        font-weight: 600;
    }

    .stw-login-error,
    .stw-error-text,
    .errorMessage {
        font-size: 26px;
        padding: 28px;
        margin: 40px 0;
        border-width: 3px;
        border-radius: 16px;
    }

    #stw-version {
        font-size: 22px;
        margin-top: 32px;
    }
}

/* Malé mobilní telefony */
@media (max-device-width: 360px) {
    #stw-login {
        padding: 30px 20px;
    }

    #stw-header-eira {
        height: 70px;
        max-width: 240px;
    }

    /* Nadpis zákazníka pro malé mobily */
    #stw-login-formDiv tr:first-child .stw-login-label::before {
        font-size: 32px;
    }

    .stw-login-label {
        font-size: 17px;
    }

    .stw-login-field {
        padding: 15px 16px;
        font-size: 19px;
    }

    input[type="submit"] {
        padding: 17px 26px;
        font-size: 19px;
    }

    .stw-login-resetPassword a {
        font-size: 17px;
    }

    #stw-contact {
        font-size: 16px;
        padding: 16px;
    }

    #stw-contact .name,
    #stw-contact .value a {
        font-size: 16px;
    }
}

/* Desktop - velké obrazovky */
@media (min-width: 1200px) {
    #stw-login-main {
        max-width: 520px;
    }

    #stw-login {
        padding: 50px;
    }

    #stw-header-eira {
        height: 70px;
        max-width: 220px;
    }
}

/* Dark mode support (volitelné) */
@media (prefers-color-scheme: dark) {
    /* Můžete přidat dark mode styly, pokud je požadujete */
}

/* Print styles */
@media print {
    body {
        background: white;
    }

    #stw-login {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Accessibility - focus styles pro klávesnicovou navigaci */
a:focus,
input:focus,
button:focus {
    outline: 3px solid #3D3E5C;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stw-login-field {
        border-width: 3px;
    }

    input[type="submit"] {
        border: 3px solid #3D3E5C;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}