/* MAF Session Manager Styles */

/* Modal Overlay Base */
.maf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Modal Content */
.maf-modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

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

/* Modal Header */
.maf-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #fee2e2 0%, #fef3cd 100%);
}

.maf-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Body */
.maf-modal-body {
    padding: 24px;
    text-align: center;
}

/* Warning Icon */
.warning-icon,
.session-expired-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Session Warning Specific Styles */
.maf-session-warning-modal .session-warning-message {
    font-size: 16px;
    color: #374151;
    margin-bottom: 16px;
    line-height: 1.5;
}

.time-remaining {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0 24px;
    font-weight: 600;
    color: #dc2626;
}

.remaining-time {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #dc2626;
    font-weight: 700;
}

/* Action Buttons */
.warning-actions,
.expired-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

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

.maf-btn-primary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
}

.maf-btn-primary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

.maf-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Session Expired Modal */
.maf-session-expired-modal .maf-modal-header {
    background: linear-gradient(135deg, #fecaca 0%, #fed7d7 100%);
}

.maf-session-expired-modal .maf-modal-header h3 {
    color: #dc2626;
}

/* Flight Pricing Context Styling */
.maf-session-warning-modal.pricing-context .maf-modal-header {
    background: linear-gradient(135deg, #fef3cd 0%, #fde68a 100%);
}

.maf-session-warning-modal.pricing-context .maf-modal-header h3 {
    color: #d97706;
}

.maf-session-warning-modal.pricing-context .maf-modal-header h3::before {
    content: '✈️ ';
    margin-right: 8px;
}

.maf-session-warning-modal.pricing-context .session-warning-message {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    color: #92400e;
    font-weight: 500;
}

.maf-session-warning-modal.pricing-context .time-remaining {
    background: linear-gradient(135deg, #fef3cd 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    color: #d97706;
    font-weight: 700;
    animation: urgentPulse 2s infinite;
}

@keyframes urgentPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
    }
}

/* Flight Session Expired Modal */
.maf-session-expired-modal.pricing-expired .maf-modal-header {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.maf-session-expired-modal.pricing-expired .maf-modal-header h3 {
    color: #2563eb;
}

.maf-session-expired-modal.pricing-expired .pricing-note {
    background: #f0f9ff;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
    color: #0c4a6e;
    font-size: 14px;
}

/* Pricing Context Warning Animation */
.maf-session-warning-modal.pricing-context .warning-icon {
    color: #f59e0b;
    animation: priceWarning 1.5s infinite;
}

@keyframes priceWarning {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        color: #f59e0b;
    }
    25% { 
        transform: scale(1.1) rotate(-2deg);
        color: #d97706;
    }
    75% { 
        transform: scale(1.1) rotate(2deg);
        color: #f59e0b;
    }
}

/* Notification System */
.maf-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #3b82f6;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.maf-notification:not(.maf-notification-error):not(.maf-notification-success) {
    border-left-color: #3b82f6;
}

.maf-notification-success {
    border-left-color: #10b981;
}

.maf-notification-error {
    border-left-color: #ef4444;
}

.maf-notification.show {
    transform: translateX(0);
}

.notification-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.maf-notification-success .notification-icon {
    color: #10b981;
}

.maf-notification-error .notification-icon {
    color: #ef4444;
}

.maf-notification:not(.maf-notification-error):not(.maf-notification-success) .notification-icon {
    color: #3b82f6;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .maf-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .maf-modal-body {
        padding: 20px;
    }
    
    .warning-actions,
    .expired-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .maf-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .maf-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .maf-notification.show {
        transform: translateY(0);
    }
}

/* Animation for smooth appearance */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.maf-notification {
    animation: slideInFromRight 0.3s ease-out;
}

.maf-modal-overlay.active {
    animation: fadeInUp 0.3s ease-out;
}

/* Loading states */
.maf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.maf-btn.loading {
    position: relative;
    color: transparent;
}

.maf-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
    color: inherit;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .maf-modal-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .maf-modal-content {
        border: 2px solid #000;
    }
    
    .maf-btn {
        border: 2px solid currentColor;
    }
} 