/* fattelodasolo.it — piccoli complementi al tema Tabler (variabili --tblr-*) */

/* Inter: il carattere previsto da Tabler, servito dal nostro server (OFL) */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-5.2.6-latin.woff2) format("woff2-variations"), url(fonts/inter-5.2.6-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-5.2.6-latin-ext.woff2) format("woff2-variations"), url(fonts/inter-5.2.6-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Anton (OFL), solo per il generatore di meme */
@font-face { font-family: "Anton"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(fonts/anton-5.3.0-latin.woff2) format("woff2"); }

/* scala tipografica più grande e più marcata */
:root, [data-bs-theme], [data-bs-theme-primary] {
  --tblr-font-sans-serif: "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --tblr-body-font-size: 1rem;
  --tblr-body-line-height: 1.55;
  --tblr-font-weight-bold: 700;
  --tblr-font-size-h1: 1.875rem;
  --tblr-font-size-h2: 1.5rem;
  --tblr-font-size-h3: 1.1875rem;
  --tblr-font-size-h4: 1rem;
}
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, .h1, .h2 { font-weight: 800; letter-spacing: -.02em; }
h3, .h3, .card-title { font-weight: 700; }
.navbar .nav-link { font-size: 1rem; font-weight: 600; white-space: nowrap; }
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .navbar .nav-link { font-size: .9375rem; padding-left: .45rem; padding-right: .45rem; }
  .navbar .nav-link-icon { display: none; }
}
.dropdown-item { font-size: .9375rem; font-weight: 500; padding-top: .5rem; padding-bottom: .5rem; }
.btn { --tblr-btn-font-size: .9375rem; --tblr-btn-font-weight: 600; }
.btn-sm { --tblr-btn-font-size: .8125rem; }
.btn-lg { --tblr-btn-font-size: 1.125rem; --tblr-btn-font-weight: 700; --tblr-btn-padding-y: .8rem; --tblr-btn-padding-x: 1.6rem; }
.form-label { font-weight: 600; font-size: .9375rem; }
.form-control, .form-select { font-size: 1rem; }
.form-check-label, .form-hint { font-size: .9375rem; }
.badge { font-size: .8125rem; }
.breadcrumb { font-size: .9375rem; font-weight: 500; }
.accordion-button { font-size: 1.0625rem; font-weight: 600; }
.accordion-body { font-size: 1rem; line-height: 1.65; }
.list-group-item { font-size: 1rem; font-weight: 500; }

/* tessere colorate più grandi (variabili avatar di Tabler) */
.fds-tile { flex: none; }
.fds-tile .icon { width: var(--tblr-avatar-icon-size); height: var(--tblr-avatar-icon-size); stroke-width: 1.75; }
.fds-tile-md { --tblr-avatar-size: 3.25rem; --tblr-avatar-icon-size: 1.75rem; }
.fds-tile-lg { --tblr-avatar-size: 3.75rem; --tblr-avatar-icon-size: 2.125rem; border-radius: 1rem; }
.fds-tile-xl { --tblr-avatar-size: 4.75rem; --tblr-avatar-icon-size: 2.75rem; border-radius: 1.25rem; }

/* illustrazione della home: le tessere degli strumenti */
.fds-collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; max-width: 26rem; margin-left: auto; }
.fds-ctile { display: flex; flex-direction: column; align-items: center; gap: .625rem; padding: 1.125rem .5rem; border-radius: 1.25rem;
  background: var(--tblr-bg-surface); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .35); }
.fds-ctile:nth-child(3n+2) { transform: translateY(1.5rem); }
.fds-ctile .avatar { --tblr-avatar-size: 4.25rem; --tblr-avatar-icon-size: 2.5rem; border-radius: 1.125rem; }
.fds-ctile-label { font-size: .875rem; font-weight: 700; text-align: center; line-height: 1.2; }

.fds-skip { position: absolute; left: 1rem; top: .5rem; z-index: 1100; background: var(--tblr-bg-surface); padding: .5rem 1rem; border-radius: var(--tblr-border-radius); }

