/* =========================================
   ESChE Member Authentication
   Login and Registration Interface
========================================= */

.esche-auth-container {
    width: 100%;
    max-width: 760px;
    margin: 40px auto;
    padding: 36px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 45, 80, 0.08);
    box-sizing: border-box;
    color: #263548;
    font-family: inherit;
}

.esche-auth-container *,
.esche-auth-container *::before,
.esche-auth-container *::after {
    box-sizing: border-box;
}

.esche-auth-container h2 {
    margin: 0 0 12px;
    color: #123b70;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.35;
}

.esche-auth-container p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

/* Tabs */

.esche-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 30px;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 10px;
}

.esche-auth-tab {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.esche-auth-tab:hover {
    background: #e2e8f0;
    color: #123b70;
}

.esche-auth-tab.is-active {
    background: #1560bd;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(21, 96, 189, 0.18);
}

.esche-auth-tab:focus-visible,
.esche-auth-container button:focus-visible,
.esche-auth-container a:focus-visible {
    outline: 3px solid #90c2ff;
    outline-offset: 3px;
}

/* Panels */

.esche-auth-panel {
    display: none;
    width: 100%;
}

.esche-auth-panel.is-active {
    display: block;
}

.esche-auth-panel[hidden] {
    display: none !important;
}

.esche-auth-panel > h2 {
    margin-top: 0;
}

.esche-auth-panel > p {
    margin: 0 0 24px;
}

/* Form fields */

.esche-auth-field {
    margin-bottom: 22px;
}

.esche-auth-field > label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.esche-auth-field input[type="text"],
.esche-auth-field input[type="email"],
.esche-auth-field input[type="password"],
.esche-auth-field input[type="tel"],
.esche-auth-field input[type="number"],
.esche-auth-field select,
.esche-auth-field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.esche-auth-field input:focus,
.esche-auth-field select:focus,
.esche-auth-field textarea:focus {
    border-color: #1560bd;
    outline: none;
    box-shadow: 0 0 0 3px rgba(21, 96, 189, 0.12);
}

.esche-auth-field input::placeholder,
.esche-auth-field textarea::placeholder {
    color: #94a3b8;
}

/* Remember me */

.esche-auth-field.esche-auth-remember {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.esche-auth-remember label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #475569;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
}

.esche-auth-remember input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #1560bd;
}

/* Buttons */

.esche-auth-container .esche-auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 49px;
    padding: 13px 20px;
    border: 0;
    border-radius: 8px;
    background: #1560bd;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.esche-auth-container .esche-auth-button:hover {
    background: #104b96;
    color: #ffffff;
}

.esche-auth-container .esche-auth-button:active {
    transform: translateY(1px);
}

/* Password recovery */

.esche-auth-forgot-password {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14px;
}

.esche-auth-container a {
    color: #1560bd;
    text-decoration: none;
}

.esche-auth-container a:hover {
    color: #104b96;
    text-decoration: underline;
}

/* Notices */

.esche-auth-notice {
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.esche-auth-notice.esche-auth-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.esche-auth-logged-in {
    text-align: center;
}

.esche-auth-logged-in > p {
    margin-bottom: 24px;
}

.esche-auth-logged-in .esche-auth-button {
    margin-bottom: 16px;
}

.esche-auth-logout-form {
    margin-top: 12px;
}

.esche-auth-container .esche-auth-logout-button {
    padding: 10px 20px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.esche-auth-container .esche-auth-logout-button:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

/* Registration form compatibility */

.esche-auth-panel [class*="registration"],
.esche-auth-panel [class*="registration"] * {
    max-width: 100%;
}

.esche-auth-panel input,
.esche-auth-panel select,
.esche-auth-panel textarea,
.esche-auth-panel button {
    max-width: 100%;
}

.esche-auth-panel img {
    height: auto;
    max-width: 100%;
}

/* Tablet and mobile */

@media (max-width: 640px) {
    .esche-auth-container {
        margin: 20px auto;
        padding: 22px 18px;
        border-radius: 12px;
    }

    .esche-auth-container h2 {
        font-size: 23px;
    }

    .esche-auth-tabs {
        gap: 5px;
        margin-bottom: 24px;
        padding: 5px;
    }

    .esche-auth-tab {
        padding: 12px 8px;
        font-size: 14px;
    }

    .esche-auth-field {
        margin-bottom: 18px;
    }

    .esche-auth-field input[type="text"],
    .esche-auth-field input[type="email"],
    .esche-auth-field input[type="password"],
    .esche-auth-field input[type="tel"],
    .esche-auth-field input[type="number"],
    .esche-auth-field select,
    .esche-auth-field textarea {
        font-size: 16px;
    }
}

/* Login and Register buttons */

.esche-auth-bottom-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.esche-auth-bottom-buttons .esche-auth-button {
    margin: 0;
}

.esche-auth-register-trigger {
    background: #ffffff !important;
    color: #1560bd !important;
    border: 1px solid #1560bd !important;
}

.esche-auth-register-trigger:hover {
    background: #eff6ff !important;
}

.esche-auth-back-to-login {
    margin-top: 20px;
}

@media (max-width: 420px) {
    .esche-auth-bottom-buttons {
        gap: 10px;
    }

    .esche-auth-bottom-buttons .esche-auth-button {
        padding: 12px 8px;
        font-size: 14px;
    }
}

/* =========================================
   ESChE WordPress Password Reset Page
   ========================================= */

/* Main WordPress login/reset container */
body.login {
    background: #f3f7fc;
    font-family: Arial, Helvetica, sans-serif;
}

/* WordPress logo area */
body.login #login {
    width: 360px;
    max-width: calc(100% - 40px);
    padding: 6% 0 0;
}

/* Reset page heading */
body.login #login h1 a {
    width: 100%;
    height: auto;
    min-height: 45px;
    background-image: none;
    text-indent: 0;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.4;
    color: #1560bd;
    text-decoration: none;
}

/* Main form box */
body.login #loginform,
body.login #lostpasswordform,
body.login #resetpassform,
body.login .message,
body.login #login_error {
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(21, 96, 189, 0.08);
}

/* Form spacing */
body.login #lostpasswordform,
body.login #resetpassform {
    padding: 26px 24px;
}

/* Instructions */
body.login #login p.message,
body.login #login .message {
    padding: 14px 16px;
    border-left: 4px solid #1e90ff;
    color: #344054;
    line-height: 1.7;
}

/* Field labels */
body.login label {
    color: #26364a;
    font-weight: 600;
}

/* Text and password fields */
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    box-shadow: none;
    box-sizing: border-box;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.14);
    outline: none;
}

/* Primary reset button */
body.login .button-primary {
    min-height: 42px;
    padding: 8px 20px;
    background: #1560bd;
    border-color: #1560bd;
    border-radius: 7px;
    box-shadow: none;
    text-shadow: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

body.login .button-primary:hover,
body.login .button-primary:focus {
    background: #104b96;
    border-color: #104b96;
}

/* Links */
body.login #nav a,
body.login #backtoblog a,
body.login a {
    color: #1560bd;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
    color: #104b96;
}

/* Error messages */
body.login #login_error {
    padding: 12px 16px;
    border-left: 4px solid #dc2626;
    color: #991b1b;
}

/* Mobile layout */
@media screen and (max-width: 480px) {
    body.login #login {
        width: auto;
        max-width: none;
        margin: 0 16px;
        padding-top: 35px;
    }

    body.login #lostpasswordform,
    body.login #resetpassform {
        padding: 22px 18px;
    }
}