/* ── HAUKES TOAST NOTIFICATIONS ── */
:root {
    --haukes-toast-bg: #ffffff;
    --haukes-toast-text: #222D3F;
    --haukes-toast-border: #e2e8f0;
    --haukes-toast-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --haukes-toast-success: #10B981;
    --haukes-toast-error: #EF4444;
    --haukes-toast-warning: #F59E0B;
    --haukes-toast-info: #3B82F6;
    --haukes-toast-radius: 8px;
    --haukes-toast-zindex: 2147483647;
}

#haukes-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--haukes-toast-zindex);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 400px;
    width: 100%;
}

.haukes-toast {
    background: var(--haukes-toast-bg);
    color: var(--haukes-toast-text);
    border-radius: var(--haukes-toast-radius);
    box-shadow: var(--haukes-toast-shadow);
    border-left: 5px solid transparent; /* Colored based on type */
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    
    /* Animation defaults */
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.haukes-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.haukes-toast.is-hiding {
    transform: translateX(120%);
    opacity: 0;
}

/* Toast Types */
.haukes-toast--success { border-color: var(--haukes-toast-success); }
.haukes-toast--error   { border-color: var(--haukes-toast-error); }
.haukes-toast--warning { border-color: var(--haukes-toast-warning); }
.haukes-toast--info    { border-color: var(--haukes-toast-info); }

/* Icons */
.haukes-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.haukes-toast-icon svg {
    width: 100%;
    height: 100%;
}
.haukes-toast--success .haukes-toast-icon { color: var(--haukes-toast-success); }
.haukes-toast--error   .haukes-toast-icon { color: var(--haukes-toast-error); }
.haukes-toast--warning .haukes-toast-icon { color: var(--haukes-toast-warning); }
.haukes-toast--info    .haukes-toast-icon { color: var(--haukes-toast-info); }

/* Content */
.haukes-toast-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 24px; /* Space for close button */
}

.haukes-toast-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    color: var(--haukes-toast-text);
}

.haukes-toast-message {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

/* Close Button */
.haukes-toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    padding: 0;
}

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

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

/* Progress Bar */
.haukes-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f3f4f6;
    transform-origin: left;
}

.haukes-toast-progress-bar {
    width: 100%;
    height: 100%;
    background: currentColor;
    transform-origin: left;
    animation: haukesToastProgress linear forwards;
}

.haukes-toast--success .haukes-toast-progress-bar { color: var(--haukes-toast-success); }
.haukes-toast--error   .haukes-toast-progress-bar { color: var(--haukes-toast-error); }
.haukes-toast--warning .haukes-toast-progress-bar { color: var(--haukes-toast-warning); }
.haukes-toast--info    .haukes-toast-progress-bar { color: var(--haukes-toast-info); }

@keyframes haukesToastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #haukes-toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        width: auto;
    }
}
