/* =====================================================
PROFESSIONAL MATERIAL DESIGN TOAST NOTIFICATIONS
Following Apple HIG, Material Design, and Fluent UI principles
===================================================== */

.toast-container {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000; /* Highest z-index - above all modals */
    width: 100%;
    max-width: 420px;
    padding: var(--space-4);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: center;
}

/* Toast Base Styles - Material Design 3 */
.toast {
    width: 100%;
    background: #FFFFFF;
    border-radius: 12px; /* Material Design 3 radius */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
                0 4px 8px rgba(0, 0, 0, 0.1),
                0 2px 4px rgba(0, 0, 0, 0.08);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
    min-height: 56px; /* Material Design touch target */
}

.toast-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-hide {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
}

/* Toast Content */
.toast-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.toast-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.toast-message {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    letter-spacing: 0.01em;
    flex: 1;
    word-wrap: break-word;
}

/* Toast Types - Brand Colors */
.toast-success {
    border-left-color: #10b981; /* Success green */
    background: #FFFFFF;
}

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

.toast-error {
    border-left-color: #ef4444; /* Error red */
    background: #FFFFFF;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b; /* Warning orange */
    background: #FFFFFF;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left-color: #3b82f6; /* Info blue */
    background: #FFFFFF;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* Action Button */
.toast-action {
    background: transparent;
    border: none;
    color: #489292; /* Teal matching brand */
    font-size: 14px;
    font-weight: 600;
    padding: var(--space-1) var(--space-2);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toast-action:hover {
    background: rgba(248, 131, 121, 0.1);
}

.toast-action:active {
    background: rgba(248, 131, 121, 0.2);
    transform: scale(0.95);
}

/* Close Button */
.toast-close {
    background: transparent;
    border: none;
    padding: var(--space-1);
    cursor: pointer;
    border-radius: 6px;
    color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.6);
}

.toast-close:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
}

.toast-close svg {
    width: 18px;
    height: 18px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .toast-container {
        max-width: calc(100% - var(--space-4) * 2);
        padding: var(--space-3);
    }

    .toast {
        padding: var(--space-3);
        min-height: 52px;
    }

    .toast-message {
        font-size: 14px;
    }
}

/* Stack multiple toasts */
.toast-container .toast + .toast {
    margin-top: var(--space-2);
}

/* Animation for stacking */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}



