/* Sign PDF (Team 1). Every class starts with sign-. Base look (drop zone, list, progress, result) comes from pdfx.css. */
@font-face { font-family: 'PDFX Sign Dancing'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/vendor/pdf-sign/fonts/dancing-script-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PDFX Sign Vibes'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/vendor/pdf-sign/fonts/great-vibes-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PDFX Sign Caveat'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/vendor/pdf-sign/fonts/caveat-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PDFX Sign Atma'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/vendor/pdf-sign/fonts/atma-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PDFX Sign Atma'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/vendor/pdf-sign/fonts/atma-bengali-400-normal.woff2') format('woff2');
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CF7, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: 'PDFX Sign Galada'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/vendor/pdf-sign/fonts/galada-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'PDFX Sign Galada'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/assets/vendor/pdf-sign/fonts/galada-bengali-400-normal.woff2') format('woff2');
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CF7, U+200C-200D, U+20B9, U+25CC; }

#sign-root { margin: 1rem 0; }
.sign-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.sign-lock, html.sign-lock body { overflow: hidden; }
.sign-work { margin-top: 1rem; display: grid; gap: .8rem; }
.sign-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.sign-l { display: block; font-weight: 600; margin-bottom: .25rem; font-size: .93rem; }
.sign-trow { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.sign-trow > input[type="text"], .sign-trow > select { flex: 1; min-width: 0; }
.sign-work input[type="text"], .sign-work select, .sign-mbox input[type="text"], .sign-mbox select { min-height: 44px; padding: .5rem .75rem; font: inherit; border: 1px solid var(--pl, #dde3e0); border-radius: 12px; background: var(--surface, #fff); color: inherit; width: 100%; }
.sign-mbox input[type="range"] { width: 100%; accent-color: var(--pa, #00826a); }
.sign-work input:focus-visible, .sign-work select:focus-visible, .sign-mbox input:focus-visible, .sign-mbox select:focus-visible { outline: 3px solid color-mix(in srgb, var(--pa, #00826a) 35%, transparent); border-color: var(--pa, #00826a); }
.sign-textform { margin: 0; display: grid; gap: .6rem; }
.sign-btns { display: inline-flex; gap: .35rem; }
.sign-btns button, .sign-nav button, #sign-undo, #sign-clear { min-width: 40px; min-height: 40px; padding: 0 .7rem; border: 1px solid var(--pl, #dde3e0); border-radius: 10px; background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.sign-btns button:hover:not(:disabled), .sign-nav button:hover:not(:disabled) { border-color: var(--pa, #00826a); background: var(--pt, #eef7f4); }
.sign-btns .is-del { color: #a11d1d; }
.sign-nav button:disabled { opacity: .35; cursor: default; }
.sign-inks { display: inline-flex; gap: .5rem; align-items: center; }
.sign-ink { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--pl, #dde3e0); cursor: pointer; padding: 0; }
.sign-ink.is-on { box-shadow: 0 0 0 3px var(--pa, #00826a); }

.sign-tray { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem; border: 1px dashed var(--pl, #dde3e0); border-radius: 14px; }
.sign-chip { position: relative; display: inline-block; }
.sign-chipimg { display: block; width: 120px; height: 56px; padding: 4px; border: 1px solid var(--pl, #dde3e0); border-radius: 10px; background: #fff; cursor: pointer; }
.sign-chipimg:hover, .sign-chipimg:focus-visible { border-color: var(--pa, #00826a); }
.sign-chipimg img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sign-chipx { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--pl, #dde3e0); background: #fff; font-size: .75rem; line-height: 1; cursor: pointer; padding: 0; }

.sign-nav { display: flex; align-items: center; justify-content: center; gap: .8rem; }
.sign-stagewrap { overflow: hidden; }
.sign-stage { position: relative; width: 100%; max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--pl, #dde3e0); border-radius: 8px; box-shadow: 0 2px 12px rgba(0, 0, 0, .1); min-height: 200px; user-select: none; -webkit-user-select: none; }
.sign-pagecv { display: block; width: 100%; height: auto; border-radius: 8px; }
.sign-wait { padding: 4rem 1rem; text-align: center; }
.sign-layer { position: absolute; inset: 0; pointer-events: none; }
.sign-item { position: absolute; pointer-events: auto; touch-action: none; cursor: grab; outline: 1.5px dashed transparent; outline-offset: 3px; -webkit-touch-callout: none; }
.sign-item img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.sign-item.is-sel { outline-color: var(--pa, #00826a); cursor: move; }
.sign-h { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: var(--pa, #00826a); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); touch-action: none; }
.sign-h-size { right: -16px; bottom: -16px; cursor: nwse-resize; }
.sign-h-rot { left: 50%; top: -42px; margin-left: -15px; cursor: grab; }
.sign-h-rot::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 14px; margin-left: -1px; background: var(--pa, #00826a); }
.sign-hint { text-align: center; margin: 0; }
.sign-sel { margin: 0; display: grid; gap: .6rem; }
.sign-thumbs { display: flex; gap: .5rem; overflow-x: auto; padding: .3rem .1rem .6rem; -webkit-overflow-scrolling: touch; }
.sign-th { flex: 0 0 auto; width: 72px; padding: 3px; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; display: grid; gap: 2px; justify-items: center; font: inherit; color: inherit; }
.sign-th.is-on { border-color: var(--pa, #00826a); background: var(--pt, #eef7f4); }
.sign-thimg { display: block; width: 100%; aspect-ratio: 3 / 4; background: #eef1ef center / contain no-repeat; border-radius: 4px; border: 1px solid var(--pl, #dde3e0); }
.sign-thn { font-size: .75rem; }
.sign-go .btn { min-width: 220px; min-height: 48px; }
#sign-root.is-busy { cursor: progress; }
#sign-root.is-busy .pdfx-drop, #sign-root.is-busy .sign-work { pointer-events: none; opacity: .7; }

.sign-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(15, 25, 22, .55); overscroll-behavior: contain; }
.sign-modal[hidden] { display: none; }
.sign-mbox { width: 100%; max-width: 640px; max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column; background: var(--surface, #fff); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 30px rgba(0, 0, 0, .3); }
@media (min-width: 700px) { .sign-modal { align-items: center; } .sign-mbox { border-radius: 20px; } }
.sign-mhead { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem .4rem; }
.sign-mhead h2 { margin: 0; font-size: 1.25rem; }
.sign-mx { width: 44px; height: 44px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: inherit; }
.sign-tabs { display: flex; margin: 0 1.1rem; border: 1px solid var(--pl, #dde3e0); border-radius: 12px; overflow: hidden; }
.sign-tabs button { flex: 1; min-height: 44px; border: 0; background: var(--surface, #fff); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.sign-tabs button + button { border-left: 1px solid var(--pl, #dde3e0); }
.sign-tabs button[aria-selected="true"] { background: var(--pa, #00826a); color: #fff; }
.sign-mbody { padding: 1rem 1.1rem; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: .7rem; }
.sign-mbody [data-pane] { display: grid; gap: .7rem; }
.sign-mbody [hidden] { display: none; }
.sign-draw { display: block; width: 100%; height: 200px; border: 2px dashed color-mix(in srgb, var(--pa, #00826a) 45%, var(--pl, #dde3e0)); border-radius: 14px; background: #fff linear-gradient(transparent 74%, #d7ddd9 74%, #d7ddd9 calc(74% + 1px), transparent calc(74% + 1px)); touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sign-fonts { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sign-font { display: grid; text-align: left; padding: .5rem .7rem; border: 1px solid var(--pl, #dde3e0); border-radius: 12px; background: #fff; color: #111; cursor: pointer; font-size: 1.5rem; line-height: 1.3; min-height: 64px; }
.sign-font.is-on { border-color: var(--pa, #00826a); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pa, #00826a) 35%, transparent); }
.sign-fs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sign-font small { font: .75rem/1.2 system-ui, sans-serif; color: #55655f; }
.sign-checker { background: conic-gradient(#e9ecea 25%, #fff 0 50%, #e9ecea 0 75%, #fff 0) 0 0 / 16px 16px; border: 1px solid var(--pl, #dde3e0); border-radius: 12px; padding: .5rem; text-align: center; }
.sign-checker canvas { max-width: 100%; height: auto; max-height: 180px; }
.sign-mfoot { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; padding: .8rem 1.1rem 1rem; border-top: 1px solid var(--pl, #dde3e0); padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.sign-mbtns { display: inline-flex; gap: .5rem; }
@media (max-width: 520px) { .sign-go .btn { width: 100%; } .sign-chipimg { width: 104px; } }
.sign-mfoot .pdfx-check, .sign-sel .pdfx-check { align-items: center; }
.sign-mfoot .pdfx-check input, .sign-sel .pdfx-check input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; }
