/**
 * SNS Trade OTP Authentication - Modern, Mobile-First Styles
 */

.sns-otp-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto 35px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.sns-otp-container * {
    box-sizing: border-box;
}

.sns-otp-card {
    background: #ffffff;
    border: 1px solid #e1e6eb;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 4px 20px rgba(2, 17, 34, 0.07);
}

/* Header */
.sns-otp-header {
    text-align: center;
    margin-bottom: 22px;
}

.sns-otp-badge {
    display: inline-block;
    background: #eef7fc;
    color: #0284c7;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.sns-otp-header h2 {
    font-size: 22px;
    color: #021122;
    margin: 0 0 6px 0;
    font-weight: 700;
}

.sns-otp-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* Form Groups */
.sns-otp-form-group {
    margin-bottom: 18px;
    text-align: left;
}

.sns-otp-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.sns-otp-req {
    color: #e11d48;
    margin-left: 2px;
}

.sns-otp-optional {
    color: #94a3b8;
    font-weight: normal;
    font-size: 12px;
    margin-left: 4px;
}

/* Phone Wrapper */
.sns-otp-phone-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sns-otp-phone-wrapper:focus-within {
    border-color: #3ab1e4;
    box-shadow: 0 0 0 3px rgba(58, 177, 228, 0.15);
}

.sns-otp-country-code {
    background: #f8fafc;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    border-right: 1px solid #cbd5e1;
    white-space: nowrap;
}

.sns-otp-phone-wrapper input {
    width: 100%;
    border: none !important;
    padding: 11px 14px !important;
    font-size: 15px !important;
    color: #0f172a !important;
    outline: none !important;
    background: transparent !important;
    margin: 0 !important;
    letter-spacing: 0.5px;
}

.sns-otp-form-group input[type="text"] {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.sns-otp-form-group input[type="text"]:focus {
    border-color: #3ab1e4;
    box-shadow: 0 0 0 3px rgba(58, 177, 228, 0.15);
}

.sns-otp-hint {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

/* 6-Digit OTP Box */
.sns-otp-code-inputs {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 0;
}

.sns-code-box {
    width: 48px;
    height: 54px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #021122;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    outline: none;
    transition: all 0.2s;
}

.sns-code-box:focus {
    border-color: #3ab1e4;
    box-shadow: 0 0 0 3px rgba(58, 177, 228, 0.2);
    transform: translateY(-2px);
}

/* Verify Info */
.sns-otp-verify-info {
    text-align: center;
    margin-bottom: 16px;
    font-size: 13px;
    color: #475569;
}

.sns-otp-verify-info strong {
    color: #021122;
}

.sns-otp-verify-info a {
    display: block;
    color: #0284c7;
    text-decoration: underline;
    font-size: 12px;
    margin-top: 4px;
}

/* Buttons */
.sns-otp-btn {
    width: 100%;
    padding: 13px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sns-otp-btn-primary {
    background: #021122;
    color: #ffffff;
}

.sns-otp-btn-primary:hover {
    background: #0d2238;
    box-shadow: 0 4px 12px rgba(2, 17, 34, 0.2);
}

.sns-otp-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Spinner */
.sns-otp-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: sns-spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes sns-spin {
    to { transform: rotate(360deg); }
}

/* Resend section */
.sns-otp-resend-wrapper {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 14px;
}

.sns-otp-resend-wrapper a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
}

.sns-otp-resend-wrapper a:hover {
    text-decoration: underline;
}

/* Alerts */
.sns-otp-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.sns-otp-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.sns-otp-alert.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Divider */
.sns-otp-divider {
    position: relative;
    text-align: center;
    margin: 28px 0 10px 0;
}

.sns-otp-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.sns-otp-divider span {
    position: relative;
    background: #ffffff;
    padding: 0 12px;
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .sns-otp-card {
        padding: 22px 16px;
    }
    .sns-code-box {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }
}
