/**
 * Floating Notifications CSS
 * Non-intrusive notification styles that don't affect page layout
 */

/* Floating Notification Styles (Fallback when Toast.js not available) */
.floating-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.floating-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.floating-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.5;
    backdrop-filter: blur(10px);
}

.floating-message {
    flex: 1;
    margin-right: 12px;
}

.floating-close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: currentColor;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.floating-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Type-specific styles */
.floating-success .floating-content {
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-error .floating-content,
.floating-danger .floating-content {
    background: linear-gradient(135deg, #ff3b30 0%, #dc3545 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-warning .floating-content {
    background: linear-gradient(135deg, #ffcc00 0%, #ffc107 100%);
    color: #212529;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.floating-info .floating-content {
    background: linear-gradient(135deg, #00A7E1 0%, #0086b3 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .floating-notification {
        left: 10px;
        right: 10px;
        transform: translateX(0) translateY(-100px);
        min-width: auto;
        max-width: none;
    }
    
    .floating-notification.show {
        transform: translateX(0) translateY(0);
    }
}

/* Safe area support for devices with notches */
@supports (padding: env(safe-area-inset-top)) {
    .floating-notification {
        top: calc(20px + env(safe-area-inset-top));
    }
}

/* Enhanced Toast Container Position Options */
.toast-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
}

/* Top center position for toast notifications */
.toast-container.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Adjust toast animations for center position */
.toast-container.top-center .toast {
    transform: translateY(-100px);
}

.toast-container.top-center .toast-show {
    animation: slideInDown 0.3s ease forwards;
}

.toast-container.top-center .toast-hide {
    animation: slideOutUp 0.3s ease forwards;
}

@keyframes slideInDown {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    to {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* Hide original flash container to prevent any layout issues */
.flash-container,
.flash-alert,
div.flash-container,
div.flash-alert,
body .flash-container,
body .flash-alert,
body div.flash-container,
body div.flash-alert,
.main-content .flash-container,
.main-content .flash-alert,
.container .flash-container,
.container .flash-alert {
    position: fixed !important;
    left: -9999px !important;
    top: -9999px !important;
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* Extra specificity to override any other styles */
body .flash-container,
body .flash-alert,
body div.flash-container,
body div.flash-alert,
.main-content .flash-container,
.main-content .flash-alert,
.container .flash-container,
.container .flash-alert {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}