/* Send Like a Pro — email signature generator UI.
   Shared by / and /email-signature-generator/. Edit here only.

   Load this BEFORE the page's own <style> block: these are defaults for every
   variable the tool needs, so it renders standalone on a page that only
   declares some of them. A later page-level :root still wins. */
:root {
  --teal:    #0e7490;
  --teal-l:  #e0f2fe;
  --white:   #ffffff;
  --border:  #e5e7eb;
  --border-l:#f3f4f6;
  --text-1:  #111827;
  --text-2:  #374151;
  --text-3:  #6b7280;
  --text-4:  #9ca3af;
  --green:   #059669;
}

/* ── TOOL LAYOUT ── */
.tool-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 960px) { .tool-wrap { grid-template-columns: 1fr; } }

/* ── FORM CARD ── */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); position: sticky; top: 72px; }


/* Tab bar */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); background: var(--border-l); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 11px 4px 9px; font-size: 11px; font-weight: 600; color: var(--text-4); letter-spacing: .02em; background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; transition: color .15s, background .15s; }
.tab:hover { color: var(--text-2); background: rgba(255,255,255,.6); }
.tab.on { color: var(--teal); background: var(--white); border-bottom-color: var(--teal); }

/* Tab panes */
.pane { display: none; padding: 0; max-height: calc(100vh - 180px); overflow-y: auto; }
.pane.on { display: block; }

/* Sections within panes */
.sec { padding: 20px 22px; border-bottom: 1px solid var(--border-l); }
.sec:last-child { border-bottom: none; }
.sec-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-4); margin-bottom: 14px; }

/* Fields */
.f { margin-bottom: 12px; }
.f:last-child { margin-bottom: 0; }
.f label { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.f-opt { font-weight: 400; color: var(--text-4); font-size: 11px; }

/* ── Phone row ── */
.phone-row { display: flex; gap: 6px; }
.dial-select { width: 80px; flex-shrink: 0; padding: 9px 4px; font-size: 12px; font-family: inherit; border: 1px solid var(--border); border-radius: 8px; color: var(--text-1); background: var(--white); outline: none; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dial-select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,116,144,.1); }
.phone-row input { flex: 1; min-width: 0; }

