/* ATV Cart Rules – frontend stílusok
 * Konszolidált CSS (korábban három külön wp_head <style> blokk volt:
 * kosárváltó, side cart + ikon, gyűjtőrendelés szállítási opció).
 */

/* ─── Kosárváltó (cart-switcher.php) ──────────────────────────────────── */
.atv-cs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 13px;
}
.atv-cs[hidden] { display: none !important; }
.atv-cs__label {
    color: #888;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.atv-cs .atv-cs__btn {
    background: #e8e8e8 !important;
    border: 1.5px solid #d0d0d0 !important;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #666 !important;
    transition: all .15s;
    white-space: nowrap;
    line-height: 1.4;
}
.atv-cs .atv-cs__btn:not(:disabled):hover {
    background: #d8d8d8 !important;
    border-color: #bbb !important;
    color: #444 !important;
}
.atv-cs .atv-cs__btn--active {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
    font-weight: 600;
}
.atv-cs .atv-cs__btn:disabled { cursor: default; }
.atv-cs__count { opacity: .75; font-size: 11px; }
.atv-cs__active-tag {
    display: inline-block;
    background: rgba(255,255,255,.25);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    padding: 1px 5px;
    margin-left: 4px;
    text-transform: uppercase;
    vertical-align: middle;
}
.atv-cs__goto {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    color: #28a745 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    text-align: right;
}
.atv-cs__goto:hover { text-decoration: underline !important; }

/* ─── Menüsor kosár ikon (side-cart.php / [atv_cart_icon]) ─────────────── */
.atv-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: inherit;       /* örökli a menüsor színét */
    font-size: 26px;      /* alapméret; a size attr / saját CSS felülírja */
    line-height: 1;
    cursor: pointer;
}
.atv-cart-icon svg {
    width: 1em;           /* a font-size-hoz igazodik */
    height: 1em;
    display: block;
    fill: currentColor;   /* örökli a színt */
}
.atv-cart-icon i {
    font-size: 1em;       /* Font Awesome ikon a font-size-hoz igazodik */
    color: currentColor;
    line-height: 1;
}
.atv-cart-icon__badge {
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 18px;
    height: 18px;
    background: #e63946;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    pointer-events: none;
    border: 2px solid #fff;
}

/* ─── Side cart (side-cart.php / [atv_side_cart]) ──────────────────────── */
.atv-side-cart {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #1a1a1a;
}

/* Side cartban a kosárváltó gombok egymás alatt */
.atv-side-cart .atv-cs {
    flex-direction: column;
    align-items: stretch;
}
.atv-side-cart .atv-cs .atv-cs__btn {
    width: 100%;
    text-align: left;
}
/* Side cartban nem kell a "Tovább az aktív kosárhoz" link – a "Kosár megtekintése" gomb pótolja */
.atv-side-cart .atv-cs__goto {
    display: none !important;
}

.atv-sc__items {
    margin-top: 4px;
}
.atv-sc__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}
.atv-sc__thumb {
    flex-shrink: 0;
    width: 64px;
}
.atv-sc__thumb img {
    width: 64px !important;
    height: 64px !important;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}
.atv-sc__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.atv-sc__name,
.atv-sc__name a {
    font-weight: 600;
    color: #1a1a1a !important;
    text-decoration: none !important;
    line-height: 1.4;
    word-break: break-word;
    font-size: 14px;
}
.atv-sc__name a:hover {
    text-decoration: underline !important;
}
.atv-sc__qty-price {
    color: #3a7d3a;
    font-size: 13px;
}
.atv-sc__remove {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50% !important;
    border: 1.5px solid #ccc !important;
    background: transparent !important;
    color: #999 !important;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color .15s, color .15s;
    margin-top: 2px;
    box-shadow: none !important;
}
.atv-sc__remove:hover {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}
.atv-sc__remove:disabled {
    opacity: .4;
    cursor: default;
}
.atv-sc__empty {
    padding: 24px 0;
    color: #888;
    text-align: center;
    margin: 0 !important;
}
.atv-sc__footer {
    padding-top: 16px;
}
.atv-sc__subtotal {
    font-size: 15px;
    margin: 0 0 14px !important;
    text-align: center;
}
.atv-sc__cart-btn {
    display: block !important;
    width: 100%;
    text-align: center;
    background-color: #3a7d3a !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px;
    padding: 12px 0 !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .2s;
    box-sizing: border-box;
}
.atv-sc__cart-btn:hover {
    background-color: #2d622d !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ─── Gyűjtőrendelés szállítási opció kiemelése (combined-orders.php) ──── */
#shipping_method li:has(input[value^="atv_combined_order:"]),
ul.woocommerce-shipping-methods li:has(input[value^="atv_combined_order:"]) {
    background: #eaf7ee;
    border: 1.5px solid #28a745;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 12px;
    list-style: none;
}
#shipping_method li:has(input[value^="atv_combined_order:"]) label,
ul.woocommerce-shipping-methods li:has(input[value^="atv_combined_order:"]) label {
    font-weight: 700;
    color: #1e7e34;
}
.atv-combined-hint {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
    color: #2d622d;
}
/* Kosár oldalon a "Szállítás ide: [cím]" célsor elrejtése – a címet a pénztárnál adja meg a vásárló */
.woocommerce-cart .woocommerce-shipping-destination {
    display: none !important;
}
