/* ============================================================
   SOFTPRESENT — pricing.css
   Stili specifici della pagina Prezzi (template page-pricing).
   Accodato dopo sp-main: qui stanno solo le regole che prima
   erano inline nel template + gli add-on a quantità.
   ============================================================ */

/* ------------------------------------------------------------
   1. ADD-ON A QUANTITÀ
   ------------------------------------------------------------ */
.sp-addon-card--qty { cursor: default; }

.sp-addon-qty-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.sp-addon-qty-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sp-text-light, #6B7280);
}
.sp-addon-qty-select {
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--sp-dark, #0F1117);
    background: #fff;
    border: 2px solid var(--sp-border, #E5E7EB);
    border-radius: 10px;
    padding: 6px 10px;
    min-width: 72px;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.sp-addon-qty-select:hover { border-color: var(--sp-primary, #5B5BD6); }
.sp-addon-qty-select:focus {
    outline: none;
    border-color: var(--sp-primary, #5B5BD6);
    box-shadow: 0 0 0 3px rgba(91, 91, 214, .15);
}
.sp-addon-qty-select:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
    border-color: #e2e8f0;
}
.sp-addon-qty-note {
    font-size: .75rem;
    color: var(--sp-text-light, #6B7280);
}
.sp-addon-qty-note--locked { color: #15803d; font-weight: 600; }

.sp-addon-unit { font-size: .875rem; color: var(--sp-text-light, #6B7280); }
.sp-addon-unit small { font-size: .75rem; }

/* Card qty selezionata: stesso trattamento delle card a checkbox */
.sp-addon-card--qty.sp-addon--selected .sp-addon-check-icon { font-weight: 800; }

/* ------------------------------------------------------------
   2. AVVISI IN PAGINA + BULK + SCROLL HINT
   ------------------------------------------------------------ */
.sp-config-notice {
    margin: 10px 0 4px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.45;
    border: 1px solid transparent;
}
.sp-config-notice--info { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.sp-config-notice--ok   { background: rgba(34,197,94,.12); color: #15803d; border-color: #bbf7d0; }
.sp-config-notice--warn { background: #fffbeb; color: #b45309; border-color: #fcd34d; }

/* Seleziona / Deseleziona tutto */
.sp-config-bulk {
    display: flex;
    gap: 8px;
    margin: 8px 0 4px;
    flex-wrap: wrap;
}
.sp-bulk-btn {
    flex: 1 1 auto;
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--sp-primary, #5B5BD6);
    background: #fff;
    border: 2px solid var(--sp-primary, #5B5BD6);
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.sp-bulk-btn:hover { background: var(--sp-primary, #5B5BD6); color: #fff; }
.sp-bulk-btn:active { transform: translateY(1px); }

/* Riga add-on incluso bloccata nel riepilogo */
.sp-sum-locked { opacity: .7; font-size: .95rem; cursor: help; }

/* Lo scroll hint è cliccabile (porta al carrello) */
#sp-scroll-hint { cursor: pointer; }

/* Add-on non selezionabili finché non si sceglie un piano */
.sp-addons-grid--locked .sp-addon-card {
    opacity: .5;
    filter: grayscale(.7);
    pointer-events: none;
    user-select: none;
}

/* ------------------------------------------------------------
   3. MOBILE SHEET & BAR
   ------------------------------------------------------------ */

/* Backdrop: pointer-events:none di default → non blocca i click */
#sp-mobile-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 1190;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
#sp-mobile-backdrop.sp-backdrop--open { opacity: 1; pointer-events: auto; }

/* Barra mobile: nascosta su desktop */
#sp-mobile-bar { display: none; }

/* Sheet handle + close button: nascosti su desktop */
.sp-mobile-sheet-handle, .sp-sheet-close-btn { display: none; }

@media (max-width: 960px) {
    .sp-configurator { grid-template-columns: 1fr !important; }
    .sp-pricing-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
    .sp-plan-card--highlighted { transform: none !important; }
    .sp-addons-section { padding-bottom: 150px !important; overflow-x: hidden !important; }
    .sp-pricing-section { overflow-x: hidden !important; }

    /* Summary → bottom sheet (rimane nel DOM, scorre su) */
    #sp-price-summary {
        position: fixed !important;
        bottom: 0 !important; left: 0 !important; right: 0 !important;
        grid-column: auto !important; grid-row: auto !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 100dvh !important; overflow-y: auto !important;
        z-index: 1290 !important;
        transform: translateY(110%) !important;
        transition: transform .35s cubic-bezier(.32, 0, .15, 1) !important;
    }
    #sp-price-summary.sp-sheet--open { transform: translateY(0) !important; }

    .sp-mobile-sheet-handle {
        display: block;
        width: 40px; height: 4px;
        background: rgba(255, 255, 255, .2); border-radius: 2px;
        margin: 12px auto 14px;
    }
    .sp-sheet-close-btn {
        display: flex;
        background: rgba(255, 255, 255, .1); border: none;
        width: 32px; height: 32px; border-radius: 50%;
        color: rgba(255, 255, 255, .8); font-size: 1rem;
        cursor: pointer; align-items: center; justify-content: center;
    }

    .sp-price-summary-head {
        display: flex; align-items: center;
        justify-content: space-between;
        margin-bottom: 16px; padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, .12);
    }
    .sp-price-summary-head .sp-price-summary-title { margin: 0; padding: 0; border: none; }

    /* Barra fissa sopra la nav del sito */
    #sp-mobile-bar {
        display: flex !important;
        position: fixed;
        bottom: 68px; left: 0; right: 0;
        z-index: 1190;
        background: #0F1117; color: #fff;
        padding: 13px 20px;
        align-items: center; justify-content: space-between; gap: 12px;
        border-top: 1px solid rgba(255, 255, 255, .12);
        box-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
    }
    .sp-mobile-bar-left { flex: 1; min-width: 0; }
    .sp-mobile-bar-label {
        font-size: .65rem; font-weight: 700; letter-spacing: .08em;
        text-transform: uppercase; color: rgba(255, 255, 255, .4); margin-bottom: 1px;
    }
    .sp-mobile-bar-plan {
        font-size: .875rem; font-weight: 600; color: rgba(255, 255, 255, .85);
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sp-mobile-bar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
    .sp-mobile-bar-total {
        font-size: 1.25rem; font-weight: 800;
        background: linear-gradient(135deg, #5b5bd6, #06b6d4);
        -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    .sp-mobile-bar-btn {
        background: #1B4B8A; border: none; border-radius: 50%;
        width: 36px; height: 36px; cursor: pointer; color: #fff;
        display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
    }
    .sp-q-opt { -webkit-tap-highlight-color: transparent; }
    .sp-addon-card { -webkit-tap-highlight-color: transparent; }
    .sp-addon-qty-select { font-size: 1rem; padding: 8px 12px; }
}