/* WPbase Snackbar Styles */

/* Zajištění, aby byl seznam nad vším a vycentrovaný dole */
.wc-block-components-notice-snackbar-list {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    width: auto !important;
    max-width: 90vw;
    pointer-events: none;
    /* Aby neblokoval kliknutí okolo */
}

/* Flexbox pro vnitřní obal všech snackbarů (skládání pod sebe) */
.wc-block-components-notice-snackbar-list>div {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

/* Styly samotného snackbaru */
.wc-block-components-notice-snackbar-list .wc-block-components-notice-snackbar {
    background-color: #1a1a1a !important;
    /* Tmavé pozadí */
    color: #fff !important;
    border-radius: 50px !important;
    display: flex !important;
    align-items: center;
    padding: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    min-width: 420px !important;
    max-width: 600px !important;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    animation: wpbs_snackbar_slide_up 0.3s ease-out;
    pointer-events: auto;
    /* Snackbar samotný klikatelný je */
    border: none !important;
    margin: 16px 0 0 !important;
}

/* Skrýt původní WooCommerce ikonu (modré íčko) */
.wc-block-components-notice-snackbar-list .wc-block-components-notice-snackbar>svg:first-child {
    display: none !important;
}

/* Progress bar animace zprava doleva */
.wc-block-components-notice-snackbar-list .wc-block-components-notice-snackbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.08);
    /* Světlejší překryv představující zbývající čas */
    z-index: 1;
    animation: wpbs_snackbar_progress 10s linear forwards;
    transform-origin: left;
}

/* Obsah snackbaru */
.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner__content {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
    position: relative;
    font-weight: 400;
    font-size: 16px;
    margin: 0 !important;
}

/* Check ikona před textem */
.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner__content::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234caf50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* Skrytí tlačítka "Vrátit zpět" pokud by tam bylo */
.wc-block-components-notice-snackbar-list .wc-block-components-notice-snackbar__action {
    display: none !important;
}

/* Křížek pro zavření */
.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner>.wc-block-components-button.wc-block-components-notice-banner__dismiss {
    color: #fff !important;
    z-index: 2;
    position: relative;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    margin-left: 15px !important;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    opacity: 0.7;
    transition: opacity 0.2s;
    min-width: 24px;
}

.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner>.wc-block-components-button.wc-block-components-notice-banner__dismiss:hover {
    opacity: 1;
}

.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner>.wc-block-components-button.wc-block-components-notice-banner__dismiss:focus,
.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner>.wc-block-components-button.wc-block-components-notice-banner__dismiss:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.wc-block-components-notice-snackbar-list .wc-block-components-notice-banner>.wc-block-components-button.wc-block-components-notice-banner__dismiss svg {
    fill: currentColor !important;
    width: 24px;
    height: 24px;
}

/* Keyframes pro progress bar - scvrkává se zprava doleva (transform-origin: left, takže pravá strana mizí) */
@keyframes wpbs_snackbar_progress {
    0% {
        transform: scaleX(1);
    }

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

/* Animace zobrazení zespoda */
@keyframes wpbs_snackbar_slide_up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}