/**
 * Style ochrony zestawów promocyjnych (ShavPL - Design System)
 * Zgodne ze style-guide Shav: brak emotikonów, czysta typografia, ostre krawędzie.
 */

/* -----------------------------------------------------------------------------
 * 1. PLAKIETKA W KOSZYKU (NAD CENĄ PRODUKTU)
 * -------------------------------------------------------------------------- */
.product-price-and-subtotal {
    flex-wrap: wrap !important;
    row-gap: 4px !important;
}

.shav-bundle-price-badge-wrap {
    width: 100% !important;
    flex-basis: 100% !important;
    display: flex !important;
    justify-content: flex-start !important;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
}

@media (min-width: 768px) {
    .shav-bundle-price-badge-wrap {
        width: 100% !important;
        flex-basis: auto !important;
        align-self: flex-end !important;
        justify-content: flex-end !important;
        margin: 0 0 2px 0 !important;
    }
}

.shav-bundle-price-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    background: transparent;
    color: #18181b;
    border: 1px solid #18181b;
    border-radius: 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    width: auto !important;
    max-width: max-content !important;
}

/* Wiersz koszyka z zestawem — usunięty czarny border boczny */
.woocommerce-cart-form__cart-item.is-shav-bundle-item {
    position: relative;
    border-left: none !important;
}

/* -----------------------------------------------------------------------------
 * 1B. PRZYCISK PRZEJDŹ DO KASY (CZYSTY CSS - BORDER WCHODZĄCY PŁYNNIE PO KOLEI PO KRAWĘDZIACH)
 * -------------------------------------------------------------------------- */
.wc-proceed-to-checkout .checkout-button {
    position: relative !important;
    border-radius: 6px !important;
    border: none !important;
    background-color: #AC0000 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 52px !important;
    padding: 14px 20px !important;
    text-decoration: none !important;
    font-family: 'bebas-neue-pro', 'Roboto', sans-serif !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    overflow: visible !important;
    transition: background-color 0.2s ease, transform 0.15s ease !important;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background-color: #960000 !important;
}

.wc-proceed-to-checkout .checkout-button .checkout-button-text,
.wc-proceed-to-checkout .checkout-button span,
.wc-proceed-to-checkout .checkout-button > * {
    position: relative !important;
    z-index: 2 !important;
    color: #ffffff !important;
    display: inline-block !important;
}

/* ::before rysuje górną (lewo -> prawo) oraz prawą krawędź (góra -> dół) */
.wc-proceed-to-checkout .checkout-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 6px !important;
    border-top: 3px solid #000000 !important;
    border-right: 3px solid #000000 !important;
    border-bottom: 3px solid transparent !important;
    border-left: 3px solid transparent !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    z-index: 5 !important;
    opacity: 0 !important;
    transition: 
        opacity 0.2s ease,
        height 0.12s ease-out,
        width 0.12s ease-out 0.12s !important;
}

/* ::after rysuje dolną (prawo -> lewo) oraz lewą krawędź (dół -> góra) */
.wc-proceed-to-checkout .checkout-button::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 0 !important;
    height: 0 !important;
    border-radius: 6px !important;
    border-bottom: 3px solid #000000 !important;
    border-left: 3px solid #000000 !important;
    border-top: 3px solid transparent !important;
    border-right: 3px solid transparent !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
    z-index: 5 !important;
    opacity: 0 !important;
    transition: 
        opacity 0.2s ease,
        height 0.12s ease-out 0.24s,
        width 0.12s ease-out 0.36s !important;
}

@media (hover: hover) {
    .wc-proceed-to-checkout .checkout-button:hover::before {
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        transition: 
            opacity 0.05s ease,
            width 0.16s ease-out,
            height 0.16s ease-out 0.16s !important;
    }

    .wc-proceed-to-checkout .checkout-button:hover::after {
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        transition: 
            opacity 0.05s ease 0.32s,
            width 0.16s ease-out 0.32s,
            height 0.16s ease-out 0.48s !important;
    }
}

/* -----------------------------------------------------------------------------
 * 2. MODAL POTWIERDZENIA PRZY PRÓBIE USUNIĘCIA ELEMENTU ZESTAWU
 * -------------------------------------------------------------------------- */
.shav-bundle-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 9, 11, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.shav-bundle-confirm-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.shav-bundle-confirm-overlay[hidden] {
    display: none !important;
}

.shav-bundle-confirm-dialog {
    position: relative;
    width: 520px;
    max-width: 100%;
    background: #FAFAFA;
    border: 1px solid #18181b;
    border-radius: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 36px 32px 32px;
    box-sizing: border-box;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.shav-bundle-confirm-overlay.is-active .shav-bundle-confirm-dialog {
    transform: translateY(0) scale(1);
}

/* Przycisk zamknięcia (krzyżyk) */
.shav-bundle-confirm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #18181b;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.shav-bundle-confirm-close:hover {
    opacity: 0.6;
    transform: scale(1.05);
}

/* Zawartość okna */
.shav-bundle-confirm-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.shav-bundle-confirm-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: transparent;
    color: #ac0000;
    border: 1px solid #ac0000;
    border-radius: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.shav-bundle-confirm-title {
    font-family: 'bebas-neue-pro', 'Roboto', sans-serif;
    font-size: 26px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #18181b;
    margin: 0 0 14px 0;
    text-transform: uppercase;
}

.shav-bundle-confirm-message {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #3f3f47;
    margin: 0 0 24px 0;
}

.shav-bundle-confirm-message strong {
    color: #18181b;
    font-weight: 600;
}

/* Przyciski akcji */
.shav-bundle-confirm-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

/* Przycisk główny: zachowaj zestaw */
.shav-bundle-btn--keep {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background: #18181b;
    color: #FFFFFF !important;
    border: 1px solid #18181b;
    border-radius: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.shav-bundle-btn--keep:hover {
    background: #27272a;
    color: #FFFFFF !important;
}

/* Przycisk podrzędny: usuń mimo to */
.shav-bundle-btn--remove {
    display: inline-block;
    background: transparent;
    border: none;
    padding: 8px 0;
    color: #71717b;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    transition: color 0.2s ease;
}

.shav-bundle-btn--remove:hover {
    color: #ac0000;
}

/* -----------------------------------------------------------------------------
 * 3. RWD (MOBILE)
 * -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .shav-bundle-confirm-dialog {
        padding: 28px 20px 24px;
    }

    .shav-bundle-confirm-title {
        font-size: 22px;
    }

    .shav-bundle-confirm-message {
        font-size: 13px;
    }

    .shav-bundle-btn--keep {
        padding: 14px 18px;
        font-size: 12px;
    }
}
