/**
 * Enhanced ToastBar styles to match Toast.scss animation & design
 */

.guac-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    padding: 8px;
}

.guac-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* slightly richer shadow */
    backdrop-filter: blur(8px); 
    border: 1px solid rgba(255,255,255,0.15);
    min-height: 56px;
    max-width: 100%;
    cursor: pointer;
    pointer-events: auto; /* allow click */
    word-wrap: break-word;
    will-change: transform, opacity; /* optimize animation performance */
    animation: slideInRight 0.3s ease-out;
}

.guac-toast:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* Variants */
.guac-toast-success {
    background-color: #067647;
    color: #ffffff;
}

.guac-toast-error {
    background-color: #dc2626;
    color: #ffffff;
}

/* Content area */
.guac-toast-message {
    flex: 1;
    white-space: normal;
}

/* Close button */
.guac-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 12px;
    opacity: 0.8;
    transition: opacity 0.2s ease,
}

.guac-toast-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

/* ----------------------------- */
/*    Animation  */
/* ----------------------------- */

.guac-toast.slideIn {
    animation: slideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.guac-toast.slideOut {
    animation: slideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateX(120%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(120%) scale(0.95);
    }
}

/* ----------------------------- */
/* Responsive */
/* ----------------------------- */
@media (max-width: 480px) {
    .guac-toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
        transform: none !important;
    }

    .guac-toast {
        padding: 12px 14px;
        font-size: 13px;
    }

    .guac-toast-message {
        font-size: 12px;
    }
}
