/* Komunikaty w rogu ekranu (toastr, np. kod rabatowy, formularz kontaktowy, koszyk): biała karta jak w nowym wyglądzie,
   ikona w kwadracie w kolorze wariantu, krzyżyk zawsze widoczny, pasek czasu na dole.
   Jedyny arkusz komunikatów (CSS biblioteki toastr nie jest ładowany); w layout.html po stylach legacy. Opcje toastr (closeButton) w layout.html. */

/* podstawa z toastr.min.css (biblioteki już nie ładujemy, jej kolory i ikony PNG zastępuje ten plik) */
#toast-container {
    position: fixed;
    z-index: 999999;
    top: 90px; /* pod przyklejonym menu (75 px), żeby nie zasłaniać koszyka, Panelu i Poczty */
    right: 20px;
    pointer-events: none;
}

#toast-container * {
    box-sizing: border-box;
}

#toast-container > div.toast {
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
}

#toast-container .toast-message {
    overflow-wrap: break-word;
}

#toast-container .toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
}

#toast-container button.toast-close-button {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#toast-container > div.toast {
    --toast-bg: var(--h24-active-bg);
    --toast-fg: var(--h24-brand);
    display: flex;
    align-items: center;
    gap: 14px;
    width: 360px;
    min-height: 0;
    margin: 0 0 10px;
    padding: 14px 44px 16px 14px;
    border: 1px solid var(--h24-divider);
    border-radius: var(--h24-radius);
    background: #fff none !important; /* toastr: kolorowe tło i ikona PNG */
    box-shadow: var(--h24-shadow-hover) !important;
    color: var(--h24-heading);
    font-family: 'Comfortaa', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    opacity: 1;
    animation: h24-toast-in .25s ease;
}

#toast-container > div.toast:hover {
    box-shadow: var(--h24-shadow-hover) !important;
    opacity: 1;
}

/* ikona w kwadracie (Font Awesome 5 Pro Light) */
#toast-container > div.toast::before {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--toast-bg);
    color: var(--toast-fg);
    font-family: "Font Awesome 5 Pro";
    font-size: 18px;
    font-weight: 300;
    content: "\f05a";
}

#toast-container > div.toast-success { --toast-bg: var(--h24-tag-bg); --toast-fg: var(--h24-tag-text); }
#toast-container > div.toast-success::before { content: "\f058"; }

#toast-container > div.toast-error { --toast-bg: #fde8e7; --toast-fg: #c42b1c; }
#toast-container > div.toast-error::before { content: "\f06a"; }

#toast-container > div.toast-warning { --toast-bg: var(--h24-pink-bg); --toast-fg: #b02f9b; }
#toast-container > div.toast-warning::before { content: "\f071"; }

#toast-container > div.toast-info { --toast-bg: var(--h24-blue-bg); --toast-fg: var(--h24-blue); }

#toast-container .toast-title {
    font-weight: 700;
}

#toast-container .toast-message {
    flex: 1;
    min-width: 0;
}

/* krzyżyk w prawym górnym rogu, zawsze widoczny */
#toast-container button.toast-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    border-radius: 8px;
    color: var(--h24-text);
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
    opacity: 1;
    transition: background var(--h24-transition), color var(--h24-transition);
}

#toast-container button.toast-close-button:hover,
#toast-container button.toast-close-button:focus-visible {
    background: var(--h24-hover-bg);
    color: var(--h24-heading);
    opacity: 1;
}

#toast-container button.toast-close-button:focus-visible {
    outline: 2px solid var(--h24-brand);
    outline-offset: 1px;
}

/* pasek upływu czasu w kolorze wariantu */
#toast-container .toast-progress {
    height: 3px;
    background: var(--toast-fg);
    opacity: .6;
}

@keyframes h24-toast-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    #toast-container > div.toast { animation: none; }
}

/* telefon: na całą szerokość z marginesem 16 px */
@media (max-width: 600px) {
    #toast-container {
        top: 80px;
        right: 16px;
        left: 16px;
    }

    #toast-container > div.toast {
        width: 100%;
    }
}
