/* ==========================================================================
   Toast notifications — wspólne style (dashboard + landing)
   ========================================================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast-container .toast {
    pointer-events: auto;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    opacity: 1 !important;
    overflow: hidden;
    border: 1px solid transparent;
    color: #1e293b;
    background-color: #ffffff;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid transparent;
    background-color: transparent;
    color: inherit;
}

.toast-header .toast-icon {
    flex-shrink: 0;
    font-size: 1.15rem;
    width: 1.25rem;
    text-align: center;
}

.toast-header .toast-title {
    flex: 1;
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: inherit;
}

.toast-header .btn-close {
    margin: 0;
    padding: 0.5rem;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.toast-header .btn-close:hover {
    opacity: 1;
}

.toast-body {
    padding: 0.75rem 1rem 0.9rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #475569;
    background-color: transparent;
}

/* ── Success ── */
.toast.toast-success {
    border-color: rgba(25, 135, 84, 0.35);
    border-left: 4px solid #198754;
    background-color: #f0fdf4;
    color: #14532d;
}

.toast.toast-success .toast-header {
    background-color: rgba(25, 135, 84, 0.12);
    border-bottom-color: rgba(25, 135, 84, 0.2);
    color: #166534;
}

.toast.toast-success .toast-icon--success {
    color: #198754;
}

.toast.toast-success .toast-body {
    color: #166534;
}

/* ── Error ── */
.toast.toast-error {
    border-color: rgba(220, 53, 69, 0.35);
    border-left: 4px solid #dc3545;
    background-color: #fef2f2;
    color: #7f1d1d;
}

.toast.toast-error .toast-header {
    background-color: rgba(220, 53, 69, 0.12);
    border-bottom-color: rgba(220, 53, 69, 0.2);
    color: #991b1b;
}

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

.toast.toast-error .toast-body {
    color: #991b1b;
}

/* ── Warning ── */
.toast.toast-warning {
    border-color: rgba(255, 193, 7, 0.45);
    border-left: 4px solid #ffc107;
    background-color: #fffbeb;
    color: #78350f;
}

.toast.toast-warning .toast-header {
    background-color: rgba(255, 193, 7, 0.18);
    border-bottom-color: rgba(255, 193, 7, 0.3);
    color: #92400e;
}

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

.toast.toast-warning .toast-body {
    color: #92400e;
}

/* ── Info ── */
.toast.toast-info {
    border-color: rgba(13, 202, 240, 0.35);
    border-left: 4px solid #0dcaf0;
    background-color: #ecfeff;
    color: #164e63;
}

.toast.toast-info .toast-header {
    background-color: rgba(13, 202, 240, 0.12);
    border-bottom-color: rgba(13, 202, 240, 0.2);
    color: #155e75;
}

.toast.toast-info .toast-icon--info {
    color: #0891b2;
}

.toast.toast-info .toast-body {
    color: #155e75;
}

/* ── Animations ── */
.toast.show {
    animation: slideInToast 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.hide {
    animation: slideOutToast 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

/* ── Dark mode (dashboard classic + landing) ── */
[data-color-scheme="dark"] .toast.toast-success {
    background-color: #142820;
    border-color: rgba(52, 211, 153, 0.35);
    border-left-color: #34d399;
    color: #a7f3d0;
}

[data-color-scheme="dark"] .toast.toast-success .toast-header {
    background-color: rgba(52, 211, 153, 0.12);
    border-bottom-color: rgba(52, 211, 153, 0.22);
    color: #6ee7b7;
}

[data-color-scheme="dark"] .toast.toast-success .toast-icon--success {
    color: #34d399;
}

[data-color-scheme="dark"] .toast.toast-success .toast-body {
    color: #a7f3d0;
}

[data-color-scheme="dark"] .toast.toast-error {
    background-color: #2a1518;
    border-color: rgba(248, 113, 113, 0.35);
    border-left-color: #f87171;
    color: #fecaca;
}

[data-color-scheme="dark"] .toast.toast-error .toast-header {
    background-color: rgba(248, 113, 113, 0.14);
    border-bottom-color: rgba(248, 113, 113, 0.25);
    color: #fca5a5;
}

[data-color-scheme="dark"] .toast.toast-error .toast-icon--error {
    color: #f87171;
}

[data-color-scheme="dark"] .toast.toast-error .toast-body {
    color: #fecaca;
}

[data-color-scheme="dark"] .toast.toast-warning {
    background-color: #2a2410;
    border-color: rgba(251, 191, 36, 0.35);
    border-left-color: #fbbf24;
    color: #fde68a;
}

[data-color-scheme="dark"] .toast.toast-warning .toast-header {
    background-color: rgba(251, 191, 36, 0.14);
    border-bottom-color: rgba(251, 191, 36, 0.25);
    color: #fcd34d;
}

[data-color-scheme="dark"] .toast.toast-warning .toast-icon--warning {
    color: #fbbf24;
}

[data-color-scheme="dark"] .toast.toast-warning .toast-body {
    color: #fde68a;
}

[data-color-scheme="dark"] .toast.toast-info {
    background-color: #102a33;
    border-color: rgba(147, 197, 253, 0.35);
    border-left-color: #93c5fd;
    color: #bfdbfe;
}

[data-color-scheme="dark"] .toast.toast-info .toast-header {
    background-color: rgba(147, 197, 253, 0.12);
    border-bottom-color: rgba(147, 197, 253, 0.22);
    color: #93c5fd;
}

[data-color-scheme="dark"] .toast.toast-info .toast-icon--info {
    color: #93c5fd;
}

[data-color-scheme="dark"] .toast.toast-info .toast-body {
    color: #bfdbfe;
}

[data-color-scheme="dark"] .toast .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}
