/* Protek Apply Now - Form Styles v1.0.0 */

:root {
  --teal: #1D9E75;
  --teal-dark: #0F6E56;
  --teal-xdark: #085041;
  --teal-light: #E1F5EE;
  --teal-mid: #9FE1CB;
  --navy: #0d1f2d;
  --navy-mid: #1a3045;
  --navy-light: #2a4560;
  --white: #ffffff;
  --offwhite: #f7f9fc;
  --border: #dce6ef;
  --border-focus: #1D9E75;
  --text: #0d1f2d;
  --text-mid: #3d5166;
  --text-muted: #6b7f93;
  --text-light: #9aaabb;
  --red: #c0392b;
  --red-light: #fdf0ef;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow: 0 4px 24px rgba(13,31,45,0.08);
  --shadow-lg: 0 12px 48px rgba(13,31,45,0.14);
}

/* ──────────────────────────────────────────────────────────────────────────
   SCOPED RESET
   This stylesheet was originally written for the plugin's own standalone
   page, where owning html/body was fine. Loaded via the shortcode on a
   themed page it is not: a bare `*` reset zeroed the margin and padding of
   EVERY element on the host page, and the body rule repainted the whole
   page in the form's font and background. Everything below is scoped to the
   form and its floating widgets so nothing leaks into the host theme.
   ────────────────────────────────────────────────────────────────────────── */
:where(#ptk-wrap, #ptk-wrap *,
       #chat-nudge, #chat-nudge *,
       #chat-launcher, #chat-launcher *,
       #chat-window, #chat-window *) {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:where(#ptk-wrap, #ptk-wrap *, #chat-window, #chat-window *)::before,
:where(#ptk-wrap, #ptk-wrap *, #chat-window, #chat-window *)::after {
  box-sizing: border-box;
}

#ptk-wrap,
#chat-nudge,
#chat-launcher,
#chat-window {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.5;
}

