/* SMS-First Subscription Modals Styling */
/* Phase 3D Implementation */

.sms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sms-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sms-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.sms-modal-overlay.active .sms-modal {
    transform: scale(1) translateY(0);
}

.sms-modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    position: relative;
}

.sms-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.sms-modal-close:hover {
    color: #333;
}

.sms-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.sms-modal-subtitle {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.sms-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
}

.sms-progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: #6b7280;
    position: relative;
}

.sms-progress-step.active {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

.sms-progress-step.completed {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.sms-progress-line {
    width: 40px;
    height: 2px;
    background-color: #e5e7eb;
    transition: background-color 0.3s ease;
}

.sms-progress-line.completed {
    background-color: #10b981;
}

.sms-modal-body {
    padding: 30px;
}

.sms-form-group {
    margin-bottom: 20px;
}

.sms-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.sms-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.sms-form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.sms-form-input.error {
    border-color: #ef4444;
}

.sms-form-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.sms-form-error.visible {
    display: block;
}

.sms-phone-group {
    display: flex;
    gap: 10px;
}

.sms-country-code {
    width: 100px;
    flex-shrink: 0;
}

.sms-phone-number {
    flex: 1;
}

.sms-plan-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.sms-plan-title {
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
}

.sms-plan-price {
    font-size: 24px;
    font-weight: 700;
    color: #4f46e5;
    margin: 0;
}

.sms-plan-billing {
    color: #666;
    font-size: 14px;
    margin: 5px 0 0;
}

.sms-modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.sms-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    min-width: 120px;
}

.sms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sms-btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.sms-btn-secondary:hover:not(:disabled) {
    background-color: #e5e7eb;
}

.sms-btn-primary {
    background-color: #4f46e5;
    color: white;
}

.sms-btn-primary:hover:not(:disabled) {
    background-color: #4338ca;
}

.sms-loading {
    display: none;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: sms-spin 0.8s linear infinite;
}

.sms-btn.loading .sms-loading {
    display: inline-block;
}

.sms-btn.loading .sms-btn-text {
    opacity: 0.7;
}

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

/* OTP Verification Modal Specific Styles */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.otp-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.otp-digit:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.otp-digit.filled {
    background-color: #f0f9ff;
    border-color: #4f46e5;
    color: #4f46e5;
}

.otp-countdown {
    text-align: center;
    margin: 20px 0;
    font-size: 14px;
    color: #666;
}

.otp-countdown.expired {
    color: #ef4444;
}

.otp-resend {
    background: none;
    border: none;
    color: #4f46e5;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

.otp-resend:disabled {
    color: #9ca3af;
    cursor: not-allowed;
    text-decoration: none;
}

.otp-sent-info {
    background-color: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    color: #1e40af;
    font-size: 14px;
}

.otp-phone-display {
    font-weight: 600;
    color: #4f46e5;
}

/* Success Modal Styles */
.sms-success-icon {
    width: 60px;
    height: 60px;
    background-color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.sms-success-icon i {
    color: white;
    font-size: 24px;
}

.sms-success-title {
    font-size: 22px;
    font-weight: 600;
    color: #065f46;
    text-align: center;
    margin: 0 0 10px;
}

.sms-success-message {
    color: #374151;
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sms-modal {
        width: 95%;
        margin: 20px;
    }
    
    .sms-modal-header,
    .sms-modal-body,
    .sms-modal-footer {
        padding: 20px;
    }
    
    .otp-input-group {
        gap: 8px;
    }
    
    .otp-digit {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
    
    .sms-phone-group {
        flex-direction: column;
    }
    
    .sms-country-code {
        width: 100%;
    }
}