/* ── Tooltips ── */
.tip { position: relative; display: inline-flex; align-items: center; cursor: default; }
.tip-icon { width: 14px; height: 14px; border-radius: 50%; background: var(--border); color: var(--text-3); font-size: 9px; font-weight: 700; font-style: normal; display: inline-flex; align-items: center; justify-content: center; cursor: help; user-select: none; transition: background .15s; }
.tip-icon:hover { background: var(--teal); color: #fff; }
.tip-bubble { position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); background: #1f2937; color: #f9fafb; font-size: 11px; line-height: 1.55; padding: 7px 10px; border-radius: 7px; white-space: normal; width: 200px; pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 100; font-weight: 400; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.tip-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1f2937; }
.tip-icon:hover + .tip-bubble,
.tip:hover .tip-bubble { opacity: 1; }

/* ── Start here indicator ── */
@keyframes pulse-badge { 0%,100% { box-shadow: 0 0 0 0 rgba(14,116,144,.4); } 50% { box-shadow: 0 0 0 5px rgba(14,116,144,0); } }

/* ── Welcome hint ── */

/* ── Tab next buttons ── */
.tab-next { display: flex; justify-content: flex-end; padding: 14px 22px 18px; }
.tab-next-btn { font-size: 12px; font-weight: 600; color: var(--teal); background: var(--teal-l); border: none; border-radius: 99px; padding: 7px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: background .15s; }
.tab-next-btn:hover { background: #bae6fd; }
.f input[type=text], .f input[type=email], .f input[type=tel], .f select:not(.dial-select), .f textarea {
  width: 100%; padding: 9px 11px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 8px; color: var(--text-1);
  background: var(--white); outline: none; transition: border-color .15s, box-shadow .15s;
}
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,116,144,.1); }
.f textarea { resize: vertical; min-height: 60px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.f-hint { font-size: 11px; color: var(--text-4); margin-top: 4px; line-height: 1.5; }
.f-notice { font-size: 12px; color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 7px; padding: 8px 10px; margin-top: 6px; line-height: 1.5; }

/* Image preview row */
.img-preview-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.img-thumb { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; background: var(--border-l); }
.img-thumb.sq { border-radius: 6px; object-fit: contain; }
.tog-inline { display: flex; align-items: center; justify-content: space-between; flex: 1; }
.tog-inline span { font-size: 12px; color: var(--text-3); }
.size-btn { width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--white); color: var(--text-2); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: inherit; }
.size-btn:hover { border-color: var(--teal); color: var(--teal); }
.size-btn.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Colour suggestion */
.color-suggestion { display: none; align-items: center; gap: 8px; flex-wrap: wrap; background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 8px 10px; font-size: 12px; color: #166534; margin-top: 8px; }
.sug-swatch { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(0,0,0,.1); flex-shrink: 0; display: inline-block; vertical-align: middle; }
.sug-btn { font-size: 11px; font-weight: 700; background: #166534; color: #fff; border: none; border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.sug-dismiss { font-size: 13px; color: var(--text-4); background: none; border: none; cursor: pointer; margin-left: auto; }

/* Toggle */
.tog-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; }
.tog-row + .tog-row { border-top: 1px solid var(--border-l); }
.tog-label { font-size: 13px; color: var(--text-2); }
/* Sub-line under a toggle label. Matches .f-hint, which is how every other
   explanatory line in the form is styled. */
.tog-desc { font-size: 11px; color: var(--text-4); line-height: 1.5; margin-top: 2px; }
.tog { position: relative; width: 34px; height: 18px; flex-shrink: 0; }
.tog input { opacity: 0; width: 0; height: 0; }
.tog-sl { position: absolute; inset: 0; background: #d1d5db; border-radius: 99px; cursor: pointer; transition: .2s; }
.tog-sl::before { content: ''; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tog input:checked + .tog-sl { background: var(--teal); }
.tog input:checked + .tog-sl::before { transform: translateX(16px); }

/* Colour picker */
.color-presets { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.cs { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .15s, border-color .15s; flex-shrink: 0; }
.cs:hover { transform: scale(1.2); }
.cs.on { border-color: var(--text-1); transform: scale(1.15); }
.color-input-row { display: flex; gap: 8px; align-items: center; }
.color-input-row input[type=color] { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); padding: 2px; cursor: pointer; background: var(--white); flex-shrink: 0; }
.color-input-row .f { margin: 0; flex: 1; }

/* Collapsible extra */
.extra { display: none; padding-top: 12px; }
.extra.on { display: block; }

/* ── PREVIEW COLUMN ── */
.preview-col { display: flex; flex-direction: column; gap: 18px; }

/* Signature card */
.sig-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.sig-card-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.sig-dots { display: flex; gap: 5px; }
.sig-dot { width: 10px; height: 10px; border-radius: 50%; }
.sig-bar-title { font-size: 13px; font-weight: 600; color: var(--text-2); }
.sig-bar-tag   { font-size: 11px; color: var(--text-4); }
.sig-email-body { padding: 18px 20px; }
.sig-to   { font-size: 12px; color: var(--text-4); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-l); }
.sig-text { font-size: 13px; color: var(--text-3); line-height: 1.65; margin-bottom: 16px; }
.sig-frame { width: 100%; border: none; display: block; min-height: 150px; }

/* Progress card */
.prog-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.prog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.prog-header span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.prog-pct  { font-size: 13px; font-weight: 700; color: var(--teal) !important; }
.prog-bar  { height: 4px; background: var(--border-l); border-radius: 99px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--teal); border-radius: 99px; transition: width .4s ease; }
.prog-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.chip { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 99px; }
.chip.ok { background: #ecfdf5; color: #059669; }
.chip.no { background: var(--border-l); color: var(--text-4); }

/* Action card */
.action-card { background: var(--white); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.action-card h3 { font-size: 17px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.action-card > p { font-size: 13px; color: var(--text-3); line-height: 1.65; margin-bottom: 16px; }
.btn-pay { width: 100%; padding: 14px; font-size: 15px; font-weight: 700; background: var(--teal); color: #fff; border: none; border-radius: 99px; cursor: pointer; box-shadow: 0 4px 14px rgba(14,116,144,.28); transition: opacity .15s, transform .15s; }
.btn-pay:hover { opacity: .92; transform: translateY(-1px); }
.pay-note { text-align: center; font-size: 11px; color: var(--text-4); margin-top: 8px; }

/* Unlocked */
.unlocked-h3 { font-size: 16px; font-weight: 700; color: var(--green); display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.unlocked-p  { font-size: 13px; color: var(--text-3); line-height: 1.6; margin-bottom: 14px; }
.btn-copy { width: 100%; padding: 11px; font-size: 14px; font-weight: 600; background: var(--teal); color: #fff; border: none; border-radius: 9px; cursor: pointer; margin-bottom: 8px; transition: opacity .15s; }
.btn-copy:hover { opacity: .9; }
.btn-dl   { width: 100%; padding: 10px; font-size: 13px; font-weight: 600; background: var(--teal-l); color: var(--teal); border: none; border-radius: 9px; cursor: pointer; transition: background .15s; }
.btn-dl:hover { background: #ede9fe; }
.copied-ok { font-size: 12px; color: var(--green); text-align: center; padding: 6px 0; display: none; }
.gmail-tip { margin-top: 14px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 9px; padding: 10px 12px; font-size: 12px; color: #0c4a6e; line-height: 1.6; }

/* ── Image upload ── */
.upl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Specificity matters here: the form styles every label inside .f with
   `.f label { color: var(--text-2) }`, which outranks a bare `.upl-btn` and
   rendered dark text on the teal button — while also overriding the font size,
   weight and margin. Qualifying with the parent outranks it back, so every
   property the generic rule touches is restated. */
.upl label.upl-btn,
.upl-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; background: var(--teal); color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 0; padding: 9px 16px; border-radius: 8px; cursor: pointer; transition: opacity .15s; }
.upl label.upl-btn:hover,
.upl-btn:hover { opacity: .9; color: #fff; }
.upl-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.upl-btn span::before { content: '↑'; margin-right: 6px; font-weight: 700; }
.upl-btn:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.upl-hint { font-size: 11px; color: var(--text-4); line-height: 1.5; flex: 1; min-width: 120px; }
.upl-status { font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.5; display: none; }
.upl-alt { margin-top: 10px; }
.upl-alt summary { font-size: 11px; color: var(--text-4); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.upl-alt summary::-webkit-details-marker { display: none; }
/* The pages style FAQ <details> with a '+' via ::after. Suppress it here,
   or this summary shows two plus signs. */
.upl-alt summary::after { content: none; display: none; }
.upl-alt summary::before { content: '+'; font-weight: 700; }
.upl-alt[open] summary::before { content: '−'; }
.upl-alt summary:hover { color: var(--teal); }
.upl-alt input[type=text] { margin-top: 8px; }

/* ── Pre-payment confirmation ── */
.pay-confirm { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.pay-confirm input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; flex-shrink: 0; }
.pay-confirm span { font-size: 12px; line-height: 1.55; color: var(--text-2); }
.btn-pay:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-pay:disabled:hover { opacity: .45; transform: none; }

/* ── Locked after payment ── */
.form-locked-note { background: #ecfdf5; border-bottom: 1px solid #86efac; padding: 12px 22px; font-size: 12px; line-height: 1.6; color: #166534; }
.form-locked-note a { color: #166534; font-weight: 600; text-decoration: underline; }
.form-card.locked .sec { opacity: .55; }
.form-card.locked .upl-btn { cursor: not-allowed; opacity: .6; }

/* ── Sticky pay prompt ── */
.pay-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; padding: 12px 24px; background: var(--white); border-top: 1px solid var(--border); box-shadow: 0 -4px 20px rgba(0,0,0,.07); transform: translateY(110%); transition: transform .25s ease; }
.pay-bar.on { transform: translateY(0); }
.pay-bar-text { font-size: 13px; font-weight: 600; color: var(--text-1); }
.pay-bar-btn { font-family: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--teal); border: none; border-radius: 99px; padding: 10px 22px; cursor: pointer; box-shadow: 0 3px 12px rgba(14,116,144,.28); transition: opacity .15s; }
.pay-bar-btn:hover { opacity: .9; }
.pay-bar-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pay-bar-short { display: none; }
body.pay-bar-on { padding-bottom: 76px; }
@media (max-width: 620px) {
  .pay-bar { gap: 10px; padding: 10px 14px; }
  .pay-bar-text { font-size: 12px; }
  .pay-bar-long { display: none; }
  .pay-bar-short { display: inline; }
  .pay-bar-btn { font-size: 12px; padding: 9px 16px; white-space: nowrap; }
}

/* ── Mobile: the tool is one column here ──
   Sticky earns its keep only while the form sits beside the preview. Once the
   columns stack, the card pins itself and everything after it scrolls past —
   and with z-index auto, later siblings paint over it, so the pinned form
   shows through the content sliding across it.

   The pane's own scroll region goes too: a scrolling box inside a scrolling
   page is miserable on a phone, and there is no second column to keep short.

   This block must stay at the end of the file: it matches the base rules on
   specificity, so placing it earlier lets them win. */
@media (max-width: 960px) {
  .form-card { position: static; }
  .pane { max-height: none; overflow-y: visible; }
}
