/* tk-print-studio — Configuratore v3.5.0
   Layout a due colonne: opzioni a sinistra, preventivo che segue a destra. */

.tkps-cfg {
    /* v3.7.1 - stessa identita del sito: azzurro di stampa (Print Studio),
       navy profondo, magenta CMYK riservato al richiamo all azione. */
    --cfg-blu:    #0369a1;   /* leggibile: contrasto 5.93 su bianco */
    --cfg-navy:   #0f172a;
    --cfg-verde:  #d6106f;   /* magenta CTA accessibile: 5.04 */
    --cfg-bordo:  #d9dee5;
    --cfg-grigio: #f4f6f8;
    --cfg-testo:  #1c2530;
    --cfg-tenue:  #6b7785;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 0 40px;
    color: var(--cfg-testo);
    font-size: 15px;
    line-height: 1.5;
}

.tkps-cfg-head h2 { margin: 0 0 4px; font-size: 26px; font-weight: 700; }
.tkps-cfg-sub { margin: 0 0 4px; color: var(--cfg-tenue); font-size: 14px; }

.tkps-cfg-gruppo { padding: 22px 0; border-bottom: 1px solid var(--cfg-bordo); }
.tkps-cfg-gruppo:last-child { border-bottom: 0; }
.tkps-cfg-gruppo h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}

/* Tooltip: stessa idea delle nuvolette admin, adattata al front */
.tkps-cfg-aiuto {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--cfg-blu);
    color: #fff;
    font-size: 11px; font-style: normal; font-weight: 700;
    line-height: 1; text-align: center;
    cursor: help; flex: none;
    vertical-align: middle;
}
.tkps-cfg-bolla {
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    width: max-content; max-width: 260px;
    padding: 9px 12px;
    background: #1c2530; color: #fff;
    border-radius: 6px;
    font-size: 12px; font-style: normal; font-weight: 400; line-height: 1.5;
    text-align: left;
    opacity: 0; visibility: hidden;
    transition: opacity .15s;
    z-index: 20;
}
.tkps-cfg-bolla::after {
    content: ""; position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: #1c2530;
}
.tkps-cfg-aiuto:hover .tkps-cfg-bolla,
.tkps-cfg-aiuto:focus .tkps-cfg-bolla { opacity: 1; visibility: visible; }

