/**
 * Sushi Accompaniments - Frontend Styles
 * Version 2.1 - Style natif Orderable
 * Styles minimaux pour s'intégrer au thème
 */

/* ========================================
   STYLES MINIMAUX - INTÉGRATION ORDERABLE
   ======================================== */

/* Container - pas de styles personnalisés, utilise le thème */
.sushi-acc-container {
    margin: 0;
    padding: 0;
}

/* Liste des items */
.sushi-acc-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Item individuel - style liste Orderable */
.sushi-acc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.sushi-acc-item:last-child {
    border-bottom: none;
}

/* Partie gauche avec image et infos */
.sushi-acc-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* Image de l'item (optionnel) */
.sushi-acc-item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
}

.sushi-acc-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Informations de l'item */
.sushi-acc-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.sushi-acc-item-name {
    font-size: 16px;
    font-weight: 500;
    color: inherit;
    margin: 0;
}

.sushi-acc-item-meta {
    font-size: 14px;
    color: #888;
}

.sushi-acc-item-free {
    color: inherit;
}

.sushi-acc-item-price {
    display: none;
}

/* Partie droite avec sélecteur de quantité */
.sushi-acc-item-right {
    flex-shrink: 0;
    margin-left: 16px;
}

/* Sélecteur de quantité - style Orderable */
.sushi-acc-quantity-selector {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 24px;
    padding: 4px;
}

.sushi-acc-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    color: inherit;
    transition: background-color 0.2s;
}

.sushi-acc-qty-btn:hover:not(:disabled) {
    background: rgba(0,0,0,0.05);
}

.sushi-acc-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.sushi-acc-qty-value {
    min-width: 32px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

/* Choix (salée/sucrée) - caché, on sépare en items distincts */
.sushi-acc-item-choice {
    margin-top: 4px;
}

.sushi-acc-choice-select {
    font-size: 14px;
    padding: 6px 28px 6px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Surcoût */
.sushi-acc-item-extra-cost {
    display: none;
    font-size: 14px;
    color: #b8860b;
    font-weight: 500;
    margin-top: 4px;
}

.sushi-acc-item.has-extra-cost .sushi-acc-item-extra-cost {
    display: block;
}

/* Champ caché */
.sushi-acc-hidden-data {
    display: none !important;
}

/* Total suppléments */
.sushi-acc-total {
    display: none;
    padding: 12px 0;
    font-size: 14px;
    color: #b8860b;
    text-align: right;
}

.sushi-acc-total.visible {
    display: block;
}

/* Note en bas (comme "*4 sauces offertes au total") */
.sushi-acc-footer-note {
    padding: 16px 0;
    text-align: right;
    font-size: 14px;
    color: #b8860b;
}

/* ========================================
   INTÉGRATION ORDERABLE DRAWER
   ======================================== */

/* Dans le drawer Orderable */
.orderable-drawer .sushi-acc-container,
.orderable-product--options .sushi-acc-container {
    padding: 0 20px;
}

.orderable-drawer .sushi-acc-item,
.orderable-product--options .sushi-acc-item {
    padding: 16px 0;
}

/* ========================================
   AFFICHAGE PANIER
   ======================================== */

/* Mini cart Orderable */
.orderable-mini-cart .sushi-acc-cart-meta,
.orderable-drawer__cart .sushi-acc-cart-meta {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}

/* Cart WooCommerce classique */
.woocommerce-cart-form .sushi-acc-cart-accompaniments,
.woocommerce-checkout .sushi-acc-cart-accompaniments {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
    .sushi-acc-item {
        padding: 12px 0;
    }

    .sushi-acc-item-image {
        width: 50px;
        height: 50px;
    }

    .sushi-acc-item-name {
        font-size: 15px;
    }

    .sushi-acc-qty-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* ========================================
   VARIATIONS PRODUITS — boutons "pills"
   Remplacement visuel du <select> Orderable
   pour produits variables (ex. Crousty Poulet → sauce)
   ======================================== */
table .orderable-product__option td, table .orderable-product__option th {
    border: 0px solid hsla(0, 0%, 50%, .502);
}
.orderable-product__options select.sushi-acc-pill-replaced {
display: none !important;
}

.orderable-product__options .orderable-product__option-label label {
font-weight: 700 !important;
text-transform: uppercase !important;
font-size: 12px !important;
letter-spacing: 0.8px !important;
color: #555 !important;
}

.orderable-product__options .orderable-product__option-select {
padding-top: 4px !important;
padding-bottom: 4px !important;
}

.sushi-acc-pills {
display: flex !important;
gap: 10px !important;
flex-wrap: wrap !important;
margin: 6px 0 0 0 !important;
padding: 0 !important;
list-style: none !important;
}

/* Spécificité boostée + !important pour battre les styles thème/Elementor */
.orderable-product__options .sushi-acc-pills button.sushi-acc-pill,
.sushi-acc-pills button.sushi-acc-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    min-height: 40px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #2c2c2c !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    font-family: inherit !important;
    user-select: none !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    text-decoration: none !important;
}

.orderable-product__options .sushi-acc-pills button.sushi-acc-pill:hover,
.sushi-acc-pills button.sushi-acc-pill:hover {
    border-color: #999 !important;
    background: #f7f7f7 !important;
    color: #2c2c2c !important;
    transform: translateY(-1px);
}

.orderable-product__options .sushi-acc-pills button.sushi-acc-pill:focus,
.sushi-acc-pills button.sushi-acc-pill:focus {
    outline: none !important;
}

.orderable-product__options .sushi-acc-pills button.sushi-acc-pill:focus-visible,
.sushi-acc-pills button.sushi-acc-pill:focus-visible {
    outline: 2px solid #111 !important;
    outline-offset: 2px !important;
}

.orderable-product__options .sushi-acc-pills button.sushi-acc-pill[aria-pressed="true"],
.sushi-acc-pills button.sushi-acc-pill[aria-pressed="true"] {
    border-color: #111 !important;
    background: #111 !important;
    color: #fff !important;
}

.orderable-product__options .sushi-acc-pills button.sushi-acc-pill[aria-pressed="true"]:hover,
.sushi-acc-pills button.sushi-acc-pill[aria-pressed="true"]:hover {
    border-color: #000 !important;
    background: #000 !important;
    color: #fff !important;
}

@media (max-width: 480px) {
    .orderable-product__options .sushi-acc-pills button.sushi-acc-pill,
    .sushi-acc-pills button.sushi-acc-pill {
        padding: 12px 24px !important;
        font-size: 15px !important;
        min-height: 44px !important;
    }
}
