/* views-share.css - Letterhead and Sharing tabs in Settings (views-share.js), share sheet and History details.
   Colours only through the app's CSS variables. */

/* ---- Letterhead tab ---- */
.lh-top .row { align-items: flex-end; }
.lh-pick { margin: 0; min-width: 220px; }
.lh-top-acts { flex-wrap: wrap; min-width: 0; }
.lh-top-acts .badge { white-space: normal; max-width: 100%; }
.lh-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.lh-form { gap: var(--sp-3); }
.lh-side { position: sticky; top: 76px; min-width: 0; }
.lh-img { display: grid; gap: var(--sp-2); padding: var(--sp-3); margin-bottom: var(--sp-3); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.lh-img.is-loading { opacity: .6; pointer-events: none; }
.lh-img-label { display: grid; gap: 2px; }
.lh-img-box { display: grid; place-items: center; min-height: 64px; padding: var(--sp-2); border-radius: var(--radius-sm, 8px); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.lh-img-box img { max-width: 100%; max-height: 90px; object-fit: contain; }
.lh-img .btn { cursor: pointer; }
.lh-save { position: static; bottom: 0; z-index: 2; padding: var(--sp-3) 0 0; margin-top: var(--sp-2); border-top: 1px solid var(--line); background: var(--surface); align-items: center; }
.doc-preview-frame { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); background: var(--surface-3); }
.doc-preview-frame iframe { position: absolute; left: 0; top: 0; width: 794px; height: 1123px; border: 0; transform-origin: 0 0; background: var(--white, #fff); pointer-events: none; }

@media (max-width: 1100px) {
  .lh-split { grid-template-columns: minmax(0, 1fr); }
  .lh-side { position: static; order: -1; }
}
@media (max-width: 720px) {
  .lh-top-acts { width: 100%; }
  .lh-top-acts .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .lh-pick { min-width: 0; width: 100%; }
  .lh-save { bottom: calc(var(--tabbar-h, 64px) + 18px); flex-wrap: wrap; }
  .lh-save .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .lh-save .grow { flex-basis: 100%; }
}

/* the save bar follows the screen only while there is something to save */
.lh-save.is-dirty { position: sticky; }

/* ---- Sharing tab ---- */
.sh-grid td.center, .sh-grid th.center { text-align: center; }
.sh-cell { justify-content: center; min-height: 0; }
.sh-save { align-items: center; }
@media (max-width: 720px) {
  .sh-grid td.center { text-align: left; }
  .sh-cell { justify-content: flex-start; }
}

/* ---- Activity Log: kinds and export ---- */
.adm-kinds { margin-bottom: var(--sp-3); }
.adm-kinds .row { align-items: flex-end; }
.adm-kinds .quick-picks { flex-wrap: wrap; }
.adm-kinds a.pick { text-decoration: none; }
@media (max-width: 720px) { .adm-kinds .btn { width: 100%; justify-content: center; } }

/* ---- the quotation "Share / Print" sits at the right end of the Compare / Sheet tabs ---- */
.tabs .rq-quote-share { margin-left: auto; align-self: center; padding-left: var(--sp-2); flex: none; }
.share-host:empty { display: none; }
