/**
 * Stripe Modal Styles
 * Styles for payment modals and related UI elements
 */

/* Modal Base Styles */
.azld-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.azld-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.azld-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.azld-modal-content.azld-modal-sm {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.azld-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.azld-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #111827;
}

.azld-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.azld-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

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

/* Upgrade Modal Specific */
.azld-upgrade-details {
    margin-bottom: 30px;
}

.azld-price-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #00356B 0%, #660000 100%);
    border-radius: 12px;
    color: white;
}

.azld-price {
    font-size: 3em;
    font-weight: 700;
}

.azld-period {
    font-size: 1.2em;
    opacity: 0.9;
}

.azld-features {
    margin-bottom: 25px;
}

.azld-features h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #374151;
}

.azld-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.azld-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.azld-features li:last-child {
    border-bottom: none;
}

.azld-check {
    color: #10b981;
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2em;
}

.azld-payment-info {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.azld-payment-info p {
    margin: 8px 0;
    font-size: 0.95em;
    color: #6b7280;
}

.azld-secure-notice {
    color: #059669 !important;
    font-weight: 500;
}

.azld-cancel-notice {
    color: #6b7280;
}

.azld-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.azld-modal-actions .azld-btn {
    min-width: 150px;
}

/* Payment Required Notice */
.azld-payment-required {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.azld-payment-required p {
    margin: 5px 0;
    color: #92400e;
}

/* Stripe Card Element Container */
#azld-card-element {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    margin-bottom: 20px;
}

#azld-card-element.StripeElement--focus {
    border-color: #00356B;
    box-shadow: 0 0 0 3px rgba(0, 53, 107, 0.1);
}

#azld-card-element.StripeElement--invalid {
    border-color: #ef4444;
}

#azld-card-errors {
    color: #ef4444;
    font-size: 0.9em;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Toast Notifications */
.azld-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 9999999;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.azld-toast-icon {
    font-size: 1.2em;
}

.azld-toast-message {
    flex: 1;
    color: #374151;
}

.azld-toast-success {
    border-left: 4px solid #10b981;
}

.azld-toast-error {
    border-left: 4px solid #ef4444;
}

.azld-toast-info {
    border-left: 4px solid #3b82f6;
}

/* Button Styles */
.azld-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.azld-btn-primary {
    background: linear-gradient(135deg, #00356B 0%, #660000 100%);
    color: white;
}

.azld-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.azld-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

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

.azld-btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

.azld-modal-cancel {
    background: transparent;
    color: #6b7280;
}

.azld-modal-cancel:hover {
    background: #f3f4f6;
}

/* Responsive Styles */
@media (max-width: 640px) {
    .azld-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .azld-modal-header {
        padding: 20px;
    }
    
    .azld-modal-body {
        padding: 20px;
    }
    
    .azld-price {
        font-size: 2.5em;
    }
    
    .azld-modal-actions {
        flex-direction: column;
    }
    
    .azld-modal-actions .azld-btn {
        width: 100%;
    }
    
    .azld-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Loading States */
.azld-loading {
    position: relative;
    color: transparent !important;
}

.azld-loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Upgrade Button Special Styles */
.azld-upgrade-cta {
    text-align: center;
    margin: 20px 0;
}

.azld-pro-upgrade-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}

.azld-pro-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

/* Feature Badge for Premium Tiers */
.azld-tier-badge-featured {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}