/* ── PAGE LAYOUT ── */
.page-bg {
  min-height: 100vh;
  background: linear-gradient(160deg, #0d1f2d 0%, #1a3045 40%, #0f3a2a 100%);
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(13,31,45,0.06);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
}

.header-contact { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.header-contact strong { color: var(--text); }

.page-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem 4rem;
}

/* ── FORM CARD ── */
.form-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  overflow: hidden;
  animation: cardIn 0.4s ease;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── FORM HEADER ── */
.form-hdr {
  background: var(--navy);
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.form-hdr::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(29,158,117,0.08);
  pointer-events: none;
}

.form-hdr-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.form-title-group { }
.form-step-badge {
  display: inline-block;
  background: rgba(29,158,117,0.15);
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}
.form-stage-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.form-stage-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  margin-top: 4px;
}
.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s;
}
.save-dot.saved { background: var(--teal); }
.save-dot.saving { background: var(--amber); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── PROGRESS ── */
.progress-section { }

:where(#ptk-wrap) .stage-steps {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
}

:where(#ptk-wrap) .stage-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 2px 4px;
  transition: opacity 0.2s;
}
:where(#ptk-wrap) .stage-step.locked { cursor: default; opacity: 0.4; }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  transition: all 0.3s;
  position: relative;
  background: transparent;
}
:where(#ptk-wrap) .stage-step.done .step-num {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
:where(#ptk-wrap) .stage-step.active .step-num {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.2);
}
.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin-top: 13px;
  transition: background 0.4s;
}
.step-connector.done { background: var(--teal); }

.step-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  text-align: center;
  transition: color 0.3s;
}
:where(#ptk-wrap) .stage-step.active .step-label { color: var(--teal); }
:where(#ptk-wrap) .stage-step.done .step-label { color: rgba(255,255,255,0.6); }

.progress-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}

/* ── FORM BODY ── */
.form-body { padding: 2rem; }

:where(#ptk-wrap) .stage { display: none; animation: stageIn 0.3s ease; }
:where(#ptk-wrap) .stage.active { display: block; }
@keyframes stageIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── LEAD CAPTURE NOTE ── */
.capture-note {
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  border-radius: var(--r);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1.75rem;
  font-size: 13px;
  color: var(--teal-xdark);
  line-height: 1.5;
}
.capture-note svg { flex-shrink: 0; margin-top: 1px; }

/* ── FIELDS ── */
:where(#ptk-wrap) .field-group { margin-bottom: 1.25rem; }
:where(#ptk-wrap) .field-row { display: grid; gap: 1rem; margin-bottom: 1.25rem; }
:where(#ptk-wrap) .field-row.cols-2 { grid-template-columns: 1fr 1fr; }
:where(#ptk-wrap) .field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
:where(#ptk-wrap) .field-row.cols-1 { grid-template-columns: 1fr; }

:where(#ptk-wrap) .field { display: flex; flex-direction: column; gap: 6px; }
:where(#ptk-wrap) .field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.req { color: var(--teal); font-size: 13px; line-height: 1; }
:where(#ptk-wrap) .field-hint { font-size: 11px; color: var(--text-light); margin-top: 2px; }

:where(#ptk-wrap) .field input,
:where(#ptk-wrap) .field select,
:where(#ptk-wrap) .field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
:where(#ptk-wrap) .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7f93' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
:where(#ptk-wrap) .field input:focus,
:where(#ptk-wrap) .field select:focus,
:where(#ptk-wrap) .field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}
:where(#ptk-wrap) .field input::placeholder,
:where(#ptk-wrap) .field textarea::placeholder { color: var(--text-light); }
:where(#ptk-wrap) .field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
:where(#ptk-wrap) .field input.error,
:where(#ptk-wrap) .field select.error { border-color: var(--red); }
:where(#ptk-wrap) .field-error { font-size: 11px; color: var(--red); display: none; }
:where(#ptk-wrap) .field-error.show { display: block; }

/* ── RADIO CARDS ── */
.radio-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card {
  flex: 1;
  min-width: 140px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.radio-card:hover { border-color: var(--teal-mid); background: var(--teal-light); }
.radio-card.selected {
  border-color: var(--teal);
  background: var(--teal);
}
.radio-card input[type=radio] { accent-color: #fff; width: 16px; height: 16px; cursor: pointer; }
.radio-card-label { font-size: 14px; font-weight: 500; color: var(--text); }
.radio-card.selected .radio-card-label { color: #fff; font-weight: 600; }
.radio-card.selected input[type=radio] { accent-color: #fff; }

/* ── YES/NO TOGGLE ── */
.yesno-wrap { }
.yesno-question {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 10px;
}
.yesno-btns { display: flex; gap: 8px; }
.yesno-btn {
  padding: 9px 28px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  background: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  font-family: inherit;
}
.yesno-btn.active-yes { border-color: var(--red); background: var(--red-light); color: var(--red); }
.yesno-btn.active-no { border-color: var(--teal); background: var(--teal-light); color: var(--teal-dark); }

/* ── CONDITIONAL BLOCKS ── */
.conditional {
  margin-top: 12px;
  padding: 1.25rem;
  background: var(--offwhite);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r) var(--r) 0;
  display: none;
  animation: fadeIn 0.25s ease;
}
.conditional.open { display: block; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }

.cond-individual { border-left-color: var(--teal); }
.cond-company { border-left-color: var(--navy); }
.cond-detail { border-left-color: var(--amber); background: var(--amber-light); }

/* ── SECTION DIVIDERS ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.75rem 0 1.25rem;
}
.section-divider-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── FORM ACTIONS ── */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.actions-left { display: flex; align-items: center; gap: 10px; }
.actions-right { display: flex; align-items: center; gap: 10px; }

:where(#ptk-wrap) .btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s;
  border: 1.5px solid transparent;
  padding: 10px 20px;
  text-decoration: none;
}
:where(#ptk-wrap) .btn-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
:where(#ptk-wrap) .btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
:where(#ptk-wrap) .btn-primary:active { transform: scale(0.98); }

:where(#ptk-wrap) .btn-submit {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  padding: 12px 28px;
  font-size: 14px;
}
:where(#ptk-wrap) .btn-submit:hover { background: var(--navy-mid); }

:where(#ptk-wrap) .btn-secondary {
  background: none;
  color: var(--text-muted);
  border-color: var(--border);
}
:where(#ptk-wrap) .btn-secondary:hover { border-color: var(--text-mid); color: var(--text); }

:where(#ptk-wrap) .btn-ghost {
  background: none;
  color: var(--teal);
  border-color: var(--teal);
  font-size: 11px;
  padding: 8px 14px;
}
:where(#ptk-wrap) .btn-ghost:hover { background: var(--teal-light); }

:where(#ptk-wrap) .btn svg { flex-shrink: 0; }

.autosave-label {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── SUCCESS ── */
.success-screen {
  text-align: center;
  padding: 3rem 2rem;
}
.success-icon {
  width: 72px;
  height: 72px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn { from{opacity:0;transform:scale(0.5)} to{opacity:1;transform:scale(1)} }
.success-icon svg { width: 36px; height: 36px; }
.success-h { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.success-p { font-size: 14px; color: var(--text-muted); line-height: 1.7; max-width: 440px; margin: 0 auto; }
.success-ref {
  display: inline-block;
  margin-top: 1.25rem;
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 30px;
  letter-spacing: 0.05em;
}
.success-phone {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
.success-phone strong { color: var(--teal); font-size: 15px; }

/* ── EXIT INTENT POPUP ── */
:where(#ptk-wrap) .overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,31,45,0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
:where(#ptk-wrap) .overlay.open {
  opacity: 1;
  pointer-events: all;
}
.popup-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  position: relative;
}
:where(#ptk-wrap) .overlay.open .popup-card {
  transform: translateY(0) scale(1);
}
.popup-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
}
.popup-close:hover { color: var(--text); }
.popup-emoji { font-size: 36px; margin-bottom: 10px; }
.popup-h { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.popup-p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; }
.popup-email-row { display: flex; gap: 8px; margin-bottom: 12px; }
.popup-email-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.popup-email-row input:focus { border-color: var(--teal); }
.popup-skip {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  text-decoration: underline;
  display: block;
  margin: 0 auto;
  font-family: inherit;
  padding: 4px;
}
.popup-skip:hover { color: var(--text-muted); }

/* ── RESUME BANNER ── */
.resume-banner {
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  border-radius: var(--r);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1.5rem;
  font-size: 13px;
  color: var(--teal-xdark);
  flex-wrap: wrap;
  display: none;
}
.resume-banner.show { display: flex; }
.resume-banner strong { font-weight: 700; }
:where(#ptk-wrap) .btn-resume {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--r);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-transform: uppercase;
  font-family: inherit;
  white-space: nowrap;
}

/* ── ADMIN DASH ── */
#dash-view {
  display: none;
  background: var(--offwhite);
  min-height: 100vh;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.dash-sidebar {
  width: 220px;
  background: var(--navy);
  min-height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  padding: 1.5rem 0;
  z-index: 100;
}
.sidebar-logo {
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo-text { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.9); letter-spacing: 0.06em; text-transform: uppercase; }
.sidebar-logo-text span { color: var(--teal); }

.sidebar-wp-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: 0 1.25rem;
  margin-bottom: 6px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 1.25rem;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: all 0.15s;
  font-weight: 500;
}
.sidebar-nav li a:hover { color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.05); }
.sidebar-nav li a.active { color: #fff; background: rgba(29,158,117,0.18); border-right: 3px solid var(--teal); }
.sidebar-nav li a svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-nav li a.active svg { opacity: 1; }
.sidebar-badge {
  margin-left: auto;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.dash-main { margin-left: 220px; padding: 2rem; }

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.dash-page-title span { color: var(--teal); }
.dash-topbar-right { display: flex; gap: 8px; align-items: center; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s;
  border-left: 4px solid transparent;
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card.sc-teal { border-left-color: var(--teal); }
.stat-card.sc-navy { border-left-color: var(--navy); }
.stat-card.sc-amber { border-left-color: var(--amber); }
.stat-card.sc-red { border-left-color: var(--red); }
.sc-label { font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.sc-val { font-size: 32px; font-weight: 700; color: var(--text); line-height: 1; }
.sc-sub { font-size: 11px; color: var(--text-light); margin-top: 5px; }

.table-card {
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.table-toolbar {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.table-toolbar-title { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-pill:hover { border-color: var(--teal); color: var(--teal); }
.filter-pill.active { background: var(--teal); border-color: var(--teal); color: #fff; }

.search-box {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  color: var(--text);
  width: 200px;
  transition: border-color 0.15s;
}
.search-box:focus { border-color: var(--teal); }

:where(#ptk-wrap) table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--offwhite);
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid #f0f4f8; transition: background 0.12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fbfe; }
tbody td { padding: 12px 16px; vertical-align: middle; color: var(--text); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}
.sp-complete { background: #d4eddf; color: #0a5c2a; }
.sp-partial { background: #dce8f8; color: #0c447c; }
.sp-incomplete { background: #fff3cd; color: #7d4e00; }

:where(#ptk-wrap) .stage-pip { display: inline-flex; gap: 3px; }
.pip { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.pip.done { background: var(--teal); }
.pip.cur { background: var(--amber); }

:where(#ptk-wrap) .btn-view-lead {
  background: none;
  border: 1px solid var(--border);
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
:where(#ptk-wrap) .btn-view-lead:hover { background: var(--teal-light); border-color: var(--teal); }

/* ── LEAD DETAIL DRAWER ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,31,45,0.5);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 95vw;
  height: 100vh;
  background: var(--white);
  z-index: 501;
  box-shadow: -8px 0 40px rgba(13,31,45,0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-hdr {
  background: var(--navy);
  padding: 1.5rem;
  flex-shrink: 0;
}
.drawer-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 8px;
  float: right;
  font-family: inherit;
  line-height: 1;
  transition: all 0.15s;
}
.drawer-close:hover { background: rgba(255,255,255,0.2); color: #fff; }
.drawer-ref { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }
.drawer-name { font-size: 18px; font-weight: 700; color: #fff; }
.drawer-email { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 3px; }
.drawer-progress { margin-top: 14px; }
.drawer-pips { display: flex; gap: 4px; }
.drawer-pip { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.12); transition: background 0.3s; }
.drawer-pip.done { background: var(--teal); }
.drawer-pip.cur { background: var(--amber); }
.drawer-pip-labels { display: flex; justify-content: space-between; margin-top: 6px; }
.drawer-pip-label { font-size: 9px; color: rgba(255,255,255,0.3); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.drawer-pip-label.done { color: rgba(255,255,255,0.6); }
.drawer-pip-label.cur { color: var(--teal); }

.drawer-body { padding: 1.5rem; flex: 1; }
.drawer-section { margin-bottom: 1.5rem; }
.drawer-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.drawer-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drawer-field { }
.df-label { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-light); margin-bottom: 3px; }
.df-val { font-size: 13px; color: var(--text); font-weight: 500; }
.df-val.empty { color: var(--text-light); font-style: italic; font-weight: 400; }

.drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  gap: 10px;
}

/* ── TOAST ── */
:where(#ptk-wrap) .toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
:where(#ptk-wrap) .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
:where(#ptk-wrap) .toast.toast-success { background: var(--teal); }

/* ── UTIL ── */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .form-body { padding: 1.25rem; }
  .field-row.cols-2, .field-row.cols-3 { grid-template-columns: 1fr; }
  .form-hdr { padding: 1.25rem 1.25rem 1.25rem; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dash-main { margin-left: 0; }
  .dash-sidebar { display: none; }
  .drawer { width: 100vw; }
}


/* ── CHAT LAUNCHER BUTTON ── */
.chat-launcher {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 800;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--teal);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(29,158,117,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: chatGlow 3s ease-in-out infinite;
}
@keyframes chatGlow {
  0%,100% { box-shadow: 0 4px 20px rgba(29,158,117,0.45); }
  50%      { box-shadow: 0 4px 32px rgba(29,158,117,0.75), 0 0 0 8px rgba(29,158,117,0.12); }
}
.chat-launcher:hover { transform: scale(1.07); box-shadow: 0 6px 28px rgba(29,158,117,0.6); }
.chat-launcher svg { width: 26px; height: 26px; }
.chat-launcher-close { display: none; }
.chat-launcher.open .chat-launcher-open { display: none; }
.chat-launcher.open .chat-launcher-close { display: block; }
.chat-launcher.open { animation: none; background: var(--navy); }

.chat-nudge {
  position: fixed;
  bottom: 98px;
  right: 28px;
  z-index: 799;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px 14px 4px 14px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 4px 20px rgba(13,31,45,0.12);
  max-width: 200px;
  line-height: 1.4;
  animation: nudgeIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
  cursor: pointer;
}
.chat-nudge::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--white);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
@keyframes nudgeIn {
  from { opacity:0; transform: translateY(10px) scale(0.95); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

/* ── CHAT WINDOW ── */
.chat-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  z-index: 800;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: 520px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 16px 56px rgba(13,31,45,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1), opacity 0.25s ease;
}
.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* ── CHAT HEADER ── */
.chat-hdr {
  background: var(--navy);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.15);
  overflow: hidden;
}
.chat-avatar svg { width: 22px; height: 22px; }
.chat-avatar-online {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid var(--navy);
  position: absolute;
  bottom: 0;
  right: 0;
}
.chat-avatar-wrap { position: relative; flex-shrink: 0; }
.chat-hdr-text { flex: 1; min-width: 0; }
.chat-hdr-name { font-size: 14px; font-weight: 700; color: #fff; }
.chat-hdr-status { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.chat-hdr-close {
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  font-family: inherit;
  transition: all 0.15s;
}
.chat-hdr-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ── MESSAGES ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f5f8fb;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.msg-row { display: flex; align-items: flex-end; gap: 8px; }
.msg-row.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msg-avatar svg { width: 15px; height: 15px; }

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  animation: bubbleIn 0.25s ease;
}
.msg-row.user .msg-bubble {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 16px;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
}
.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* ── QUICK REPLIES ── */
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 6px 14px 4px;
}
.qr-btn {
  background: var(--white);
  border: 1.5px solid var(--teal);
  color: var(--teal);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}
.qr-btn:hover { background: var(--teal); color: #fff; }

/* ── INPUT BAR ── */
.chat-input-bar {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 9px 16px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  color: var(--text);
  transition: border-color 0.15s;
  resize: none;
  max-height: 80px;
  line-height: 1.4;
}
.chat-input:focus { border-color: var(--teal); }
.chat-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.chat-send:hover { background: var(--teal-dark); }
.chat-send:active { transform: scale(0.93); }
.chat-send svg { width: 16px; height: 16px; }

/* ── FILL-FORM CTA ── */
.chat-form-cta {
  margin: 4px 14px 10px;
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--teal-xdark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  display: none;
}
.chat-form-cta.show { display: flex; }
:where(#ptk-wrap) .btn-fill-form {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s;
}
:where(#ptk-wrap) .btn-fill-form:hover { background: var(--teal-dark); }

/* ── GOOGLE PLACES AUTOCOMPLETE ──────────────────────────────────────────── */
.ptk-address-field { position: relative; }

.ptk-places-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1.5px solid var(--teal);
    border-radius: var(--r);
    box-shadow: 0 8px 24px rgba(13,31,45,0.12);
    z-index: 500;
    max-height: 280px;
    overflow-y: auto;
}

.ptk-places-dropdown.open { display: block; }

.ptk-place-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f4f8;
    transition: background 0.1s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ptk-place-item:last-child { border-bottom: none; }
.ptk-place-item:hover,
.ptk-place-item.active { background: var(--teal-light); }

.ptk-place-main {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
}

.ptk-place-main strong {
    font-weight: 700;
    color: var(--teal-dark);
}

.ptk-place-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.ptk-places-hint {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ptk-places-hint::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aaabb' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}


/* ============================================================
   Added in 1.4.0 - honest save state, submit errors, consent
   ============================================================ */

/* The save indicator now has a real failure state. It used to show "Saved"
   even when the request had failed, which is how leads were lost silently. */
.save-dot.error {
    background: #d94c3d;
    box-shadow: 0 0 0 3px rgba(217, 76, 61, 0.18);
    animation: none;
}

.submit-error {
    display: none;
    margin: 1.25rem 0 0;
    padding: 14px 16px;
    border: 1px solid #f5b4ae;
    border-left: 4px solid #d94c3d;
    border-radius: 8px;
    background: #fdf0ef;
    color: #7a2a20;
    font-size: 13.5px;
    line-height: 1.65;
}

.ptk-declaration {
    margin: 1.75rem 0 0;
    padding: 16px 18px;
    border: 1px solid #dce6ef;
    border-radius: 10px;
    background: #f7f9fc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ptk-declaration.error {
    border-color: #f5b4ae;
    background: #fdf0ef;
}

.ptk-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-mid, #3d5166);
    cursor: pointer;
}

.ptk-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: #1D9E75;
    cursor: pointer;
}

.ptk-check a {
    color: #0F6E56;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .ptk-declaration { padding: 14px; }
    .ptk-check { font-size: 12.5px; }
}

.ptk-download-note {
    margin: 1rem 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted, #6b7f93);
}

.ptk-download-note a {
    color: #0F6E56;
    font-weight: 600;
    text-decoration: underline;
}

.submit-error a {
    color: #7a2a20;
    font-weight: 700;
    text-decoration: underline;
}

/* ── Offline application fallback bar ─────────────────────────────────────── */
.ptk-download-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-top: 1px solid #dce6ef;
    background: #f7f9fc;
    border-radius: 0 0 24px 24px;
}

.ptk-download-bar-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #e6f4ef;
    color: #0F6E56;
}
.ptk-download-bar-icon svg { width: 19px; height: 19px; }

.ptk-download-bar-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.5;
}
.ptk-download-bar-text strong { color: #0d1f2d; font-weight: 700; }
.ptk-download-bar-text span { color: #6b7f93; }

.ptk-download-btn {
    flex-shrink: 0;
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #1D9E75;
    border-radius: 8px;
    background: #ffffff;
    color: #0F6E56;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.ptk-download-btn:hover { background: #1D9E75; color: #ffffff; }

@media (max-width: 640px) {
    .ptk-download-bar { flex-wrap: wrap; padding: 14px 16px; gap: 10px; }
    .ptk-download-bar-text { flex-basis: calc(100% - 52px); }
    .ptk-download-btn { width: 100%; text-align: center; }
}

/* Phone numbers are tap-to-call everywhere they appear */
.ptk-page-header-contact a,
.success-p a,
.success-phone a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.ptk-page-header-contact a:hover,
.success-p a:hover,
.success-phone a:hover { opacity: .75; }

/* Always-visible help line with a tap-to-call number */
.ptk-help-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px 16px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-muted, #6b7f93);
    border-top: 1px solid #eef3f8;
}
.ptk-help-row svg { width: 15px; height: 15px; flex-shrink: 0; color: #1D9E75; }
.ptk-help-row strong { font-weight: 600; }
.ptk-help-row a { color: #0F6E56; text-decoration: underline; }

@media (max-width: 640px) {
    .ptk-help-row { padding: 12px 16px 16px; align-items: flex-start; }
    .ptk-help-row svg { margin-top: 2px; }
}


/* ──────────────────────────────────────────────────────────────────────────
   THEME ARMOUR
   Elementor and the site theme apply global button rules that beat ours on
   specificity, which left every button square and repainted the outline
   buttons solid (teal text on a teal background, unreadable). These rules
   re-assert only the properties that matter. ID selectors plus !important
   are deliberate: this plugin has to survive inside a theme it cannot see.
   ────────────────────────────────────────────────────────────────────────── */
#ptk-wrap .btn {
  padding: 10px 20px !important;
  font-size: 13px !important;
  letter-spacing: 0.05em !important;
  border-radius: var(--r) !important;
  border: 1.5px solid transparent !important;
  text-transform: uppercase !important;
  font-family: inherit !important;
  line-height: 1.2 !important;
  width: auto !important;
  min-height: 0 !important;
  box-shadow: none !important;
}
#ptk-wrap .btn-primary {
  background: var(--teal) !important;
  border-color: var(--teal) !important;
  color: #fff !important;
}
#ptk-wrap .btn-primary:hover { background: var(--teal-dark) !important; border-color: var(--teal-dark) !important; }

#ptk-wrap .btn-submit {
  padding: 12px 28px !important;
  font-size: 14px !important;
  background: var(--navy) !important;
  border-color: var(--navy) !important;
  color: #fff !important;
}
#ptk-wrap .btn-submit:hover { background: var(--navy-mid) !important; }

#ptk-wrap .btn-ghost {
  padding: 8px 14px !important;
  font-size: 11px !important;
  background: transparent !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}
#ptk-wrap .btn-ghost:hover { background: var(--teal-light) !important; }

#ptk-wrap .btn-secondary {
  background: transparent !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}
#ptk-wrap .btn-secondary:hover { border-color: var(--text-mid) !important; color: var(--text) !important; }

#ptk-wrap .btn-resume,
#ptk-wrap .yesno-btn,
#ptk-wrap .popup-skip,
#ptk-wrap .popup-close {
  font-family: inherit !important;
  box-shadow: none !important;
  text-transform: none !important;
  width: auto !important;
}
#ptk-wrap .yesno-btn { border-radius: var(--r) !important; }

#ptk-wrap input,
#ptk-wrap select,
#ptk-wrap textarea {
  font-family: inherit !important;
  border-radius: var(--r) !important;
  box-shadow: none !important;
  min-height: 0 !important;
  line-height: 1.4 !important;
}

#ptk-wrap .ptk-download-btn {
  padding: 10px 18px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--teal-dark) !important;
  border: 1px solid var(--teal) !important;
  text-transform: none !important;
}
#ptk-wrap .ptk-download-btn:hover { background: var(--teal) !important; color: #ffffff !important; }

/* Floating widgets sit outside #ptk-wrap, so they are armoured by their own ids */
#chat-launcher {
  width: 58px !important;
  height: 58px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--teal) !important;
  border: none !important;
  text-transform: none !important;
}
#chat-launcher svg { width: 24px !important; height: 24px !important; }
#chat-window { border-radius: 20px !important; }
#chat-nudge { border-radius: 14px !important; }
#chat-window .chat-send {
  border-radius: 50% !important;
  width: 34px !important;
  height: 34px !important;
  min-height: 0 !important;
  padding: 0 !important;
}
#chat-window .qr-btn { border-radius: 20px !important; text-transform: none !important; width: auto !important; }


/* Every remaining interactive element, pinned to the values this stylesheet
   actually intends. The theme's global button rule (30px 50px padding, square
   corners) was winning on all of these - the resume banner button rendered at
   164x81px. Generated from the base rules above rather than hand-typed. */
#ptk-wrap .btn-resume {
  padding: 7px 14px !important;
  border-radius: var(--r) !important;
  font-size: 12px !important;
}
#ptk-wrap .popup-close {
  padding: 4px !important;
  font-size: 22px !important;
  line-height: 1 !important;
}
#ptk-wrap .popup-skip {
  padding: 4px !important;
  font-size: 12px !important;
}
#ptk-wrap .yesno-btn {
  padding: 9px 28px !important;
  border-radius: var(--r) !important;
  font-size: 14px !important;
}
#chat-window .btn-fill-form {
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}
#chat-window .chat-hdr-close {
  padding: 5px 8px !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  line-height: 1 !important;
}
#chat-window .chat-input {
  padding: 9px 16px !important;
  border-radius: 22px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}
#chat-window .chat-send {
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
}
#chat-window .qr-btn {
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
}
#chat-nudge {
  padding: 10px 16px !important;
  border-radius: 14px 14px 4px 14px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

/* Exit-save popup. The theme was overriding all three of these: the heading
   rendered white-on-white (invisible), and the close button and skip link
   both picked up a solid teal background. Colours and backgrounds pinned to
   the values the base rules above intend. */
#ptk-wrap .popup-h {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  line-height: 1.3 !important;
  text-transform: none !important;
  margin-bottom: 8px !important;
}
#ptk-wrap .popup-p {
  font-size: 14px !important;
  color: var(--text-muted) !important;
  line-height: 1.6 !important;
}
#ptk-wrap .popup-close {
  background: none !important;
  border: none !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
}
#ptk-wrap .popup-close:hover { color: var(--text) !important; background: none !important; }
#ptk-wrap .popup-skip {
  background: none !important;
  border: none !important;
  color: var(--text-light) !important;
  text-decoration: underline !important;
  box-shadow: none !important;
  letter-spacing: normal !important;
  border-radius: 0 !important;
}
#ptk-wrap .popup-skip:hover { color: var(--text-muted) !important; background: none !important; }
#ptk-wrap .popup-card { background: var(--white) !important; border-radius: var(--r-xl) !important; }

/* Found by sweeping the rendered form for low-contrast text. The theme was
   painting the disclosure Yes/No buttons solid teal with grey text, and the
   success heading white on a white card, which made the confirmation message
   invisible the moment someone submitted. */
#ptk-wrap .yesno-btn {
  background: none !important;
  border: 1.5px solid var(--border) !important;
  color: var(--text-muted) !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
#ptk-wrap .yesno-btn.active-yes {
  border-color: var(--red) !important;
  background: var(--red-light) !important;
  color: var(--red) !important;
}
#ptk-wrap .yesno-btn.active-no {
  border-color: var(--teal) !important;
  background: var(--teal-light) !important;
  color: var(--teal-dark) !important;
}
#ptk-wrap .success-h {
  font-size: 26px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  text-transform: none !important;
}
#ptk-wrap .success-p { font-size: 14px !important; color: var(--text-muted) !important; }
#ptk-wrap .success-ref {
  background: var(--teal-light) !important;
  border: 1px solid var(--teal-mid) !important;
  color: var(--teal-dark) !important;
  border-radius: 30px !important;
}
#ptk-wrap .success-icon { background: var(--teal) !important; border-radius: 50% !important; }
#ptk-wrap .capture-note { background: var(--teal-light) !important; color: var(--teal-xdark) !important; }
