/**
 * WC OTP Login Popup
 */

.wc-otp-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-otp-popup.is-open {
    display: flex;
}

.wc-otp-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

.wc-otp-popup-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    animation: wcOtpPopupIn 0.2s ease-out;
}

@keyframes wcOtpPopupIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wc-otp-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;

    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 50%;

    background: #f3f4f6;
    color: #333;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.wc-otp-popup-close:hover {
    background: #e5e7eb;
}

.wc-otp-header {
    text-align: center;
    margin-bottom: 25px;
}

.wc-otp-header h2 {
    margin: 0 0 8px;
    font-size: 25px;
    line-height: 1.3;
    color: #111827;
}

.wc-otp-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.wc-otp-step label {
    display: block;
    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.wc-otp-mobile-input {
    display: flex;
    width: 100%;

    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;

    transition: border-color 0.2s, box-shadow 0.2s;
}

.wc-otp-mobile-input:focus-within {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.wc-otp-country {
    display: flex;
    align-items: center;

    padding: 0 13px;

    background: #f9fafb;
    border-right: 1px solid #d1d5db;

    color: #374151;
    font-size: 15px;
}

.wc-otp-mobile-input input {
    flex: 1;

    min-width: 0;
    height: 48px;

    border: 0;
    outline: 0;

    padding: 0 14px;

    font-size: 16px;
    color: #111827;
    background: #fff;
}

.wc-otp-step-otp input {
    width: 100%;
    height: 52px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    padding: 0 15px;

    outline: 0;

    font-size: 24px;
    font-weight: 600;
    letter-spacing: 8px;
    text-align: center;

    color: #111827;
}

.wc-otp-step-otp input:focus {
    border-color: #111827;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.wc-otp-button {
    position: relative;

    width: 100%;
    height: 50px;

    margin-top: 18px;

    border: 0;
    border-radius: 10px;

    background: #111827;
    color: #ffffff;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition: background 0.2s, transform 0.1s;
}

.wc-otp-button:hover {
    background: #000000;
}

.wc-otp-button:active {
    transform: scale(0.99);
}

.wc-otp-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.wc-otp-loader {
    display: none;

    width: 17px;
    height: 17px;

    margin-left: 8px;

    vertical-align: middle;

    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;

    border-radius: 50%;

    animation: wcOtpSpin 0.7s linear infinite;
}

.wc-otp-button.is-loading .wc-otp-loader {
    display: inline-block;
}

.wc-otp-button.is-loading .wc-otp-button-text {
    opacity: 0.8;
}

@keyframes wcOtpSpin {
    to {
        transform: rotate(360deg);
    }
}

.wc-otp-message {
    min-height: 20px;
    margin-top: 12px;

    font-size: 13px;
    line-height: 1.5;
}

.wc-otp-message.success {
    color: #15803d;
}

.wc-otp-message.error {
    color: #dc2626;
}

.wc-otp-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 18px;

    font-size: 13px;
}

.wc-otp-footer button {
    border: 0;
    padding: 0;

    background: transparent;

    color: #111827;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.wc-otp-footer button:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.wc-otp-countdown {
    color: #6b7280;
}

.wc-otp-change-number::after {
    content: "";
}

body.wc-otp-popup-open {
    overflow: hidden;
}

/**
 * Shortcode button
 */

.wc-otp-login-trigger,
.wc-otp-popup-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 10px 18px;

    border: 0;
    border-radius: 8px;

    background: #111827;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.wc-otp-login-trigger:hover,
.wc-otp-popup-trigger:hover {
    background: #000;
}

/**
 * Mobile
 */

@media (max-width: 480px) {

    .wc-otp-popup {
        padding: 15px;
    }

    .wc-otp-popup-container {
        max-width: none;
        padding: 27px 20px 24px;
        border-radius: 16px;
    }

    .wc-otp-header h2 {
        font-size: 22px;
    }

    .wc-otp-step-otp input {
        font-size: 22px;
        letter-spacing: 6px;
    }
}
