/**
 * Modal Checkout Styles
 * Enhanced styling for modal-specific checkout interface
 */

/* Modal-specific checkout container */
.mob-checkout-modal-content {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

/* Checkout header */
.mob-checkout-header {
    text-align: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e0e4e7;
    background: #f8fafc;
    margin: -24px -24px 24px;
}

.mob-checkout-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
}

.mob-checkout-subtitle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 16px;
    color: #4a5568;
}

.mob-plan-price {
    font-weight: 600;
    font-size: 24px;
    color: #2b6cb0;
}

.mob-billing-cycle {
    font-size: 14px;
    color: #718096;
}

/* Checkout sections */
.mob-checkout-section {
    margin-bottom: 24px;
}

.mob-section-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* Form groups and inputs */
.mob-form-group {
    margin-bottom: 16px;
}

.mob-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.mob-required {
    color: #dc2626;
    margin-left: 2px;
}

.mob-optional {
    font-weight: 400;
    color: #6b7280;
    font-size: 12px;
}

.mob-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.mob-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mob-form-input.mob-form-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.mob-field-error {
    margin-top: 4px;
    font-size: 12px;
    color: #dc2626;
    display: block;
}

/* Payment methods */
.mob-payment-methods {
    margin-bottom: 20px;
}

.mob-payment-method {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.mob-payment-method:hover {
    border-color: #d1d5db;
}

.mob-payment-method.mob-payment-active {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.mob-payment-method input[type="radio"] {
    display: none;
}

.mob-payment-label {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    gap: 12px;
}

.mob-payment-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mob-payment-icon svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

.mob-payment-active .mob-payment-icon {
    background: #3b82f6;
}

.mob-payment-active .mob-payment-icon svg {
    color: #fff;
}

.mob-payment-info {
    flex: 1;
}

.mob-payment-name {
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
}

.mob-payment-desc {
    font-size: 12px;
    color: #6b7280;
}

/* PayPal integration */
.mob-paypal-section {
    margin-top: 16px;
}

.mob-paypal-container {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Payment messages */
.mob-payment-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin: 16px 0;
    text-align: center;
}

.mob-payment-processing {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.mob-payment-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.mob-payment-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
}

/* Security notice */
.mob-security-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    font-size: 13px;
    color: #166534;
    margin-top: 16px;
}

.mob-security-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #16a34a;
}

/* Alerts */
.mob-alert {
    padding: 16px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 0;
}

.mob-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.mob-alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.mob-alert-content {
    flex: 1;
}

.mob-alert-title {
    font-weight: 500;
    color: #991b1b;
    margin-bottom: 4px;
}

.mob-alert-message {
    font-size: 14px;
    color: #7f1d1d;
}

/* Modal loading states */
.mob-modal-loading {
    text-align: center;
    padding: 40px 24px;
}

.mob-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: mob-spin 1s linear infinite;
    margin: 0 auto 16px;
}

.mob-loading-text {
    color: #6b7280;
    font-size: 14px;
}

.mob-modal-error {
    text-align: center;
    padding: 40px 24px;
}

.mob-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.mob-error-title {
    font-size: 18px;
    font-weight: 600;
    color: #991b1b;
    margin-bottom: 8px;
}

.mob-error-message {
    color: #7f1d1d;
    margin-bottom: 24px;
}

/* Animations */
@keyframes mob-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button styles for modal */
.mob-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mob-btn-primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.mob-btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Responsive design */
@media (max-width: 640px) {
    .mob-checkout-modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .mob-checkout-header {
        padding: 20px 16px 16px;
        margin: -20px -16px 20px;
    }
    
    .mob-checkout-title {
        font-size: 18px;
    }
    
    .mob-plan-price {
        font-size: 20px;
    }
    
    .mob-payment-label {
        padding: 12px;
    }
    
    .mob-form-input {
        padding: 8px 10px;
    }
}

/* Fallback modal styles */
#mob-fallback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

#mob-fallback-modal .mob-sl-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

#mob-fallback-modal .mob-sl-modal-dialog {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

#mob-fallback-modal .mob-sl-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

#mob-fallback-modal .mob-sl-modal-header {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

#mob-fallback-modal .mob-sl-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
}

#mob-fallback-modal .mob-sl-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

#mob-fallback-modal .mob-sl-modal-body {
    padding: 24px;
}
