/* ============================================================
   CUSTOM ALERTS & CONFIRMS - Replace Default Browser Dialogs
   ============================================================ */

.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.custom-alert-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-alert-header {
    padding: 20px 24px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.custom-alert-icon.info {
    color: #2563eb;
}

.custom-alert-icon.success {
    color: #10b981;
}

.custom-alert-icon.warning {
    color: #f59e0b;
}

.custom-alert-icon.error {
    color: #ef4444;
}

.custom-alert-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
}

.custom-alert-body {
    padding: 24px;
}

.custom-alert-message {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.custom-alert-footer {
    padding: 16px 24px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-alert-button {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.custom-alert-button.primary {
    background: #2563eb;
    color: white;
}

.custom-alert-button.primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.custom-alert-button.secondary {
    background: #f3f4f6;
    color: #374151;
}

.custom-alert-button.secondary:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.custom-alert-button.danger {
    background: #ef4444;
    color: white;
}

.custom-alert-button.danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.custom-alert-button.success {
    background: #10b981;
    color: white;
}

.custom-alert-button.success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.custom-alert-button:active {
    transform: translateY(0);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .custom-alert-modal {
        max-width: 100%;
        margin: 0;
        border-radius: 12px;
    }
    
    .custom-alert-header {
        padding: 16px 20px;
    }
    
    .custom-alert-title {
        font-size: 16px;
    }
    
    .custom-alert-body {
        padding: 20px;
    }
    
    .custom-alert-message {
        font-size: 14px;
    }
    
    .custom-alert-footer {
        padding: 12px 20px;
        flex-direction: column-reverse;
    }
    
    .custom-alert-button {
        width: 100%;
        padding: 12px;
    }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
    width: calc(100% - 32px);
    pointer-events: none;
}

.toast-container.top {
    /* Centered vertically and horizontally */
}

.toast-container.bottom {
    /* Centered vertically and horizontally */
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    border-left: 4px solid;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-20px);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 15px;
    line-height: 1.5;
    color: #374151;
    font-weight: 500;
    flex: 1;
}

/* Toast types */
.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-info {
    border-left-color: #2563eb;
}

.toast-info .toast-icon {
    color: #2563eb;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

/* Mobile responsiveness for toasts */
@media (max-width: 480px) {
    .toast-container {
        width: calc(100% - 16px);
    }
    
    .toast-container.top {
        top: 16px;
    }
    
    .toast-container.bottom {
        bottom: 16px;
    }
    
    .toast {
        padding: 14px 16px;
    }
    
    .toast-icon {
        width: 20px;
        height: 20px;
    }
    
    .toast-message {
        font-size: 14px;
    }
}

/* ============================================================
   UPGRADE NOTIFICATION MODAL
   ============================================================ */

.upgrade-notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upgrade-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.upgrade-modal-content {
    position: relative;
    background: linear-gradient(135deg, #2a9b8f 0%, #3aab9f 50%, #4abfb3 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(17, 185, 162, 0.4);
    animation: upgradeModalSlideIn 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes upgradeModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.upgrade-modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: upgradeIconBounce 0.6s ease-out 0.3s;
}

.upgrade-modal-icon img {
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 1)) 
            drop-shadow(0 0 50px rgba(255, 255, 255, 0.9))
            drop-shadow(0 0 80px rgba(255, 255, 255, 0.7))
            drop-shadow(0 0 120px rgba(255, 255, 255, 0.5));
    animation: upgradeIconGlow 1.5s ease-in-out infinite;
}

@keyframes upgradeIconGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 1)) 
                drop-shadow(0 0 50px rgba(255, 255, 255, 0.9))
                drop-shadow(0 0 80px rgba(255, 255, 255, 0.7))
                drop-shadow(0 0 120px rgba(255, 255, 255, 0.5));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 50px rgba(255, 255, 255, 1)) 
                drop-shadow(0 0 80px rgba(255, 255, 255, 1))
                drop-shadow(0 0 120px rgba(255, 255, 255, 0.9))
                drop-shadow(0 0 160px rgba(255, 255, 255, 0.7));
        transform: scale(1.05);
    }
}

@keyframes upgradeIconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.upgrade-modal-title {
    color: white;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.upgrade-modal-message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.upgrade-modal-details {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.4;
}

.upgrade-modal-btn {
    background: white;
    color: #0d3d4a;
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.upgrade-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.upgrade-modal-btn:active {
    transform: translateY(0);
}
