/* Shared styles for the login and register modals.
   Both modals use the .login-modal__* class namespace. */

.login-modal .modal-dialog {
    max-width: 420px;
}
.login-modal.fade .modal-dialog {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
    transform: translateY(16px) scale(0.96);
    opacity: 0;
}
.login-modal.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
    .login-modal.fade .modal-dialog,
    .login-modal.show .modal-dialog {
        transition: opacity 0.15s linear;
        transform: none;
    }
}
.login-modal__content {
    border: none;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}
.login-modal__top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 14px 16px 0 16px;
}
.login-modal__icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.login-modal__icon-btn:hover {
    background: #f3f4f6;
    color: #111827;
}
.login-modal__body {
    padding: 4px 32px 28px 32px;
    text-align: center;
}
.login-modal__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}
.login-modal__logo img {
    width: 92px;
    height: auto;
}
.login-modal__title {
    font-size: 1.65rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
}
.login-modal__subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 18px 0;
    line-height: 1.45;
}
.login-modal__tabs {
    display: flex;
    gap: 6px;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 22px;
}
.login-modal__tab {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 16px;
    color: #6b7280;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.login-modal__tab.is-active {
    background: #fff;
    color: #173354;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.login-modal__tab i {
    font-size: 0.95rem;
}
.login-modal__form {
    text-align: left;
}
.login-modal__label {
    display: block;
    font-size: 0.9rem;
    color: #173354;
    font-weight: 500;
    margin-bottom: 6px;
}
.login-modal__input-wrap {
    position: relative;
    margin-bottom: 14px;
}
.login-modal__input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.95rem;
}
.login-modal__input {
    width: 100%;
    padding: 11px 12px 11px 36px;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.9rem;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-modal__input::placeholder { color: #9ca3af; }
.login-modal__input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
.login-modal__input--password { padding-right: 42px; }
.login-modal__pwd-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}
.login-modal__pwd-toggle:hover { color: #374151; background: #f3f4f6; }
.login-modal__pwd-toggle:focus-visible {
    outline: none;
    color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
.login-modal__btn {
    width: 100%;
    border-radius: 9999px;
    padding: 11px 14px;
    font-size: 16px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
}
.login-modal__btn--primary {
    background: #173354;
    color: #fff;
    margin-bottom: 10px;
}
.login-modal__btn--primary:hover { background: #1a2a40; color: #fff; }
.login-modal__btn--ghost {
    background: #fff;
    color: #111827;
    border-color: #e5e7eb;
}
.login-modal__btn--ghost:hover { background: #f9fafb; color: #111827; }
.login-modal__btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.login-modal__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 18px 0;
}
.login-modal__divider::before,
.login-modal__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}
.login-modal__sso {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.login-modal__sso-btn {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.login-modal__sso-btn:hover { background: #f9fafb; }
.login-modal__sso-btn i { font-size: 1.05rem; }
.login-modal__terms {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
    text-align: center;
    line-height: 1.4;
}

/* Inline error banner shared by both modals. */
.login-modal__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.825rem;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

/* Inline success banner (e.g. "check your email"). */
.login-modal__success {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}
.login-modal__success i { font-size: 1.1rem; line-height: 1.3; }
.login-modal__success strong { display: block; font-size: 0.875rem; margin-bottom: 2px; }
.login-modal__success p { margin: 0; font-size: 0.8rem; line-height: 1.4; color: #047857; }

/* Register-only: agreement checkbox row and captcha widget. */
.login-modal__agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    color: #6b7280;
    margin: 4px 0 14px 0;
    text-align: left;
    line-height: 1.45;
    cursor: pointer;
}
.login-modal__agree input[type="checkbox"] {
    margin: 2px 0 0 0;
    flex-shrink: 0;
    accent-color: #0f1c2e;
}
.login-modal__agree a {
    color: #0f1c2e;
    text-decoration: underline;
}
.login-modal__captcha {
    margin-bottom: 14px;
}
.login-modal__captcha img.captcha {
    display: block;
    margin: 0 auto 8px auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}
.login-modal__captcha input[type="text"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-size: 0.9rem;
    color: #111827;
    background: #fff;
    outline: none;
}
.login-modal__captcha input[type="text"]:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}
