/* cards/static/cards/css/toast_notifications.css */

/* Container for all toast notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000; /* High z-index to appear above other content */
    display: flex;
    flex-direction: column-reverse; /* Newest at top - site_plan line 177 */
    gap: 10px; /* Spacing between toasts - site_plan line 107 */
    max-width: 300px; /* site_plan line 105 */
}

/* Base style for individual toast notifications */
.toast-notification {
    display: flex;
    align-items: center;
    padding: 12.8px 19.2px; /* site_plan line 102 */
    border-radius: 4px; /* site_plan line 103 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); /* Dark theme default - site_plan line 104 */
    /* color will be set by type-specific styles */
    font-family: inherit; /* site_plan line 99 */
    font-size: 14.4px; /* site_plan line 100 */
    width: 300px; /* site_plan line 105 */
    opacity: 0.95; /* Existing, retained */
    animation: slideInRight 0.5s forwards; /* site_plan line 70 */
    position: relative; /* For absolute positioning of close button */
    border-left: 4px solid transparent; /* Color set by type - site_plan line 118 */
    max-height: 100px; /* site_plan line 106 */
    overflow-y: auto; /* site_plan line 106 */
    transition: transform 0.3s ease-out; /* Smooth transition for position changes */
}

/* Style for hovered toast notifications */
.toast-notification.toast-hovered {
    z-index: 10001; /* Higher than container to ensure it stays on top */
    box-shadow: 0 3px 12px rgba(0,0,0,0.3); /* Enhanced shadow for visual feedback */
    opacity: 1; /* Full opacity when hovered */
    position: relative; /* Ensure position is maintained */
}

.toast-notification.toast-removing {
    animation: slideOutRight 0.5s forwards;
}

/* Ensure hovered toasts maintain their position */
.toast-container .toast-hovered {
    /* position: fixed; */ /* Removed: No longer fixing position via JS top/right */
    /* The toast will remain in its natural position within the flex container */
}

/* Close button style */
.toast-close {
    background: none;
    border: none;
    color: inherit; /* Inherits color from parent toast for theme consistency */
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: auto; /* Pushes close button to the right */
    padding: 0 5px;
    line-height: 1;
    opacity: 0.7;
}

.toast-close:hover {
    opacity: 1;
}

/* Undo button style */
.toast-undo-button {
    background-color: rgba(0, 0, 0, 0.1); /* Subtle background */
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: inherit; /* Inherits color from parent toast */
    padding: 4.8px 9.6px;
    margin-left: 10px; /* Space between message and undo button */
    border-radius: 3px;
    cursor: pointer;
    font-size: 13.6px;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.toast-undo-button:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.2);
}

/* Specific styling for undo button in light/dark themes if needed */
body.light-theme .toast-undo-button {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .toast-undo-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body.dark-theme .toast-undo-button {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .toast-undo-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* --- Light Theme Specific Styles --- */
/* site_plan line 104 - Light theme box shadow */
body.light-theme .toast-notification {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* site_plan lines 89-94 */
body.light-theme .toast-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #c3e6cb;
}

body.light-theme .toast-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #f5c6cb;
}

body.light-theme .toast-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left-color: #ffeeba;
}

body.light-theme .toast-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left-color: #bee5eb;
}

/* --- Dark Theme Specific Styles --- */
/* site_plan lines 81-86 */
body.dark-theme .toast-success {
    background-color: #155724;
    color: #d4edda;
    border-left-color: #c3e6cb;
}

body.dark-theme .toast-error {
    background-color: #721c24;
    color: #f8d7da;
    border-left-color: #f5c6cb;
}

body.dark-theme .toast-warning {
    background-color: #856404;
    color: #fff3cd;
    border-left-color: #ffeeba;
}

body.dark-theme .toast-info {
    background-color: #0c5460;
    color: #d1ecf1;
    border-left-color: #bee5eb;
}

/* Keyframes for animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0.95;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 0.95;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Hover effects for toast notifications */
.toast-notification:hover {
    cursor: default;
}