/* Signatures - stile delle pagine del prodotto (i componenti comuni sono in base/assets/base.css) */

/* La mia firma: riquadro "copia in Outlook" */
.copy-panel { margin-bottom: 1.25rem; padding: 1.1rem 1.25rem; border-radius: 8px; background: var(--c-surface); border: 1px solid var(--c-border) }
.copy-panel.just-saved { border-color: #16a34a; background: color-mix(in srgb, #16a34a 8%, var(--c-surface)) }
.copy-panel-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; font-size: 1.15rem; color: var(--c-strong) }
.copy-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem }
.copy-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: 8px; border: 1px solid var(--c-border); background: var(--c-surface-2); color: var(--c-text); text-decoration: none }
.copy-card:hover { border-color: var(--c-primary) }
.copy-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-primary); color: #fff }
.copy-text b { display: block; font-size: 17px; color: var(--c-strong) }
.copy-text small { color: var(--c-muted); font-size: 15px }
.copy-cta { font-weight: 700; color: var(--c-primary); white-space: nowrap }
@media (max-width: 700px) { .copy-cards { grid-template-columns: 1fr } }

.sig-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-bottom: 1rem }
.sig-load { flex: 1 1 320px; min-width: 0; margin: 0 }
.sig-delete { margin-left: auto }
.brand-choice .label, .photo-box .label { display: block; font-weight: 700; margin-bottom: .5rem }

/* foto */
.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem }
.photo-preview { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; background: var(--c-surface-3) }
.photo-preview.is-empty { visibility: hidden; width: 0; margin: 0 }
.crop-area { margin-top: 1rem }
.crop-stage { max-width: 420px; max-height: 420px }
.crop-stage img { display: block; max-width: 100% }
.crop-area .cropper-view-box, .crop-area .cropper-face { border-radius: 50% }
.crop-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem }

