/* ThaiBulkSMS OTP Plugin Styles */

/* Container */
.tbs-otp-wrapper {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
}

.tbs-otp-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* Icon Wrapper */
.tbs-icon-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.tbs-icon-wrapper.tbs-icon-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Typography */
.tbs-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    margin: 0 0 8px;
}

.tbs-subtitle {
    font-size: 14px;
    color: #718096;
    text-align: center;
    margin: 0 0 32px;
}

/* Form Elements */
.tbs-form-group {
    margin-bottom: 20px;
}

.tbs-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.tbs-phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tbs-phone-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tbs-phone-prefix {
    background: #f7fafc;
    padding: 14px 16px;
    font-weight: 600;
    color: #4a5568;
    border-right: 2px solid #e2e8f0;
}

.tbs-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
}

/* Info Box */
.tbs-info-box {
    background: #edf2f7;
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 24px;
}

/* Button */
.tbs-button {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tbs-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.tbs-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* OTP Inputs */
.tbs-otp-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.tbs-otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

.tbs-otp-digit:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Timer */
.tbs-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 24px;
    font-size: 14px;
    color: #718096;
}

.tbs-resend-btn {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* Back Button */
.tbs-back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.tbs-back-button:hover {
    color: #764ba2;
}

/* Footer */
.tbs-footer {
    text-align: center;
    font-size: 13px;
    color: #718096;
    margin-top: 24px;
}

.tbs-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* Steps */
.tbs-otp-step {
    display: none;
}

.tbs-otp-step.active {
    display: block;
}

/* Messages */
.tbs-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

.tbs-message.tbs-error {
    background: #fed7d7;
    color: #c53030;
    border-left: 4px solid #c53030;
}

.tbs-message.tbs-success {
    background: #c6f6d5;
    color: #2f855a;
    border-left: 4px solid #2f855a;
}

/* Checkout Specific Styles */
.tbs-checkout-otp-section {
    margin: 24px 0;
    padding: 24px;
    background: #f7fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.tbs-checkout-otp-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 16px;
}

.tbs-otp-status-wrapper .tbs-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
}

.tbs-verified .tbs-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2f855a;
    font-weight: 600;
    margin-bottom: 8px;
}

.tbs-change-phone {
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .tbs-otp-container {
        padding: 32px 24px;
    }
    
    .tbs-otp-digit {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
    
    .tbs-otp-inputs {
        gap: 8px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tbs-otp-step.active {
    animation: fadeIn 0.3s ease;
}
