/* Komunikaty powiadomień */
.woocommerce-notices-wrapper {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.woocommerce-message,
.wc-block-components-notice-banner.is-success {
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px 20px 20px; /* Zwiększony padding-bottom dla paska */
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    animation: slideUp 0.5s ease-out;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
    outline: none;
    cursor: default;
}

.woocommerce-error,
.wc-block-components-notice-banner.is-error {
    background-color: #FF7979;
    color: white;
    padding: 15px 20px 20px 20px; /* Zwiększony padding-bottom dla paska */
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    animation: slideUp 0.5s ease-out;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
    outline: none;
    cursor: default;
}

.woocommerce-info,
.wc-block-components-notice-banner.is-info {
    background-color: #3498db;
    color: white;
    padding: 15px 20px 20px 20px; /* Zwiększony padding-bottom dla paska */
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    animation: slideUp 0.5s ease-out;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
    outline: none;
    cursor: default;
}

/* Style dla nowych klas WooCommerce - ukryj domyślne ikony SVG */
.wc-block-components-notice-banner svg {
    display: none;
}

/* Dopasuj content nowych komunikatów */
.wc-block-components-notice-banner__content {
    width: 100%;
    text-align: center;
}

/* Ukryj domyślny tekst "Znaleziono następujące problemy" */
.wc-block-components-notice-banner__summary {
    display: none;
}

/* Ukryj listę błędów i wyświetl jako zwykły tekst */
.wc-block-components-notice-banner__content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wc-block-components-notice-banner__content ul li {
    display: inline;
}

.wc-block-components-notice-banner__content ul li:not(:last-child)::after {
    content: " ";
}

/* Pasek progress dla komunikatów - dodane nowe klasy */
.woocommerce-message::after,
.woocommerce-error::after,
.woocommerce-info::after,
.wc-block-components-notice-banner::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.4);
    transform-origin: left;
    animation: countdown 3.5s linear forwards;
    animation-play-state: running;
}

/* Hover - zatrzymanie animacji paska i dodanie efektu wizualnego */
.woocommerce-message:hover,
.woocommerce-error:hover,
.woocommerce-info:hover,
.wc-block-components-notice-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.woocommerce-message:hover::after,
.woocommerce-error:hover::after,
.woocommerce-info:hover::after,
.wc-block-components-notice-banner:hover::after {
    animation-play-state: paused;
}

/* Animacja paska progress */
@keyframes countdown {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Animacja znikania dla wrapper */
.woocommerce-notices-wrapper.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

/* Animacja znikania dla pojedynczych komunikatów - dodane nowe klasy */
.woocommerce-message.fade-out,
.woocommerce-error.fade-out,
.woocommerce-info.fade-out,
.wc-block-components-notice-banner.fade-out {
    animation: slideDown 0.5s ease-in-out forwards;
}

/* Zatrzymaj animację paska gdy komunikat znika - dodane nowe klasy */
.woocommerce-message.fade-out::after,
.woocommerce-error.fade-out::after,
.woocommerce-info.fade-out::after,
.wc-block-components-notice-banner.fade-out::after {
    animation-play-state: paused;
}

/* Style dla komunikatów pozycjonowanych poza wrapper - dodane nowe klasy */
.woocommerce-message.positioned,
.woocommerce-error.positioned,
.woocommerce-info.positioned,
.wc-block-components-notice-banner.positioned {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 500px;
    width: 90%;
}

.wc-block-components-notice-banner__content ul li:not(:first-child) {
    display: none;
}

/* Responsywność - dodane nowe klasy */
@media (max-width: 768px) {
    .woocommerce-notices-wrapper {
        width: 95%;
        bottom: 15px;
    }
    
    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info,
    .wc-block-components-notice-banner {
        padding: 12px 15px 18px 15px; /* Dostosowany padding dla mobile */
        font-size: 13px;
    }
    
    .woocommerce-message.positioned,
    .woocommerce-error.positioned,
    .woocommerce-info.positioned,
    .wc-block-components-notice-banner.positioned {
        width: 95%;
        bottom: 15px;
    }
}
