/* ==========================================================================
   ALERT.CSS - System powiadomień i komunikatów WooCommerce (Błędy, Info, Sukces)
   ========================================================================== */

/* =========================================
   1. GŁÓWNE KONTENERY
   ========================================= */

.woocommerce-notices-wrapper {
    max-width: 1300px;
    margin: 20px auto 0 auto;
}

.woocommerce-NoticeGroup {
    margin-bottom: 30px;
    width: 100%;
}

/* Wspólny szkielet dla wszystkich 3 typów alertów */
.woocommerce-error, 
.woocommerce-info, 
.woocommerce-message {
    background: #fff !important; 
    color: var(--textMain) !important;
    padding: 20px 20px 20px 50px !important; 
    position: relative;
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); 
    list-style: none !important; 
    border: none !important; 
    border-left-width: 5px !important; 
    border-left-style: solid !important;
    line-height: 1.5;
    font-size: 0.95rem;
    max-width: 1225.2px;
    margin: auto;
}


/* =========================================
   2. KOMUNIKATY O BŁĘDZIE (Czerwone)
   ========================================= */

.woocommerce-error {
    border-left-color: #ff4757 !important; 
}

/* Ikona błędu (!) */
.woocommerce-error::before {
    content: "!" !important;
    font-family: sans-serif !important;
    color: #ff4757;
    position: absolute;
    top: 20px;
    left: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Wypunktowanie szczegółów błędu */
.woocommerce-error li {
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
}

.woocommerce-error li a {
    color: black !important;
    text-decoration: none !important;
    transition: ease-in-out 0.2s;
}

.woocommerce-error li a:hover {
    color: #ff4757 !important;
}


/* =========================================
   3. KOMUNIKATY INFORMACYJNE (Niebieskie)
   ========================================= */

.woocommerce-info {
    border-left-color: var(--leadTheme) !important; 
}

/* Ikona info (i) */
.woocommerce-info::before {
    content: "i" !important;
    font-family: sans-serif !important; 
    color: var(--leadTheme);
    position: absolute;
    top: 20px;
    left: 20px;
    font-weight: bold;
    border: 2px solid var(--leadTheme);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Link tekstowy, np. "Masz kupon? Kliknij tutaj" */
.woocommerce-info .showcoupon {
    float: right;
    color: var(--leadTheme);
    text-decoration: underline;
    font-weight: 600;
}


/* =========================================
   4. KOMUNIKATY SUKCESU (Zielone)
   ========================================= */

.woocommerce-message {
    border-left-color: #46b450 !important; 
}

/* Ikona sukcesu (✔) */
.woocommerce-message::before {
    content: "✔" !important;
    font-family: sans-serif !important;
    color: #46b450;
    position: absolute;
    top: 20px;
    left: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Przycisk np. "Zobacz koszyk" */
.woocommerce-message .button {
    float: right;
    background: transparent !important;
    color: #46b450 !important;
    border: 1px solid #46b450 !important;
    padding: 5px 15px !important;
    margin-top: -5px; 
    font-weight: 600;
    border-radius: 4px;
    transition: 0.3s;
}

.woocommerce-message .button:hover {
    background: #46b450 !important;
    color: #fff !important;
}

/* Przycisk "Cofnij" usunięcie z koszyka */
.woocommerce-message .restore-item {
    float: right; 
    background: transparent !important;
    color: #46b450 !important; 
    border: 1px solid #46b450 !important;
    padding: 6px 16px !important;
    margin-top: -5px; 
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 6px;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.woocommerce-message .restore-item:hover {
    background: #46b450 !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(70, 180, 80, 0.2);
    transform: translateY(-1px);
}


/* =========================================
   5. RESPONSYWNOŚĆ (MOBILE)
   ========================================= */

@media (max-width: 600px) {
    /* Zmniejszenie lewego odstępu dla małych ekranów */
    .woocommerce-error, 
    .woocommerce-info, 
    .woocommerce-message {
        padding: 15px 15px 15px 40px !important; 
    }
    
    /* Zrzucenie przycisków i linków pod główny tekst alertu */
    .woocommerce-message .button,
    .woocommerce-info .showcoupon,
    .woocommerce-message .restore-item {
        float: none;
        display: inline-block;
        margin-top: 15px;
        text-align: left;
    }
}


/* ==========================================================================
   POPUP PO DODANIU PRODUKTU DO KOSZYKA (Z KAFELKA)
   ========================================================================== */

.atc-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.atc-popup-overlay.open {
    opacity: 1;
    visibility: visible;
}

.atc-popup {
    background: #fff;
    border-radius: 14px;
    padding: 32px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.25s ease;
}

.atc-popup-overlay.open .atc-popup {
    transform: translateY(0) scale(1);
}

.atc-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f3f3f3;
    color: #999;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.atc-popup-close:hover {
    background: #ffe3e6;
    color: #ff4757;
}

.atc-popup-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5fd97a, #2e9e4f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.atc-popup-check svg {
    width: 26px;
    height: 26px;
}

.atc-popup-heading {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--textMain);
    margin: 0 0 20px;
}

.atc-popup-product {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    background: #fafafa;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 24px;
}

.atc-popup-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.atc-popup-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.atc-popup-info {
    flex-grow: 1;
    min-width: 0;
}

.atc-popup-title {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--textMain);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atc-popup-price {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--textMain);
}

.atc-popup-price del {
    opacity: 0.6;
    font-weight: 400;
    font-size: 0.85em;
    margin-right: 6px;
}

.atc-popup-price ins {
    text-decoration: none;
}

.atc-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atc-popup-continue {
    background: #fff;
    border: 1px solid var(--borderColor);
    color: var(--textMain);
    border-radius: 8px;
    padding: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.atc-popup-continue:hover {
    border-color: var(--leadTheme);
    background: rgba(78, 210, 250, 0.06);
}

.atc-popup-cart {
    display: block;
    background: linear-gradient(135deg, var(--leadTheme) 0%, var(--leadThemeDark) 100%);
    color: #fff !important;
    border-radius: 8px;
    padding: 13px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none !important;
    text-align: center;
    box-shadow: 0 8px 18px rgba(78, 210, 250, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.atc-popup-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(78, 210, 250, 0.45);
}

@media (max-width: 480px) {
    .atc-popup {
        padding: 24px 20px;
    }
}