/* ---------------------------------------------------------------------
   Dual OTP verification modal styles - shared across Resources, Contact Us,
   Grievance, Careers, and Withdraw Consent.
   Optimized for compact, responsive, two-card verification.
   --------------------------------------------------------------------- */

#otpModal {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 1060 !important;
    display: none;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    outline: 0 !important;
    pointer-events: auto !important;
    text-align: center !important;
    padding: 0 !important;
}

#otpModal:before {
    content: '' !important;
    display: inline-block !important;
    height: 100% !important;
    vertical-align: middle !important;
    margin-right: -4px !important;
}

#otpModal.in {
    display: block !important;
}

#otpModalBackdrop,
.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 1040 !important;
    background-color: #000000 !important;
    opacity: 0.55 !important;
    filter: alpha(opacity=55) !important;
}

#otpModal .modal-dialog {
    position: relative !important;
    z-index: 1070 !important;
    display: inline-block !important;
    text-align: left !important;
    vertical-align: middle !important;
    width: 95% !important;
    max-width: 480px !important;
    margin: 20px auto !important;
    pointer-events: auto !important;
}

#otpModal .modal-content {
    position: relative !important;
    z-index: 1071 !important;
    border-radius: 8px;
    border: none;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    background-color: #ffffff !important;
    pointer-events: auto !important;
}

#otpModal .modal-header {
    padding: 14px 18px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

#otpModal .modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.5px;
    margin: 0;
    text-transform: uppercase;
}

#otpModal .close {
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    color: #6b7280;
    opacity: 0.8;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

#otpModal .close:hover {
    color: #111827;
    opacity: 1;
}

#otpModal .modal-body {
    padding: 14px 16px;
    background-color: #f8fafc;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Verification Cards */
.otp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.otp-card:last-child {
    margin-bottom: 0;
}

.otp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.otp-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Status Badges */
.otp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1;
}

.otp-badge .badge-dot {
    font-size: 10px;
    line-height: 1;
}

.otp-badge.badge-not-verified {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.otp-badge.badge-verified {
    background-color: #ecfdf5;
    color: #16a34a;
    border: 1px solid #a7f3d0;
}

/* Target details (masked phone / email) */
.otp-target-row {
    display: flex;
    align-items: center;
    font-size: 12px;
    margin-bottom: 6px;
    color: #475569;
}

.otp-target-label {
    font-weight: 600;
    color: #64748b;
    margin-right: 6px;
}

.otp-target-value {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: 0.5px;
}

/* Intro Text */
.otp-intro-text {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

/* Input + Button Row */
.otp-input-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 6px;
}

.otp-input-group .otp-input {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 6px 10px;
    font-size: 15px;
    letter-spacing: 3px;
    font-weight: 600;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background-color: #fff !important;
    color: #1e293b !important;
    box-shadow: none;
    pointer-events: auto !important;
    cursor: text;
}

.otp-input-group .otp-input:focus {
    border-color: #249d66;
    outline: none;
    box-shadow: 0 0 0 2px rgba(36, 157, 102, 0.15);
}

.otp-input-group .btn-verify {
    flex-shrink: 0;
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    background-color: #249d66;
    color: #ffffff !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    transition: background-color 0.15s ease-in-out;
    pointer-events: auto !important;
}

.otp-input-group .btn-verify:hover:not(:disabled) {
    background-color: #1e8254;
}

.otp-input-group .btn-verify:disabled {
    background-color: #94a3b8;
    color: #f1f5f9 !important;
    cursor: not-allowed;
    opacity: 0.85;
}

/* Status Message */
.otp-status-msg {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    min-height: 16px;
    max-height: 60px;
    overflow-y: auto;
    word-wrap: break-word;
    margin-bottom: 4px;
}

.otp-status-msg.is-error {
    color: #dc2626;
}

.otp-status-msg.is-success {
    color: #16a34a;
}

/* Card Footer & Resend */
.otp-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    padding-top: 6px;
    margin-top: 4px;
    border-top: 1px dashed #e2e8f0;
}

.otp-resend-prompt {
    font-size: 12px;
    color: #64748b;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: #249d66;
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 2px 0;
    pointer-events: auto !important;
}

.otp-resend-btn:disabled {
    color: #94a3b8;
    text-decoration: none;
    cursor: not-allowed;
}

.otp-resend-btn:focus-visible,
.otp-input-group button:focus-visible,
#otpModal .close:focus-visible {
    outline: 2px solid #249d66;
    outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-height: 680px) {
    #otpModal .modal-dialog {
        margin: 15px auto;
    }
    .otp-card {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    #otpModal .modal-dialog {
        margin: 15px 12px;
        max-width: calc(100% - 24px);
    }
    .otp-input-group .btn-verify {
        padding: 0 10px;
        font-size: 12px;
    }
    .otp-input-group .otp-input {
        font-size: 14px;
        letter-spacing: 2px;
    }
}
