/**
 * Usługi dodatkowe (product add-ons) — style sekcji na stronie produktu.
 *
 * Markup sekcji nosi klasy utility odziedziczone z projektu źródłowego, ale
 * zbudowany app.css motywu ich nie zawiera (purge Tailwinda nie skanuje
 * functions/woocommerce/), więc WSZYSTKIE potrzebne style są zdefiniowane
 * tutaj wprost, na klasach wl-* i selektorach strukturalnych.
 *
 * @package WebLegend-theme
 */

/* --- Sekcja ------------------------------------------------------------ */

.wl-addons {
    border-top: 1px solid #DADADA;
    padding-top: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
}

.wl-addons-heading {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #404040;
    margin: 0 0 16px;
}

.wl-addons-rows {
    margin-bottom: 16px;
}

.wl-addons-rows > * + * {
    margin-top: 16px;
}

/* --- Wiersz usługi ------------------------------------------------------ */

.wl-addons .wl-variation-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (min-width: 1024px) {
    .wl-addons .wl-variation-row {
        flex-direction: row;
        align-items: center;
    }
}

.wl-addons .wl-variation-row > label {
    width: 100%;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wl-addon-info {
    display: inline-flex;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #9D1600;
}

.wl-addon-info svg {
    width: 16px;
    height: 16px;
}

.wl-addon-select {
    width: 100%;
    max-width: 320px;
    padding: 5px 10px;
    font-size: 14px;
    line-height: 20px;
    border: 1px solid #101010;
    border-radius: 5px;
    background-color: transparent;
}

.wl-addon-select:focus {
    border-color: #9D1600;
    outline: none;
    box-shadow: 0 0 0 1px #9D1600;
}

/* --- Breakdown ceny (element tworzony w JS pod wrapperem .price) -------- */

.wl-addons-breakdown {
    font-size: 14px;
    line-height: 20px;
    color: #4B5563;
    margin-top: 8px;
}

.wl-addons-breakdown.hidden {
    display: none;
}

/* --- Modal informacyjny usługi ------------------------------------------ */

/* Stan bazowy: ukryty (JS przełącza hidden/flex + atrybut [hidden]). */
.wl-addon-modal,
.wl-addon-modal.hidden,
.wl-addon-modal[hidden] {
    display: none;
}

.wl-addon-modal.flex {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.wl-addon-modal-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
}

.wl-addon-modal-panel {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 448px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 5px;
    background: #ffffff;
    padding: 24px;
}

.wl-addon-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #737373;
}

.wl-addon-modal-close:hover {
    color: #262626;
}

.wl-addon-modal-close svg {
    width: 16px;
    height: 16px;
}

.wl-addon-modal-panel h4 {
    font-size: 18px;
    line-height: 28px;
    font-weight: 600;
    color: #171717;
    margin: 0 0 16px;
    padding-right: 32px;
}

.wl-addon-modal-panel img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 16px;
}

.wl-addon-modal-description {
    color: #404040;
    font-size: 14px;
    line-height: 1.6;
}

.wl-addon-modal-description p {
    margin: 0 0 8px;
}

.wl-addon-modal-description p:last-child {
    margin-bottom: 0;
}