/* Card opzione */
.tkps-cfg-cards { display: flex; flex-wrap: wrap; gap: 14px; }
.tkps-cfg-card {
    position: relative;          /* per la spunta d angolo */
    width: 150px;
    padding: 0 0 10px;
    background: #fff;
    border: 2px solid var(--cfg-bordo);
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, box-shadow .15s;
    font: inherit; color: inherit;
    overflow: hidden;
}
.tkps-cfg-card:hover { border-color: var(--cfg-accent-2, #0ea5e9); }
.tkps-cfg-card.is-scelta { border-color: var(--cfg-blu); background: var(--cfg-accent-l, #f0f9ff); }

/* Spunta nell angolo, come Pixart (in tinta brand, non verde) */
.tkps-cfg-card-check {
    position: absolute; top: 0; right: 0;
    width: 26px; height: 26px;
    display: none; align-items: center; justify-content: center;
    background: var(--cfg-blu); color: #fff;
    font-size: 14px; font-weight: 900;
    border-bottom-left-radius: 8px;
    z-index: 2;
}
.tkps-cfg-card.is-scelta .tkps-cfg-card-check { display: flex; }

.tkps-cfg-card-img {
    display: flex; align-items: center; justify-content: center;
    height: 104px;
    background: var(--cfg-grigio);
    border-bottom: 1px solid var(--cfg-bordo);
    overflow: hidden;
}
.tkps-cfg-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tkps-cfg-card-ph {
    display: block; width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, #eef1f5 0 8px, #e6eaf0 8px 16px);
}
/* Anteprima proporzionale del formato: un foglio bianco in scala */
.tkps-cfg-card-foglio {
    display: block;
    max-width: 62%; max-height: 78%;
    width: auto; height: 78%;
    background: #fff;
    border: 1px solid var(--cfg-bordo);
    box-shadow: 0 2px 6px rgba(15,23,42,.14);
}
.tkps-cfg-card.is-scelta .tkps-cfg-card-img { background: #eaf6fd; }
.tkps-cfg-card-lab { display: block; padding: 9px 10px 0; font-size: 13px; font-weight: 700; color: var(--cfg-navy); }
.tkps-cfg-card-nota { display: block; padding: 2px 10px 0; font-size: 11px; color: var(--cfg-tenue); }
.tkps-cfg-card-delta { display: block; padding: 3px 10px 0; font-size: 11px; font-weight: 700; color: var(--cfg-testo); }

/* "Vedi tutto" per i gruppi con molte scelte (es. Formato) */
.tkps-cfg-card-extra { display: none; }
.tkps-cfg-cards.is-aperto .tkps-cfg-card-extra { display: block; }
.tkps-cfg-vedi-tutto {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px; padding: 6px 4px;
    background: none; border: 0; cursor: pointer;
    color: var(--cfg-blu); font-size: 13px; font-weight: 700; font-family: inherit;
}
.tkps-cfg-vedi-tutto:hover { text-decoration: underline; }

/* Radio */
/* Scelte come tasti/pill invece di radio con sottolineatura. v3.23.1 */
.tkps-cfg-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.tkps-cfg-radio {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid var(--cfg-bordo); border-radius: 999px;
    cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.tkps-cfg-radio:hover { border-color: var(--cfg-accent-2, #0ea5e9); }
.tkps-cfg-radio input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.tkps-cfg-radio-lab { font-size: 14px; font-weight: 600; }
.tkps-cfg-radio-delta { font-size: 12px; font-weight: 700; color: var(--cfg-tenue); }
.tkps-cfg-radio.is-scelta,
.tkps-cfg-radio:has(input:checked) {
    border-color: var(--cfg-blu); background: var(--cfg-accent-l, #f0f9ff);
}
.tkps-cfg-radio.is-scelta .tkps-cfg-radio-lab,
.tkps-cfg-radio:has(input:checked) .tkps-cfg-radio-lab { color: var(--cfg-blu); }

/* Numeri */
.tkps-cfg-numero { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tkps-cfg-step {
    /* centratura perfetta del + e − (prima erano allineati a baseline) */
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0;
    line-height: 1; font-size: 20px; font-weight: 600;
    border: 1px solid var(--cfg-bordo); background: #fff;
    border-radius: 4px; cursor: pointer; color: var(--cfg-testo);
    font-family: inherit; -webkit-appearance: none; appearance: none;
}
.tkps-cfg-step:hover { background: var(--cfg-grigio); }
.tkps-cfg-input {
    width: 110px; height: 38px;
    padding: 0 10px;
    border: 1px solid var(--cfg-bordo); border-radius: 4px;
    font-size: 15px; text-align: center;
}
.tkps-cfg-unita, .tkps-cfg-limiti { font-size: 12px; color: var(--cfg-tenue); }

/* Consegne */
.tkps-cfg-consegne { display: flex; flex-wrap: wrap; gap: 12px; }
.tkps-cfg-consegna {
    min-width: 150px; flex: 1 1 150px;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid var(--cfg-bordo); border-radius: 4px;
    cursor: pointer; text-align: left; font: inherit; color: inherit;
    transition: border-color .15s;
}
.tkps-cfg-consegna:hover { border-color: #0ea5e9; }
.tkps-cfg-consegna.is-scelta { border-color: var(--cfg-blu); background: #f0f9ff; }
.tkps-cfg-consegna-et    { display: block; font-size: 12px; color: var(--cfg-tenue); }
.tkps-cfg-consegna-data  { display: block; font-size: 15px; font-weight: 700; margin: 2px 0 6px; }
.tkps-cfg-consegna-prezzo{ display: block; font-size: 17px; font-weight: 700; color: var(--cfg-blu); }
.tkps-cfg-nota { margin: 10px 0 0; font-size: 12px; color: var(--cfg-tenue); }

/* v3.12.0 — Due strade per il file, selezionabili come schede */
.tkps-cfg-file { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tkps-cfg-file-card {
    padding: 16px; border: 2px solid var(--cfg-bordo); background: #fff;
    text-align: left; cursor: pointer; font-family: inherit; color: inherit;
    transition: border-color .12s, background .12s;
}
.tkps-cfg-file-card:hover { border-color: var(--cfg-blu); }
.tkps-cfg-file-card.is-scelta { border-color: var(--cfg-blu); background: #f0f9ff; }
.tkps-cfg-file-card strong { display: block; margin-bottom: 6px; font-size: 15px; color: var(--cfg-navy); }
.tkps-cfg-file-card p { margin: 0; font-size: 13px; color: var(--cfg-tenue); }

/* Area upload PDF */
.tkps-cfg-upload { margin-top: 16px; }
.tkps-cfg-upload-drop {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 26px 16px; border: 2px dashed var(--cfg-bordo); border-radius: 8px;
    background: var(--cfg-grigio); cursor: pointer; text-align: center;
    transition: border-color .12s, background .12s;
}
.tkps-cfg-upload-drop:hover { border-color: var(--cfg-blu); background: #f0f9ff; }
.tkps-cfg-upload-icona { font-size: 26px; color: var(--cfg-blu); }
.tkps-cfg-upload-testo { font-size: 14px; font-weight: 600; color: var(--cfg-navy); }
.tkps-cfg-upload-limite { font-size: 12px; color: var(--cfg-tenue); }
.tkps-cfg-upload-stato { margin: 10px 0 0; font-size: 13px; font-weight: 600; }
.tkps-cfg-upload-stato.is-ok  { color: #16a34a; }
.tkps-cfg-upload-stato.is-err { color: #dc2626; }
.tkps-cfg-grafica { margin-top: 16px; padding: 14px 16px; background: var(--cfg-grigio); border-radius: 8px; }
.tkps-cfg-grafica p { margin: 0; font-size: 13px; color: var(--cfg-tenue); }

/* Contatti per il preventivo */
.tkps-cfg-contatti { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tkps-cfg-campo {
    width: 100%; box-sizing: border-box;
    padding: 10px 12px; border: 1px solid var(--cfg-bordo); border-radius: 6px;
    font-size: 14px; font-family: inherit; color: var(--cfg-testo); background: #fff;
}
.tkps-cfg-campo:focus { outline: 0; border-color: var(--cfg-blu); box-shadow: 0 0 0 3px rgba(3,105,161,.12); }
.tkps-cfg-note { margin-top: 12px; resize: vertical; }

/* Stima e conferma nel pannello */
/* Avviso "prezzo indicativo": deve saltare all'occhio, il cliente non deve
   poter dire "non l'ho letto". Riquadro ambra con icona, non footnote grigia. */
.tkps-cfg-stima-nota {
    display: flex; gap: 8px; align-items: flex-start;
    margin: 12px 0 0; padding: 10px 12px;
    background: #fff6e5; border: 1px solid #f0c66b; border-left: 4px solid #f5a623;
    border-radius: 6px;
    font-size: 12px; line-height: 1.5; color: #6b4e10;
}
.tkps-cfg-stima-nota strong { color: #8a5a00; }
.tkps-cfg-stima-nota-ico { flex: 0 0 auto; font-size: 15px; line-height: 1.3; }
.tkps-cfg-conferma { text-align: center; padding: 18px 8px; }
.tkps-cfg-conferma-ok {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: #16a34a; color: #fff; font-size: 24px; font-weight: 900; margin-bottom: 10px;
}
.tkps-cfg-conferma p { margin: 0; font-size: 14px; color: var(--cfg-navy); font-weight: 600; }

/* Pannello laterale */
.tkps-cfg-side { position: sticky; top: 20px; }
.tkps-cfg-box { overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.tkps-cfg-box-head {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px;
    background: var(--cfg-navy); color: #fff;
    font-size: 15px; font-weight: 700;
    border: 0; border-radius: 0 !important; cursor: pointer; text-align: left; font-family: inherit;
}
.tkps-cfg-box-head-static { cursor: default; }
.tkps-cfg-riepilogo { background: var(--cfg-grigio); padding: 4px 16px; }
.tkps-cfg-riep-riga { padding: 9px 0; border-bottom: 1px solid #e3e7ec; font-size: 13px; }
.tkps-cfg-riep-riga:last-child { border-bottom: 0; }
.tkps-cfg-riep-riga span   { display: block; font-weight: 700; }
.tkps-cfg-riep-riga strong { display: block; font-weight: 400; color: var(--cfg-tenue); }

.tkps-cfg-prev { background: var(--cfg-grigio); padding: 14px 16px 18px; }
.tkps-cfg-riga { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; }
.tkps-cfg-riga span   { color: var(--cfg-tenue); }
.tkps-cfg-riga strong { font-weight: 700; }
.tkps-cfg-riga-tot {
    margin-top: 8px; padding-top: 12px;
    border-top: 1px solid #d3d8de;
    font-size: 16px;
}
.tkps-cfg-riga-tot span, .tkps-cfg-riga-tot strong { color: var(--cfg-verde); font-weight: 700; }
.tkps-cfg-senza-listino {
    margin: 10px 0 0; padding: 9px 11px;
    background: #fff6e5; border-radius: 4px;
    font-size: 12px; color: #7a5a12; line-height: 1.45;
}
.tkps-cfg-cta {
    width: 100%; margin-top: 14px; padding: 14px;
    background: var(--cfg-verde); color: #fff !important;
    border: 0; border-radius: 40px;
    font-size: 15px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: background .15s;
}
.tkps-cfg-cta:hover, .tkps-cfg-cta:focus { background: #a80b52; color: #fff !important; }

/* Azione primaria = aggiungi al preventivo (carrello). "Chiedi preventivo" resta
   come via rapida per un singolo articolo, in stile secondario. v3.23.0 */
.tkps-cfg-cta-sec {
    /* !important: batte il color:#fff !important del primario .tkps-cfg-cta,
       altrimenti il testo esce bianco su fondo trasparente (invisibile). */
    background: transparent; color: var(--cfg-blu) !important;
    border: 1.5px solid var(--cfg-blu); margin-top: 8px;
    font-size: 13.5px; font-weight: 700;
}
.tkps-cfg-cta-sec:hover, .tkps-cfg-cta-sec:focus {
    background: var(--cfg-blu); color: #fff !important; border-color: var(--cfg-blu);
}

/* Brief "Lo fate voi" v3.25.0 */
.tkps-cfg-brief-intro { margin: 0 0 10px; color: var(--cfg-tenue); font-size: 14px; }
.tkps-cfg-brief { display: grid; gap: 12px; }
.tkps-cfg-brief-campo { display: grid; gap: 5px; }
.tkps-cfg-brief-campo > span { font-size: 13px; font-weight: 600; color: var(--cfg-testo); }
.tkps-cfg-brief-campo textarea,
.tkps-cfg-brief-campo input {
    width: 100%; box-sizing: border-box; padding: 10px 12px;
    border: 1px solid var(--cfg-bordo); border-radius: 8px; font-family: inherit; font-size: 14px;
}
.tkps-cfg-brief-campo textarea:focus,
.tkps-cfg-brief-campo input:focus { outline: 0; border-color: var(--cfg-blu); box-shadow: 0 0 0 3px rgba(3,105,161,.12); }

@media (max-width: 900px) {
    .tkps-cfg { grid-template-columns: 1fr; }
    /* Su mobile il preventivo resta agganciato in fondo allo schermo */
    .tkps-cfg-side { position: sticky; top: auto; bottom: 0; z-index: 30; }
    .tkps-cfg-riepilogo { display: none; }
}

/* Nome lavorazione */
.tkps-cfg-nome {
    width: 100%; max-width: 420px; height: 40px;
    padding: 0 12px;
    border: 1px solid var(--cfg-bordo); border-radius: 4px;
    font-size: 14px;
}

/* Esito dell aggiunta al carrello */
.tkps-cfg-avviso {
    margin: 10px 0 0; padding: 9px 11px;
    background: #fdecec; border-radius: 4px;
    font-size: 12px; color: #8a2020; line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════════════════
   v3.10.0 — Griglia prezzi: quantità × data di consegna (modello Pixartprinting)
   Sostituisce lo stepper quantità e le tre card di consegna.
   ═══════════════════════════════════════════════════════════════════════════ */
.tkps-cfg-griglia-nota { margin: 0 0 14px; font-size: 13px; color: var(--cfg-tenue); }
.tkps-cfg-griglia-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tkps-cfg-griglia {
    border-collapse: collapse;
    width: 100%;
    min-width: 520px;
    font-size: 14px;
}
.tkps-cfg-griglia th,
.tkps-cfg-griglia td {
    border: 1px solid var(--cfg-bordo);
    padding: 10px 12px;
    text-align: center;
    white-space: nowrap;
}

/* Intestazione */
.tkps-cfg-griglia thead th {
    background: var(--cfg-grigio);
    color: var(--cfg-navy);
    font-weight: 700;
    line-height: 1.3;
    vertical-align: middle;
}
.tkps-cfg-gcol-qta { text-align: left; }
.tkps-cfg-gcol-data { display: block; font-size: 13px; }
.tkps-cfg-gcol-et   { display: block; font-size: 11px; font-weight: 600; color: var(--cfg-tenue); text-transform: uppercase; letter-spacing: .03em; }
.tkps-cfg-griglia thead th.is-col-scelta { color: var(--cfg-blu); box-shadow: inset 0 -3px 0 var(--cfg-blu); }

/* Colonna quantità */
.tkps-cfg-gcell-qta {
    text-align: left;
    font-weight: 700;
    color: var(--cfg-navy);
    background: var(--cfg-grigio);
    font-variant-numeric: tabular-nums;
}

/* Celle prezzo */
.tkps-cfg-gcell {
    cursor: pointer;
    transition: background .12s, box-shadow .12s;
    font-variant-numeric: tabular-nums;
    color: var(--cfg-testo);
}
.tkps-cfg-gcell s { color: var(--cfg-tenue); font-size: 12px; margin-right: 3px; }
.tkps-cfg-gcell b { font-weight: 800; color: var(--cfg-navy); }
.tkps-cfg-gcell:hover { background: #f0f9ff; }
.tkps-cfg-gcell:focus-visible { outline: 2px solid var(--cfg-blu); outline-offset: -2px; }
.tkps-cfg-gcell-sr { color: var(--cfg-tenue); font-weight: 600; font-size: 13px; }
.tkps-cfg-gcell-ok { color: var(--cfg-blu); font-weight: 900; margin-left: 2px; }

/* Cella selezionata + riga/colonna evidenziate */
.tkps-cfg-gcell.is-scelta {
    background: #e0f2fe;
    box-shadow: inset 0 0 0 2px var(--cfg-blu);
}
.tkps-cfg-gcell.is-scelta b { color: var(--cfg-blu); }
.tkps-cfg-grow.is-riga-scelta .tkps-cfg-gcell-qta { color: var(--cfg-blu); }

@media (max-width: 600px) {
    .tkps-cfg-griglia { font-size: 13px; }
    .tkps-cfg-griglia th, .tkps-cfg-griglia td { padding: 8px 9px; }
}
