/* Auth Modal Styling - Scoped to modal wrapper */
/* Targeting with ID to override map.css specificity */
#authModal .auth-modal-wrapper {
    background: #f3f5f8;
    border-radius: 20px;
    padding: 26px;
    /* Center the modal - Force override map.css */
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: 90% !important;
    max-width: 500px !important;
    /* Reset potential conflicting properties */
    bottom: auto !important;
    right: auto !important;
    height: auto !important;
    max-height: 90vh !important;
}

.auth-modal-wrapper .auth-card-modern {
    background: #ffffff;
    border: 1px solid #eef1f6;
    border-radius: 24px;
    padding: 32px 34px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.auth-modal-wrapper .auth-logo-section {
    text-align: center;
    margin-bottom: 22px;
}

.auth-modal-wrapper .auth-page-title {
    font-size: 26px;
    color: #0b4aa1;
    margin: 0 0 8px 0;
    font-family: "Inter", "Noto Sans Devanagari", sans-serif;
}

.auth-modal-wrapper .auth-page-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

.auth-modal-wrapper .auth-method-selector {
    background: #f4f6f9;
    border: 1px solid #e5e9f0;
    border-radius: 16px;
    padding: 6px;
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.auth-modal-wrapper .method-btn {
    flex: 1;
    background: transparent;
    color: #7a8190;
    font-weight: 600;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    padding: 10px 12px;
    border: none;
    cursor: pointer;
}

.auth-modal-wrapper .method-btn.active {
    background: #ffffff;
    color: #0b4aa1;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.auth-modal-wrapper .method-btn:hover {
    color: #0b4aa1;
    background: rgba(11, 74, 161, 0.06);
}

.auth-modal-wrapper .auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-modal-wrapper .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-modal-wrapper .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-modal-wrapper .form-group label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8b95a5;
    font-weight: 600;
}

.auth-modal-wrapper .form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-modal-wrapper .forgot-link {
    font-size: 13px;
    color: #0b4aa1;
    text-decoration: none;
    font-weight: 600;
}

.auth-modal-wrapper .input-with-icon {
    position: relative;
}

.auth-modal-wrapper .input-with-icon input,
.auth-modal-wrapper .input-with-icon select {
    width: 100%;
    padding: 0 16px 0 44px;
    border: 1px solid #e1e6ee;
    border-radius: 14px;
    background: #ffffff;
    font-size: 15px;
    height: 48px;
    color: #111827;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-modal-wrapper .input-with-icon input:focus,
.auth-modal-wrapper .input-with-icon select:focus {
    border-color: #0b4aa1;
    box-shadow: 0 0 0 4px rgba(11, 74, 161, 0.12);
    outline: none;
}

.auth-modal-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #98a2b3;
    pointer-events: none;
}

.auth-modal-wrapper .input-with-toggle input {
    padding-right: 42px;
}

.auth-modal-wrapper .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #98a2b3;
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
}

.auth-modal-wrapper .password-toggle:hover {
    color: #0b4aa1;
}

.auth-modal-wrapper .input-otp-row input {
    padding-right: 120px;
}

.auth-modal-wrapper .otp-inline-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #0b4aa1;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(11, 74, 161, 0.2);
}

.auth-modal-wrapper .otp-inline-btn:hover {
    background: #083a80;
}

.auth-modal-wrapper .otp-verify-btn {
    background: #16a34a;
    box-shadow: 0 6px 12px rgba(22, 163, 74, 0.2);
}

.auth-modal-wrapper .otp-verify-btn:hover {
    background: #15803d;
}

.auth-modal-wrapper .pin-input {
    text-align: center;
    letter-spacing: 6px;
    font-weight: 600;
}

.auth-modal-wrapper .auth-submit-btn {
    width: 100%;
    padding: 12px 18px;
    background: #0b4aa1;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(11, 74, 161, 0.25);
}

.auth-modal-wrapper .auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.auth-modal-wrapper .auth-resend-btn {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid #d6dbe5;
    border-radius: 14px;
    background: #f9fafb;
    color: #0b4aa1;
    font-weight: 600;
    cursor: pointer;
}

.auth-modal-wrapper .auth-bottom-link {
    margin-top: 18px;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
}

.auth-modal-wrapper .auth-bottom-link a,
.auth-modal-wrapper .link-arrow {
    color: #0b4aa1;
    font-weight: 700;
    text-decoration: none;
}

.auth-modal-wrapper .auth-status {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    text-align: left;
}

.auth-modal-wrapper .auth-footer-text {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eef1f6;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #98a2b3;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 640px) {
    .auth-modal-wrapper {
        padding: 18px;
    }

    .auth-modal-wrapper .auth-card-modern {
        padding: 26px 22px;
    }

    .auth-modal-wrapper .form-row {
        grid-template-columns: 1fr;
    }

    .auth-modal-wrapper .input-otp-row input {
        padding-right: 16px;
    }

    .auth-modal-wrapper .otp-inline-btn {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 8px;
    }
}