/* ==========================================================================
   TOAST
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    width: 300px;
    box-shadow: var(--shadow);
    /* Hide off-screen with a height-independent transform (works regardless of how
       tall the toast grows — e.g. when it includes the PRO action button). The extra
       2rem clears the bottom gap so no part peeks above the viewport edge. */
    transform: translateY(calc(100% + 2rem));
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    z-index: 9999999999;
}

.toast.show {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.3s ease, visibility 0s;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-content .dashicons {
    color: var(--success);
    font-size: 1.25rem;
}

.toast-message {
    flex: 1;
}

.toast-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-description {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.toast-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.6rem;
    padding: 0.32rem 0.75rem;
    background: linear-gradient(to right, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(180, 83, 9, 0.25);
    transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.toast-action .dashicons {
    /* Override .toast-content .dashicons (which is green) — inherit the button's white. */
    color: inherit;
    font-size: 0.95rem;
    width: auto;
    height: auto;
    transition: transform 0.2s ease;
}

.toast-action:hover {
    filter: brightness(1.06);
    box-shadow: 0 3px 10px rgba(180, 83, 9, 0.35);
    color: #fff;
}

.toast-action:hover .dashicons {
    transform: translateX(3px);
}

.toast-progress {
    height: 3px;
    background-color: var(--primary);
    width: 100%;
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    border-radius: 0 0 var(--radius) var(--radius);
}

.toast.show .toast-progress {
    animation: progress 3s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}