/**
 * Digitrix Order Confirm OTP - Frontend Modal Stylesheet
 * Powered by Digitrix Labs
 */

.doco-modal-backdrop {
    --doco-accent: #10b981;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: "Hind Siliguri", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}

.doco-modal-backdrop.doco-open {
    display: flex;
    animation: docoFadeIn 0.22s ease-out;
}

@keyframes docoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes docoSlideUp {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.doco-modal-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 22px;
    padding: 30px 26px 26px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
    text-align: center;
    box-sizing: border-box;
    animation: docoSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.doco-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.doco-modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.doco-modal-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.doco-modal-icon-ring {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--doco-accent, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.06);
}

.doco-modal-title {
    margin: 0 0 8px 0 !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
}

.doco-modal-subtitle {
    margin: 0 0 14px 0 !important;
    font-size: 14px !important;
    color: #475569 !important;
    line-height: 1.5 !important;
}

.doco-phone-badge-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 18px;
}

.doco-phone-badge {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.4px;
}

.doco-change-phone-btn {
    background: none;
    border: none;
    color: var(--doco-accent, #10b981);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.doco-sandbox-hint {
    background: #fef3c7;
    border: 1px dashed #f59e0b;
    color: #92400e;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.doco-alert-box {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.45;
}

.doco-alert-box.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.doco-alert-box.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.doco-alert-box.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.doco-otp-inputs-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 4px 0 20px;
    direction: ltr;
}

.doco-otp-digit {
    width: 54px !important;
    height: 58px !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 14px !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    background: #f8fafc !important;
    padding: 0 !important;
    transition: all 0.16s ease !important;
    box-shadow: none !important;
}

.doco-otp-inputs-wrap[data-length="6"] .doco-otp-digit {
    width: 44px !important;
    height: 52px !important;
    font-size: 20px !important;
}

.doco-otp-digit:focus {
    border-color: var(--doco-accent, #10b981) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16) !important;
    outline: none !important;
    transform: translateY(-1px);
}

.doco-paste-btn {
    background: #f8fafc;
    border: 1.5px dashed rgba(16, 185, 129, 0.5);
    color: var(--doco-accent, #10b981);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin: -6px auto 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 20px;
    transition: all 0.18s ease;
    font-family: inherit;
}

.doco-paste-btn:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--doco-accent, #10b981);
    transform: translateY(-1px);
}

.doco-verify-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    background: var(--doco-accent, #10b981);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    padding: 15px 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
}

.doco-verify-btn:hover:not(:disabled) {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.doco-verify-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.doco-btn-loader {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: docoSpin 0.7s linear infinite;
}

@keyframes docoSpin {
    to { transform: rotate(360deg); }
}

.doco-resend-footer {
    margin-top: 18px;
    font-size: 13.5px;
    color: #64748b;
}

.doco-timer-text strong {
    color: #0f172a;
    font-weight: 800;
}

.doco-resend-btn {
    background: none;
    border: none;
    color: var(--doco-accent, #10b981);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
}

.doco-resend-btn:hover {
    text-decoration: underline;
}

@media (max-width: 420px) {
    .doco-modal-card {
        padding: 24px 18px 20px;
    }
    .doco-otp-digit {
        width: 48px !important;
        height: 54px !important;
        font-size: 21px !important;
    }
    .doco-otp-inputs-wrap[data-length="6"] .doco-otp-digit {
        width: 38px !important;
        height: 46px !important;
        font-size: 18px !important;
    }
}