/* firma da copiare: sempre su fondo bianco, come arriva nelle email */
.firma-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem }
.firma-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .8rem }
.copy-status { font-weight: 700; color: #16a34a }
.copy-status.is-error { color: #dc2626 }
.sig-paper { overflow-x: auto; padding: 24px; border-radius: 8px; background: #fff; color: #333; border: 1px solid var(--c-border) }

/* pannello: marchi, banner, Teams */
.brand-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem }
.brand-item { display: inline-flex; align-items: center; gap: .6rem; padding: .5rem .9rem; border-radius: 6px; border: 1px solid var(--c-border); background: var(--c-surface-2); color: var(--c-text); text-decoration: none; font-weight: 700 }
.brand-item img { height: 28px; width: auto; max-width: 120px; object-fit: contain; background: #fff; border-radius: 3px; padding: 2px }
.brand-item:hover, .brand-item.active { border-color: var(--c-primary); color: var(--c-primary) }
.brand-item.is-off { opacity: .5 }
.brand-add { border-style: dashed }
.banner-thumb { display: block; width: 220px; height: auto; border-radius: 4px; border: 1px solid var(--c-border) }
.banner-preview { display: block; width: 440px; max-width: 100%; height: auto; border: 1px solid var(--c-border) }
.teams-preview { display: block; width: 100%; max-width: 760px; height: auto; border-radius: 6px; border: 1px solid var(--c-border) }
.teams-result { margin-top: 1.25rem }
.narrow-field { max-width: 160px }
.banner-form[data-kind=event] .k-notice:not(.k-event), .banner-form[data-kind=event] .k-image:not(.k-event),
.banner-form[data-kind=notice] .k-event:not(.k-notice), .banner-form[data-kind=notice] .k-image:not(.k-notice),
.banner-form[data-kind=image] .k-event:not(.k-image), .banner-form[data-kind=image] .k-notice:not(.k-image) { display: none }

/* accesso e guida */
.login-card { max-width: 520px }
.login-guide { margin-top: 1.25rem; text-align: center }
.login-message { white-space: normal }
.guide-steps { padding-left: 1.4rem }
.guide-steps li { margin-bottom: 1.2rem }
.guide-steps h2 { font-size: 1.15rem; margin: 0 0 .3rem; color: var(--c-strong) }
.guide-table th { width: 30%; text-transform: none; letter-spacing: 0; font-size: 16px }

/* Impostazioni: modelli della firma (schede con pallino e anteprima) */
.layout-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.form .layout-card { display: flex; flex-direction: column; gap: .6rem; margin: 0; padding: .8rem; border: 2px solid var(--c-border); border-radius: 8px; background: var(--c-surface); cursor: pointer; font-weight: 600; }
.form .layout-card:hover { border-color: var(--c-muted); }
.form .layout-card:has(input:checked) { border-color: var(--c-primary); box-shadow: 0 0 0 1px var(--c-primary); }
.form .layout-card.is-off { opacity: .55; cursor: not-allowed; }
.layout-head { display: flex; align-items: center; gap: .5rem; font-size: 16px; color: var(--c-strong); }
.layout-paper { display: block; height: 150px; overflow: hidden; padding: 8px; border-radius: 4px; background: #fff; border: 1px solid var(--c-border); pointer-events: none; }
.layout-scale { display: block; width: 560px; transform: scale(.38); transform-origin: top left; }
.layout-scale img { max-width: none; }

/* telefono */
@media (max-width: 600px) {
  .copy-card { grid-template-columns: auto 1fr; }
  .copy-cta { grid-column: 1 / -1; justify-self: end; }
  .sig-load { flex: 1 1 100%; min-width: 0; }
  .sig-delete { margin-left: 0; }
  .sig-paper { padding: 12px; }
}

/* Scelta dell'azienda con i loghi (index.php, sg_brand_switch): riquadri bianchi anche nel tema scuro */
.brand-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; max-width: 100%; padding: 4px; border-radius: 12px; background: var(--c-surface-3); box-shadow: inset 0 0 0 1px var(--c-border) }
.brand-switch input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; pointer-events: none; -webkit-appearance: none; appearance: none }
.brand-switch input::before { display: none !important }
.brand-switch label { display: flex; align-items: center; justify-content: center; width: 190px; max-width: 100%; height: 56px; margin: 0; padding: 0 18px; border-radius: 9px; background: #fff; opacity: .55; cursor: pointer; box-shadow: inset 0 0 0 2px transparent; transition: opacity .15s, box-shadow .15s }
.brand-switch label img { display: block; max-width: 100%; max-height: 26px; width: auto; height: auto; filter: grayscale(1); transition: filter .15s }
.brand-switch label span { font-weight: 700; color: #555 }
.brand-switch label:hover { opacity: .85 }
.brand-switch input:checked + label { opacity: 1; box-shadow: inset 0 0 0 3px var(--c-folder-fill), 0 1px 4px rgba(0, 0, 0, .25) }
.brand-switch input:checked + label img { filter: none }
.brand-switch input:checked + label span { color: #1a1a1a }
.brand-switch input:focus-visible + label { outline: 2px solid var(--c-primary); outline-offset: 2px }
@media (max-width: 600px) { .brand-switch label { width: 150px; height: 48px; padding: 0 12px } .brand-switch label img { max-height: 21px } }

/* Selettore in alto Firma email | Sfondo Teams (sg_page_switch) */
.page-switch { display: flex; gap: 6px; max-width: 560px; margin: 0 auto 18px; padding: 5px; border-radius: 999px; background: var(--c-surface-3); box-shadow: inset 0 0 0 1px var(--c-border) }
.page-switch a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: 999px; font-size: 17px; font-weight: 700; color: var(--c-muted); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s }
.page-switch a:hover { color: var(--c-strong) }
.page-switch a.is-on { background: var(--c-folder-fill); color: var(--c-folder-fill-ink) }
.page-switch .ps-ic { display: inline-flex; width: 24px; height: 24px; flex: 0 0 24px }
.page-switch .ps-ic .ic { width: 24px; height: 24px }
.page-switch img.ps-ic { padding: 2px; border-radius: 6px; background: #fff }
@media (max-width: 600px) { .page-switch a { font-size: 15px; padding: 0 10px; gap: 6px } }

/* Menu che SCELGONO (apri una firma, azienda con più di 3) = giallo ambra come gli altri selettori, diversi dai campi da compilare */
.sig-load .select2-container--default .select2-selection--single,
.brand-choice .select2-container--default .select2-selection--single { border: 0; background: var(--c-folder-fill) }
.sig-load .select2-container--default .select2-selection--single .select2-selection__rendered,
.brand-choice .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--c-folder-fill-ink); font-weight: 700 }
.sig-load .select2-container--default .select2-selection--single .select2-selection__arrow b,
.brand-choice .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--c-folder-fill-ink) transparent transparent }
.sig-load .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b,
.brand-choice .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent var(--c-folder-fill-ink) }
.sig-load .select2-container--focus .select2-selection--single, .sig-load .select2-container--open .select2-selection--single { outline-color: var(--c-folder) }