/* marchio */
.fds-brand { display: inline-flex; align-items: center; gap: .625rem; font-size: 1.375rem; font-weight: 600; letter-spacing: -.02em; color: var(--tblr-body-color); text-decoration: none; }
.fds-brand strong { font-weight: 800; color: var(--tblr-primary); }
.fds-logo { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: .75rem; background: var(--tblr-primary); color: #fff; box-shadow: 0 6px 14px -6px rgba(var(--tblr-primary-rgb), .8); }
.fds-logo .icon { width: 1.5rem; height: 1.5rem; stroke-width: 2.2; }
.fds-local-badge { font-weight: 600; padding: .4rem .7rem; text-decoration: none; }

/* home: fascia hero calda, nei colori del tema (primary rosso + pink di Tabler) */
.fds-hero { padding: 3rem 0 2.5rem; background:
  radial-gradient(60rem 22rem at 85% -10%, rgba(var(--tblr-pink-rgb), .16), transparent 70%),
  radial-gradient(50rem 20rem at 0% 0%, rgba(var(--tblr-primary-rgb), .14), transparent 70%),
  var(--tblr-bg-surface); border-bottom: 1px solid var(--tblr-border-color); }
.fds-hero-kicker { padding: .4rem .7rem; font-weight: 600; }
.fds-hero-title { font-size: clamp(2.25rem, 5.5vw, 3.75rem); font-weight: 900; line-height: 1.04; letter-spacing: -.035em; max-width: 50rem; margin: 0 0 1.25rem; }
.fds-hero-lead { font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.55; color: var(--tblr-secondary); max-width: 46rem; margin: 0; }
.fds-tile { box-shadow: 0 4px 10px -2px rgba(0, 0, 0, .18); }
.fds-perk { border-width: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.fds-tool-card { transition: transform .15s, box-shadow .15s; }
.fds-tool-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .25); }
.fds-tool-card .card-title { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.fds-tool-card p { font-size: 1rem; }
.fds-tool-title { font-size: clamp(1.875rem, 4vw, 2.75rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.fds-tool-head .text-secondary { font-size: 1.125rem; }
.fds-perk .fw-bold { font-size: 1.0625rem; font-weight: 800 !important; }
.fds-perk .small { font-size: .9375rem; }
.page-body h2.h3 { font-size: 1.375rem; font-weight: 800; }
.fds-tool-head { padding-top: 1.5rem; padding-bottom: 1.5rem; margin-bottom: 0; background: linear-gradient(180deg, rgba(var(--fds-c), .10), transparent); }
.fds-sec-badge { font-weight: 500; padding: .35rem .6rem; }
.fds-pick { padding-left: 1.75rem; padding-right: 1.75rem; box-shadow: 0 8px 18px -8px rgba(var(--tblr-primary-rgb), .7); }
.fds-drop-note { font-size: .9375rem !important; }
.fds-drop-note a { color: inherit; text-decoration: underline; }
.fds-drop .text-secondary.mt-2 { font-size: 1.0625rem; }

/* testi */
.fds-prose { font-size: 1.0625rem; line-height: 1.7; }
.fds-prose h2.h3 { font-size: 1.375rem; }
.fds-prose p { margin-bottom: .875rem; }
.fds-steps { padding-left: 1.25rem; margin-bottom: 1.25rem; }
.fds-steps li { margin-bottom: .5rem; padding-left: .25rem; }
.fds-steps li::marker { color: var(--tblr-primary); font-weight: 700; }
.fds-foot-h { font-size: .8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--tblr-secondary); margin-bottom: .75rem; }
.fds-foot-list li { margin-bottom: .5rem; font-size: .9375rem; }
@media (min-width: 992px) { .fds-sticky { position: sticky; top: 1rem; } }

/* area strumento */
.fds-tool { min-height: 20rem; }
.fds-drop { border: 2px dashed var(--tblr-border-color); border-radius: var(--tblr-border-radius-lg); padding: 3.5rem 1rem; text-align: center; transition: background-color .15s, border-color .15s; display: flex; flex-direction: column; align-items: center; }
.fds-drop.is-over, .fds-tool.is-over .fds-drop { border-color: var(--tblr-primary); background: rgba(var(--tblr-primary-rgb), .05); }
.fds-tool.is-over { box-shadow: 0 0 0 2px var(--tblr-primary); }
.fds-options { background: var(--tblr-bg-surface-secondary); border-radius: var(--tblr-border-radius-lg); padding: 1.25rem; }
@media (min-width: 992px) { .fds-options { position: sticky; top: 1rem; } }
.fds-options-title { font-size: .8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--tblr-secondary); margin-bottom: .75rem; }
.fds-progress { max-width: 22rem; }

/* lista file (unire) */
.fds-filelist .list-group-item { display: flex; align-items: center; gap: .75rem; cursor: grab; }
.fds-filelist .list-group-item:active { cursor: grabbing; }
.fds-filelist .fds-fname { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-filelist .fds-fthumb { width: 2.75rem; height: 3.5rem; flex: none; border: 1px solid var(--tblr-border-color); border-radius: 4px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fds-filelist .fds-fthumb canvas { max-width: 100%; max-height: 100%; }
.sortable-ghost { opacity: .35; }

/* griglia pagine / immagini */
.fds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1rem; }
.fds-page { position: relative; border-radius: var(--tblr-border-radius); padding: .5rem; background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); user-select: none; transition: border-color .12s, box-shadow .12s, opacity .12s; }
.fds-page.is-click { cursor: pointer; }
.fds-page.is-drag { cursor: grab; }
.fds-thumb { height: 10rem; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.fds-thumb canvas, .fds-thumb img { max-width: 100%; max-height: 100%; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); background: #fff; transition: transform .2s; }
.fds-thumb .fds-ph { width: 70%; height: 85%; background: var(--tblr-bg-surface-secondary); border-radius: 2px; }
.fds-page-foot { display: flex; align-items: center; justify-content: space-between; gap: .25rem; margin-top: .375rem; min-height: 1.75rem; }
.fds-page-num { font-size: .8125rem; color: var(--tblr-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fds-page .btn-icon { width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; }
.fds-page .btn-icon .icon { width: 1rem; height: 1rem; margin: 0; }
.fds-mark { position: absolute; top: .375rem; right: .375rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; display: none; align-items: center; justify-content: center; color: #fff; }
.fds-mark .icon { width: 1rem; height: 1rem; margin: 0; stroke-width: 3; }
.fds-page.is-selected { border-color: var(--tblr-primary); box-shadow: 0 0 0 2px var(--tblr-primary); }
.fds-page.is-selected .fds-mark { display: flex; background: var(--tblr-primary); }
.fds-grid.mode-delete .fds-page.is-selected { border-color: var(--tblr-danger); box-shadow: 0 0 0 2px var(--tblr-danger); }
.fds-grid.mode-delete .fds-page.is-selected .fds-mark { background: var(--tblr-danger); }
.fds-grid.mode-delete .fds-page.is-selected .fds-thumb { opacity: .4; }
.fds-grid.mode-extract .fds-page:not(.is-selected) .fds-thumb { opacity: .55; }

/* anteprima pagina singola (numeri, filigrana, firma) */
.fds-preview-wrap { display: flex; justify-content: center; background: var(--tblr-bg-surface-secondary); border-radius: var(--tblr-border-radius-lg); padding: 1rem; }
.fds-preview { position: relative; display: inline-block; line-height: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); background: #fff; max-width: 100%; }
.fds-preview canvas { max-width: 100%; height: auto; display: block; }
.fds-preview canvas.fds-overlay { position: absolute; inset: 0; width: 100% !important; height: 100% !important; pointer-events: none; }

/* file singolo */
.fds-fileinfo { display: flex; gap: 1rem; align-items: center; }
.fds-fileinfo .fds-thumb { width: 7rem; height: 9rem; flex: none; }

/* manuali */
.fds-guide-title { max-width: 52rem; }
.fds-guide-lead { font-size: 1.1875rem; line-height: 1.55; max-width: 52rem; }
.fds-guide-card .card-title { font-size: 1.125rem; line-height: 1.3; }
.fds-toc { background: var(--tblr-bg-surface-secondary); border-radius: var(--tblr-border-radius-lg); padding: 1rem 1.25rem; margin-bottom: 1.75rem; }
.fds-toc ol { margin: 0; padding-left: 1.25rem; }
.fds-toc li { margin: .25rem 0; }
.fds-toc a { color: var(--tblr-body-color); text-decoration: none; font-weight: 500; }
.fds-toc a:hover { color: var(--tblr-primary); }
.fds-guide-sec { scroll-margin-top: 1rem; }
.fds-guide-sec + .fds-guide-sec { margin-top: 2.25rem; }
.fds-guide h2.h2 { font-size: 1.5rem; margin-bottom: .875rem; }
.fds-guide a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fds-howto { list-style: none; counter-reset: passo; padding: 0; margin: 1.25rem 0; }
.fds-howto li { counter-increment: passo; position: relative; padding: .7rem 1rem .7rem 3.25rem; margin-bottom: .5rem; background: var(--tblr-bg-surface-secondary); border-radius: var(--tblr-border-radius-lg); }
.fds-howto li::before { content: counter(passo); position: absolute; left: .75rem; top: .6rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--tblr-primary); color: #fff; font-weight: 800; font-size: .9375rem; display: flex; align-items: center; justify-content: center; }
.fds-callout { font-size: 1rem; margin: 1.25rem 0; }
.fds-callout .icon { width: 1.5rem; height: 1.5rem; }

/* immagini */
.fds-dim { font-size: .75rem; color: var(--tblr-secondary); }
.fds-page .fds-page-num { white-space: normal; line-height: 1.25; max-height: 2.6em; overflow: hidden; word-break: break-all; }
.fds-thumb img { transition: transform .2s; }
.fds-thumb-img img { max-width: 100%; max-height: 100%; border-radius: 4px; }
.fds-crop-wrap { max-height: 70vh; min-height: 18rem; background: var(--tblr-bg-surface-secondary); border-radius: var(--tblr-border-radius-lg); overflow: hidden; }
.fds-crop-wrap img { display: block; max-width: 100%; }
#fds-ratios .btn.active, #fds-presets .btn.active { background: var(--tblr-primary); color: #fff; border-color: var(--tblr-primary); }
.fds-regions { position: absolute; inset: 0; cursor: crosshair; touch-action: none; line-height: 1; }
.fds-region { position: absolute; border: 2px dashed #fff; outline: 1px solid rgba(0, 0, 0, .55); box-sizing: border-box; }
.fds-region.is-new { background: rgba(var(--tblr-primary-rgb), .18); border-color: var(--tblr-primary); }
.fds-region-x { position: absolute; top: -.7rem; right: -.7rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid #fff; background: var(--tblr-danger); color: #fff; font-weight: 700; font-size: .9rem; line-height: 1; padding: 0; cursor: pointer; }

/* firma */
.fds-pad { width: 100%; height: 10rem; background: #fff; border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); touch-action: none; cursor: crosshair; display: block; }
.fds-typed-preview { font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", "Apple Chancery", "Snell Roundhand", cursive; font-size: 2rem; line-height: 1.4; min-height: 3.5rem; background: #fff; color: #111827; border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); padding: .25rem .75rem; overflow: hidden; white-space: nowrap; }
.fds-sig { position: absolute; line-height: 0; cursor: move; touch-action: none; outline: 2px dashed var(--tblr-primary); outline-offset: 2px; }
.fds-sig img { width: 100%; height: auto; pointer-events: none; }
.fds-sig-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--tblr-primary); border: 2px solid #fff; cursor: nwse-resize; touch-action: none; }
