/* ================================================================
   FlashMac Configurator — fmc2-frontend.css
   ================================================================ */

/* ---- Contenitore principale ---- */
/* Bordo gradiente via background-clip: nessun ::before, nessun z-index conflict. */
.fmc2-configurator {
    position: relative;
    margin: 24px 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background-image: linear-gradient(white, white),
                      linear-gradient(135deg, #f5956f, #EB3F93, #7e49f2);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    overflow: hidden;
    transition: filter 0.3s ease;
}
.fmc2-configurator:hover {
    filter: drop-shadow(0 0 8px rgba(235, 63, 147, 0.3))
            drop-shadow(0 0 16px rgba(245, 149, 111, 0.15));
}

/* ---- Accordion header ---- */
.fmc2-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    user-select: none;
    border-radius: 10px;
    transition: background .15s, box-shadow .2s;
    box-shadow: 0 0 14px rgba(235, 63, 147, 0.2),
                0 0 28px rgba(245, 149, 111, 0.1);
}
.fmc2-accordion-header:hover {
    background: rgba(0, 0, 0, .02);
}
.fmc2-accordion-header.is-open {
    border-bottom: 1px solid #f0f0f0;
    border-radius: 10px 10px 0 0;
}
.fmc2-open .fmc2-accordion-header {
    box-shadow: 0 0 16px rgba(235, 63, 147, 0.25);
}

.fmc2-title {
    transition: box-shadow 0.3s ease, background 0.3s ease;
}
.fmc2-title:hover {
    background: linear-gradient(135deg,
        rgba(245, 149, 111, 0.06),
        rgba(235, 63, 147, 0.06),
        rgba(126, 73, 242, 0.06));
    box-shadow: inset 0 0 20px rgba(235, 63, 147, 0.1);
}

.fmc2-accordion-chevron {
    display: inline-block;
    font-size: 13px;
    color: #aaa;
    transition: transform .25s ease;
}
.fmc2-accordion-header.is-open .fmc2-accordion-chevron {
    transform: rotate(180deg);
}

/* ---- Accordion body — smooth max-height transition ---- */
.fmc2-accordion-body {
    overflow: hidden;
    max-height: 3000px;
    transition: max-height .35s ease;
}
.fmc2-accordion-body.is-hidden {
    max-height: 0;
}

/* ---- Gruppo ---- */
.fmc2-group {
    border-bottom: 1px solid #f0f0f0;
}
.fmc2-group:last-of-type {
    border-bottom: none;
}
.fmc2-group__header {
    padding: 12px 20px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #bbb;
}

/* ---- Categoria ---- */
.fmc2-category {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.fmc2-category:last-child {
    border-bottom: none;
}

.fmc2-category__label {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
}

/* ---- Riga select + prezzo ---- */
.fmc2-select-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fmc2-select {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s;
    appearance: auto;
}
.fmc2-select:focus {
    outline: none;
    border-color: #e91e8c;
}

.fmc2-select-price {
    min-width: 65px;
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    color: inherit;
}
.fmc2-select-price--sub {
    color: #1a7a1a;
}

/* ---- Checkbox nascosti (motore JS) ---- */
.fmc2-options--hidden {
    display: none;
}

/* ---- Summary ---- */
.fmc2-summary {
    margin: 0 20px 16px;
    font-size: 14px;
}

.fmc2-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    color: #444;
}

.fmc2-summary__total {
    border-top: 1px solid #e8e8e8;
    margin-top: 8px;
    padding-top: 10px;
    font-size: 15px;
    color: #1d1d1f;
}
.fmc2-summary__total strong {
    font-size: 16px;
    font-weight: 700;
}

.fmc2-summary__forced {
    margin-top: 10px;
    padding: 8px 12px;
    background: #EAF3DE;
    border-radius: 6px;
    font-size: 12px;
    color: #27500A;
    line-height: 1.6;
}

/* ---- Notice modifica configurazione ---- */
.fmc2-edit-notice {
    background: #E6F1FB;
    border: 1px solid #a0c4f4;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #185FA5;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ---- Link "Modifica" nel carrello ---- */
.fmc2-edit-link {
    display: inline-block;
    font-size: 12px;
    color: #185FA5 !important;
    text-decoration: none !important;
    margin-left: 8px;
    font-weight: 500;
}
.fmc2-edit-link:hover {
    text-decoration: underline !important;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .fmc2-accordion-header,
    .fmc2-category {
        padding-left: 16px;
        padding-right: 16px;
    }
    .fmc2-summary {
        margin-left: 16px;
        margin-right: 16px;
    }
    .fmc2-select-row {
        flex-wrap: wrap;
    }
    .fmc2-select-price {
        min-width: auto;
    }
}
