.coderstation-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coderstation-toast {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #1e293b;
    padding: 0;
    border-radius: 6px;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    font-family: inherit;
    opacity: 0;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.5s ease;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-top: 4px solid transparent;
    min-width: 320px;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.coderstation-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.coderstation-toast:not(.show) {
    transform: translateX(120%);
    opacity: 0;
}

/* The top border dynamically changes color based on the toast type */
.coderstation-toast.success {
    border-color: #28a745;
}

.coderstation-toast.error {
    border-color: #dc3545;
}

.coderstation-toast.warning {
    border-color: #ffc107;
}

.coderstation-toast.info {
    border-color: #17a2b8;
}

.coderstation-toast.loading {
    border-color: #6c757d;
}

.toast-icon-wrapper {
    font-size: 1.5rem;
    margin-top: 2px;
}

.coderstation-toast.success .toast-icon-wrapper {
    color: #28a745;
}

.coderstation-toast.error .toast-icon-wrapper {
    color: #dc3545;
}

.coderstation-toast.warning .toast-icon-wrapper {
    color: #ffc107;
}

.coderstation-toast.info .toast-icon-wrapper {
    color: #17a2b8;
}

.coderstation-toast.loading .toast-icon-wrapper {
    color: #6c757d;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 16px;
    background-color: rgba(248, 250, 252, 0.5);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.toast-body {
    padding: 12px 16px 18px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-body.no-title {
    padding: 16px 16px 20px 16px;
}

.toast-header .toast-icon-wrapper {
    font-size: 1.1rem;
    margin-top: 0;
}

.toast-body .toast-icon-wrapper {
    font-size: 1.5rem;
    margin-top: 2px;
}

.toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    letter-spacing: -0.2px;
}

.toast-message {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Shake Animation for errors */
.coderstation-toast.shake {
    animation: toast-shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes toast-shake {

    10%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    80% {
        transform: translateX(3px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-5px);
    }

    40%,
    60% {
        transform: translateX(5px);
    }
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.15);
    width: 100%;
    transform-origin: left;
    animation: toast-progress linear forwards;
}

.coderstation-toast.success .toast-progress {
    background-color: rgba(40, 167, 69, 0.15);
}

.coderstation-toast.error .toast-progress {
    background-color: rgba(220, 53, 69, 0.15);
}

.coderstation-toast.warning .toast-progress {
    background-color: rgba(255, 193, 7, 0.2);
}

.coderstation-toast.info .toast-progress {
    background-color: rgba(23, 162, 184, 0.15);
}

.coderstation-toast.loading .toast-progress {
    background-color: rgba(108, 117, 125, 0.15);
}

@keyframes toast-progress {
    0% {
        transform: scaleX(1);
    }

    100% {
        transform: scaleX(0);
    }
}