/* tk-ncc-booking — Conferma prenotazione da firmare [tk_ncc_conferma]
   Ricalca il documento PDF. La classe .is-pdf (copia fuori schermo usata per il PDF)
   tiene sempre il layout da scrivania, anche quando la pagina è aperta dal telefono. */

.tkncc-conf {
    --tkc-ink: #0f172a;
    --tkc-text: #1e293b;
    --tkc-muted: #64748b;
    --tkc-line: #cbd5e1;
    --tkc-soft: #f1f5f9;
    --tkc-paper: #ffffff;
    --tkc-gold: #c9a227;
    max-width: 860px;
    margin: 48px auto 0;
    color: var(--tkc-text);
}
.tkncc-conf *, .tkncc-conf *::before, .tkncc-conf *::after { box-sizing: border-box; }

.tkncc-conf-doc {
    background: var(--tkc-paper);
    padding: 48px 46px 26px;
    border-radius: 6px;
    box-shadow: 0 10px 34px rgba(15, 23, 42, .12);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tkc-text);
}

/* ── Intestazione ── */
.tkncc-conf-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--tkc-ink);
}
.tkncc-conf-brand { display: flex; align-items: flex-start; gap: 18px; }
.tkncc-conf-logo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: 0 0 84px; margin-top: 4px; }
.tkncc-conf-name { font-size: 25px; font-weight: 700; color: var(--tkc-ink); letter-spacing: .3px; text-transform: uppercase; margin-bottom: 8px; line-height: 1.15; }
.tkncc-conf-sub { font-size: 14px; color: var(--tkc-text); margin-bottom: 4px; }
.tkncc-conf-tag { font-size: 12px; font-weight: 700; color: var(--tkc-muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 4px; max-width: 380px; }
.tkncc-conf-contacts { text-align: right; font-size: 12.5px; color: #475569; line-height: 1.55; padding-top: 14px; }

/* ── Titolo ── */
.tkncc-conf-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 18px 0 22px;
    padding: 12px 16px 12px 20px;
    background: #f8fafc;
    border: 1px solid var(--tkc-line);
    border-left: 6px solid var(--tkc-ink);
    font-size: 17px;
    font-weight: 700;
    color: var(--tkc-ink);
    text-transform: uppercase;
    letter-spacing: .2px;
}
.tkncc-conf-pill {
    background: var(--tkc-ink);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    padding: 5px 12px;
    border-radius: 3px;
    white-space: nowrap;
}

/* ── Sezioni ── */
.tkncc-conf .tkncc-conf-h {
    margin: 22px 0 8px;
    padding: 0 0 5px;
    border-bottom: 2px solid #e2e8f0;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--tkc-ink);
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 1.3;
}
.tkncc-conf-table { border: 1px solid var(--tkc-line); }
.tkncc-conf-row { display: flex; border-top: 1px solid var(--tkc-line); }
.tkncc-conf-row:first-child { border-top: 0; }
.tkncc-conf-lab {
    flex: 0 0 222px;
    padding: 9px 10px;
    background: var(--tkc-soft);
    border-right: 1px solid var(--tkc-line);
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
    display: flex;
    align-items: center;
}
.tkncc-conf-fld { flex: 1 1 auto; min-width: 0; padding: 7px 10px; display: flex; align-items: center; }
.tkncc-conf-static { font-size: 14px; color: var(--tkc-ink); }

/* ── Campi ── */
.tkncc-conf .tkncc-conf-in {
    display: block;
    width: 100%;
    min-width: 0;
    height: 30px;
    margin: 0;
    padding: 4px 9px;
    background: #fff;
    border: 1px solid var(--tkc-line);
    border-radius: 3px;
    box-shadow: none;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13.5px;
    line-height: 20px;
    color: var(--tkc-ink);
    outline: none;
}
.tkncc-conf .tkncc-conf-in::placeholder { color: #94a3b8; opacity: 1; }
.tkncc-conf .tkncc-conf-in:focus { border-color: var(--tkc-gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .18); }
.tkncc-conf .tkncc-conf-in.is-err { border-color: #dc2626; background: #fef2f2; }
.tkncc-conf .tkncc-conf-in[readonly] { background: #f8fafc; }
.tkncc-conf .tkncc-conf-upper { text-transform: uppercase; }
.tkncc-conf .tkncc-conf-select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 30px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
}
.tkncc-conf input[type=number].tkncc-conf-in { -moz-appearance: textfield; }
.tkncc-conf input[type=number].tkncc-conf-in::-webkit-inner-spin-button { opacity: .6; }

.tkncc-conf-inline { display: flex; align-items: center; gap: 8px; width: 100%; flex-wrap: nowrap; }
.tkncc-conf-inline .tkncc-conf-in { flex: 1 1 0; }
.tkncc-conf-pre { white-space: nowrap; font-size: 13.5px; color: #475569; }
.tkncc-conf-sep { color: #94a3b8; }

/* ── Riepilogo economico ── */
.tkncc-conf-box { border: 1px solid #94a3b8; border-radius: 6px; padding: 12px 18px 10px; }
.tkncc-conf-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--tkc-line);
    font-size: 15.5px;
    font-weight: 700;
    color: var(--tkc-ink);
    text-transform: uppercase;
}
.tkncc-conf-money { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.tkncc-conf .tkncc-conf-amount { width: 140px; height: 34px; font-size: 16px; font-weight: 700; }
.tkncc-conf .tkncc-conf-list { margin: 10px 0 0; padding: 0 0 0 18px; list-style: disc; }
.tkncc-conf-list li { margin: 0 0 7px; font-size: 13.5px; line-height: 1.5; }
.tkncc-conf-list li > strong { margin-right: 4px; }
.tkncc-conf-list li > .tkncc-conf-in { display: inline-block; width: 410px; max-width: 100%; vertical-align: middle; }
.tkncc-conf-acc { display: inline-flex; width: auto; vertical-align: middle; flex-wrap: wrap; }
.tkncc-conf .tkncc-conf-small { width: 92px; flex: 0 0 92px; }
.tkncc-conf-pay { display: flex; align-items: flex-start; gap: 18px; }
.tkncc-conf-pay > .tkncc-conf-list { flex: 1 1 auto; min-width: 0; }
.tkncc-conf .tkncc-conf-qr {
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    padding: 8px 8px 9px;
    border: 1px solid var(--tkc-line);
    border-radius: 6px;
    background: #fff;
    color: var(--tkc-ink);
    text-align: center;
    text-decoration: none;
}
.tkncc-conf .tkncc-conf-qr img { display: block; width: 132px; height: 132px; max-width: none; margin: 0; border-radius: 0; box-shadow: none; }
.tkncc-conf-qr span { margin-top: 6px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; line-height: 1.3; }
.tkncc-conf-qr small { font-size: 11px; color: var(--tkc-muted); line-height: 1.3; }

/* ── Firme ── */
.tkncc-conf-signs { display: flex; gap: 22px; margin-top: 18px; }
.tkncc-conf-sign { flex: 1 1 0; min-width: 0; }
.tkncc-conf-pad { position: relative; height: 120px; }
.tkncc-conf-pad:not(.tkncc-conf-pad-empty) { border: 1px dashed #94a3b8; border-radius: 6px 6px 0 0; background: #fcfcfd; touch-action: none; }
.tkncc-conf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.tkncc-conf-pad-hint { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: #94a3b8; font-size: 13px; pointer-events: none; }
.tkncc-conf-pad.has-sign .tkncc-conf-pad-hint { display: none; }
.tkncc-conf .tkncc-conf-clear {
    position: absolute; right: 6px; top: 6px;
    padding: 3px 9px; margin: 0;
    background: #fff; color: var(--tkc-muted);
    border: 1px solid var(--tkc-line); border-radius: 999px;
    font-size: 11px; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: 0;
    cursor: pointer; box-shadow: none;
}
.tkncc-conf .tkncc-conf-clear:hover { color: #dc2626; border-color: #fca5a5; background: #fff; }
.tkncc-conf-pad.is-err { border-color: #dc2626; background: #fef2f2; }
.tkncc-conf-line { border-top: 2px solid #94a3b8; }
.tkncc-conf-sign-lab { text-align: center; font-weight: 700; font-size: 13px; color: var(--tkc-ink); margin-top: 26px; }
.tkncc-conf-sign-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

.tkncc-conf-foot {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    font-size: 12.5px;
    color: var(--tkc-muted);
}

/* ── Azioni (fuori dal documento) ── */
.tkncc-conf-actions { margin: 22px 0 56px; }
.tkncc-conf-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; cursor: pointer; }
.tkncc-conf-check input { margin: 4px 0 0; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--tkc-ink); }
.tkncc-conf-check.is-err span { color: #dc2626; }
.tkncc-conf-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.tkncc-conf-msg { margin: 14px 0 0; font-size: 14px; font-weight: 600; min-height: 1px; }
.tkncc-conf-msg.is-err { color: #b91c1c; }
.tkncc-conf-msg.is-ok { padding: 14px 16px; background: #ecfdf5; border: 1px solid #6ee7b7; border-radius: 10px; color: #065f46; }
.tkncc-conf-btns { display: flex; gap: 14px; margin-top: 16px; }
.tkncc-conf .tkncc-conf-btn {
    flex: 1 1 0;
    margin: 0;
    padding: 15px 22px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.tkncc-conf .tkncc-conf-btn-send { background: var(--tkc-ink); color: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .25); }
.tkncc-conf .tkncc-conf-btn-dl { background: linear-gradient(135deg, #e3c157, var(--tkc-gold) 55%, #a8851a); color: #1a1505; box-shadow: 0 6px 18px rgba(201, 162, 39, .35); }
.tkncc-conf .tkncc-conf-btn:hover { transform: translateY(-1px); }
.tkncc-conf .tkncc-conf-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.tkncc-conf.is-done .tkncc-conf-btns,
.tkncc-conf.is-done .tkncc-conf-check { display: none; }

/* ── Copia per il PDF: campi diventati testo ── */
.tkncc-conf-doc.is-pdf { position: fixed; left: -12000px; top: 0; width: 794px; max-width: none; border-radius: 0; box-shadow: none; padding: 46px 44px 24px; }
.tkncc-conf-doc.is-pdf .tkncc-conf-noprint { display: none !important; }
.tkncc-conf-doc.is-pdf .tkncc-conf-pad { border: 0; background: transparent; }
.tkncc-conf-val {
    display: block;
    width: 100%;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--tkc-line);
    border-radius: 3px;
    background: #fff;
    font-size: 13.5px;
    line-height: 18px;
    color: var(--tkc-ink);
    white-space: pre-wrap;
    word-break: break-word;
}
.tkncc-conf-inline .tkncc-conf-val { flex: 1 1 0; }
.tkncc-conf-val.tkncc-conf-amount { width: 140px; font-size: 16px; font-weight: 700; min-height: 34px; padding-top: 7px; }
.tkncc-conf-val.tkncc-conf-small { width: 92px; flex: 0 0 92px; }
.tkncc-conf-list li > .tkncc-conf-val { display: inline-block; width: 410px; vertical-align: middle; }

/* ── Telefono e tablet stretto ── */
@media (max-width: 782px) {
    .tkncc-conf-doc:not(.is-pdf) { padding: 22px 16px 18px; border-radius: 0; box-shadow: none; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-head { flex-direction: column; gap: 12px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-logo { width: 64px; height: 64px; flex-basis: 64px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-name { font-size: 21px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-contacts { text-align: left; padding-top: 0; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-title { font-size: 15px; padding: 10px 12px 10px 14px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-row { flex-direction: column; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-lab { flex: none; border-right: 0; border-bottom: 1px solid var(--tkc-line); padding: 7px 10px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-fld { padding: 8px 10px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-in { height: 40px; font-size: 16px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-inline { flex-wrap: wrap; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-inline .tkncc-conf-in { flex: 1 1 calc(100% - 110px); }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-sep { display: none; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-box { padding: 12px 12px 8px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-total { flex-direction: column; align-items: stretch; font-size: 14px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-amount { width: 100%; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-list li > .tkncc-conf-in { display: block; width: 100%; margin-top: 6px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-acc { display: flex; margin-top: 6px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-small { flex: 1 1 calc(100% - 190px); width: auto; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-pay { flex-direction: column; align-items: center; gap: 4px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-pay > .tkncc-conf-list { align-self: stretch; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-qr { flex: none; margin: 0 0 6px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-signs { flex-direction: column; gap: 10px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-pad { height: 150px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-pad-empty { height: 40px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-sign-lab { margin-top: 8px; }
    .tkncc-conf-doc:not(.is-pdf) .tkncc-conf-foot { flex-direction: column; gap: 2px; }
    .tkncc-conf { margin-top: 16px; }
    .tkncc-conf-actions { padding: 0 16px; margin-bottom: 40px; }
    .tkncc-conf-btns { flex-direction: column; }
    .tkncc-conf .tkncc-conf-btn { width: 100%; }
}
