/**
 * WCS Blocks Styles - Stili per le opzioni spedizione nel carrello a blocchi
 *
 * @since 1.09
 */

/* Container principale */
.wcs-blocks-shipping-options {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Accordion styles */
.wcs-blocks-accordions {
    margin-bottom: 16px;
}

.wcs-blocks-accordion {
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.wcs-blocks-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    transition: background 0.2s ease;
}

.wcs-blocks-accordion-header:hover {
    background: #f5f5f5;
}

.wcs-blocks-accordion-icon {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.wcs-blocks-accordion-content {
    padding: 12px 16px;
    background: #fafafa;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    border-top: 1px solid #e0e0e0;
}

/* Messaggio vacanze */
.wcs-blocks-vacation-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

/* Titolo sezione */
.wcs-blocks-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 16px;
    text-align: center;
    color: #333;
}

/* Container opzioni */
.wcs-blocks-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

/* Singolo pulsante opzione */
.wcs-blocks-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #ffffff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    text-align: left;
}

.wcs-blocks-option:hover {
    border-color: #2196F3;
    background: #f5f9ff;
}

.wcs-blocks-option.active {
    border-color: #2196F3;
    background: #e3f2fd;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.wcs-blocks-option:focus {
    outline: none;
    border-color: #2196F3;
}

/* Data nel pulsante */
.wcs-blocks-date {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wcs-blocks-day {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.wcs-blocks-month {
    font-size: 16px;
    color: #666;
    text-transform: capitalize;
}

/* Badge sconto */
.wcs-blocks-discount {
    background: #ff4081;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Label tariffa ordinaria */
.wcs-blocks-label {
    color: #666;
    font-size: 13px;
    padding: 6px 14px;
    background: #f0f0f0;
    border-radius: 20px;
}

/* Sezione ritiro in negozio */
.wcs-blocks-pickup {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.wcs-blocks-pickup-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    justify-content: center;
}

.wcs-blocks-pickup-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2196F3;
}

.wcs-blocks-shipping-cost {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.wcs-blocks-shipping-cost.wcs-pickup-active {
    color: #28a745;
    font-weight: 500;
}

/* Responsive - tablet */
@media (min-width: 600px) {
    .wcs-blocks-options {
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }

    .wcs-blocks-option {
        flex: 0 1 auto;
        min-width: 100px;
        max-width: 120px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 16px 12px;
    }

    .wcs-blocks-date {
        flex-direction: column;
        gap: 2px;
        align-items: center;
    }

    .wcs-blocks-day {
        font-size: 28px;
    }

    .wcs-blocks-month {
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wcs-blocks-shipping-options {
        background: #2d2d2d;
        border-color: #444;
    }

    .wcs-blocks-title {
        color: #e0e0e0;
    }

    .wcs-blocks-option {
        background: #3d3d3d;
        border-color: #555;
        color: #e0e0e0;
    }

    .wcs-blocks-option:hover {
        background: #4a4a4a;
    }

    .wcs-blocks-option.active {
        background: #1e3a5f;
        border-color: #2196F3;
    }

    .wcs-blocks-day {
        color: #e0e0e0;
    }

    .wcs-blocks-month {
        color: #aaa;
    }

    .wcs-blocks-pickup {
        border-color: #444;
    }

    .wcs-blocks-pickup-label {
        color: #e0e0e0;
    }

    .wcs-blocks-shipping-cost {
        color: #aaa;
    }

    /* Accordion dark mode */
    .wcs-blocks-accordion {
        border-color: #444;
    }

    .wcs-blocks-accordion-header {
        background: #3d3d3d;
        color: #e0e0e0;
    }

    .wcs-blocks-accordion-header:hover {
        background: #4a4a4a;
    }

    .wcs-blocks-accordion-icon {
        color: #aaa;
    }

    .wcs-blocks-accordion-content {
        background: #2d2d2d;
        color: #ccc;
        border-color: #444;
    }
}

/* ============================================
   NASCONDI ELEMENTI WOOCOMMERCE NATIVI
   ============================================ */

/* Nascondi il metodo spedizione WooCommerce nativo (Spedizione GRATUITO) */
.wc-block-components-totals-shipping,
.wp-block-woocommerce-cart-order-summary-shipping-block {
    display: none !important;
}

/* Nascondi i prezzi del prodotto nel carrello (già mostrati altrove) */
.wc-block-cart-item__prices {
    display: none !important;
}

/* Nascondi la riga subtotale duplicata se necessario */
/* .wc-block-components-totals-item.wc-block-components-totals-subtotal {
    display: none !important;
} */
