/**
 * OTP Verification Style Sheet
 * Ajaykumarthakur.in / Deytal Technologies Pvt. Ltd.
 */

/* OTP Backdrop and Glassmorphism container */
.otp-verify-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 27, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.otp-verify-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Card */
.otp-verify-card {
    background: linear-gradient(145deg, #1b2429 0%, #151c20 100%);
    border: 1px solid rgba(197, 168, 128, 0.25);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(197, 168, 128, 0.1);
    width: 90%;
    max-width: 460px;
    padding: 40px 30px;
    position: relative;
    text-align: center;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    color: #ffffff;
}

.otp-verify-backdrop.active .otp-verify-card {
    transform: scale(1) translateY(0);
}

/* Close Button */
.otp-verify-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.otp-verify-close:hover {
    color: #c5a880;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Header & Icon */
.otp-verify-icon {
    width: 64px;
    height: 64px;
    background: rgba(197, 168, 128, 0.1);
    border: 1.5px solid #c5a880;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: #c5a880;
    font-size: 26px;
    box-shadow: 0 0 15px rgba(197, 168, 128, 0.15);
}

.otp-verify-card h3 {
    font-family: 'Marcellus', serif;
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.otp-verify-card p {
    font-size: 14px;
    color: #a4b3b8;
    line-height: 1.5;
    margin-bottom: 30px;
}

.otp-verify-email-highlight {
    color: #c5a880;
    font-weight: 600;
}

/* 6-Digit input container */
.otp-inputs-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 25px;
}

.otp-digit-input {
    width: 50px;
    height: 55px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(86, 115, 172, 0.25);
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.otp-digit-input:focus {
    border-color: #c5a880;
    background-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 10px rgba(197, 168, 128, 0.25);
}

.otp-digit-input.filled {
    border-color: rgba(197, 168, 128, 0.6);
}

/* Button & Action Link */
.otp-btn-verify {
    background: linear-gradient(135deg, #c5a880 0%, #9f8053 100%);
    border: none;
    border-radius: 8px;
    color: #1b2429;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 28px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.25);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.otp-btn-verify:hover {
    background: linear-gradient(135deg, #d3b994 0%, #ae8e5e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 168, 128, 0.35);
}

.otp-btn-verify:active {
    transform: translateY(0);
}

.otp-btn-verify:disabled {
    background: #3b4443;
    color: #8c9ea6;
    box-shadow: none;
    cursor: not-allowed;
}

/* Status/Feedback Messages */
.otp-status-msg {
    min-height: 20px;
    font-size: 13px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

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

.otp-status-msg.success {
    color: #51cf66;
}

.otp-status-msg.info {
    color: #4dabf7;
}

/* Timer and Resend option */
.otp-resend-container {
    font-size: 14px;
    color: #8c9ea6;
}

.otp-btn-resend {
    color: #c5a880;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.otp-btn-resend:hover {
    color: #d3b994;
    text-decoration: underline;
}

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

/* Shaking animation on input error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-8px); }
    30%, 60%, 90% { transform: translateX(8px); }
}

.otp-shake {
    animation: shake 0.5s ease-in-out;
    border-color: #ff6b6b !important;
}

/* Spinner Loader */
.otp-spinner {
    border: 3px solid rgba(27, 36, 41, 0.3);
    border-radius: 50%;
    border-top: 3px solid #1b2429;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Branded Success Animation - SVG Checkmark */
.otp-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #51cf66;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #51cf66;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s cubic-bezier(0.175, 0.885, 0.32, 1.27) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}
@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}
@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px #51cf66; }
}

@media (max-width: 480px) {
    .otp-verify-card {
        padding: 30px 20px;
    }
    .otp-inputs-wrapper {
        gap: 6px;
    }
    .otp-digit-input {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
}
