/*
 * 123TinyTools - PDF Merger
 * Version: 1.0.0
 * All selectors scoped under .tia-pm-wrap
 * Category: PDF Tools — red accent #EF4444
 */

/* ── TOKENS ──────────────────────────────────────────────────── */
.tia-pm-wrap {
  --pm-accent:        #EF4444;
  --pm-accent-h:      #DC2626;
  --pm-accent-rgb:    239,68,68;
  --pm-accent-light:  #FEE2E2;
  --pm-accent-border: #FCA5A5;
  --pm-accent-dark:   #7F1D1D;
  --pm-surface:       #FFFFFF;
  --pm-bg:            #F8FAFD;
  --pm-border:        #E4EAF4;
  --pm-border-s:      #CBD5E1;
  --pm-text:          #1E293B;
  --pm-body:          #475569;
  --pm-muted:         #64748B;
  --pm-r-sm:          6px;
  --pm-r-md:          10px;
  --pm-r-lg:          12px;
  --pm-r-xl:          22px;
  --pm-r-pill:        9999px;
  --pm-sh-card:       0 2px 20px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --pm-sh-sm:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.06);
  --pm-font-h:        'Plus Jakarta Sans', system-ui, sans-serif;
  --pm-font-b:        'Inter', system-ui, sans-serif;

  font-family: var(--pm-font-b);
  color: var(--pm-text);
  padding: 24px 0 64px;
}

/* ── DARK MODE (all 6 signals) ───────────────────────────────── */
html[data-theme="dark"] .tia-pm-wrap,
html.wp-dark-mode-active .tia-pm-wrap,
body.wp-dark-mode-active .tia-pm-wrap,
body.kt-dark-mode .tia-pm-wrap,
body.dark-mode .tia-pm-wrap,
body[data-theme="dark"] .tia-pm-wrap {
  --pm-surface: #1E293B;
  --pm-bg:      #0F172A;
  --pm-border:  #334155;
  --pm-border-s:#475569;
  --pm-text:    #F1F5F9;
  --pm-body:    #CBD5E1;
  --pm-muted:   #94A3B8;
}

/* ── HEADER ──────────────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-header { margin-bottom: 20px; }

.tia-pm-wrap .tia-pm-title {
  font-family: var(--pm-font-h);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--pm-text);
  margin: 0 0 6px;
  line-height: 1.2;
}

.tia-pm-wrap .tia-pm-tagline {
  font-size: 14px;
  color: var(--pm-muted);
  line-height: 1.55;
  margin: 0 0 12px;
}

.tia-pm-wrap .tia-pm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tia-pm-wrap .tia-pm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: var(--pm-r-pill);
  padding: 3px 10px;
  color: var(--pm-accent-dark);
  background: var(--pm-accent-light);
  border: 1px solid var(--pm-accent-border);
}

html[data-theme="dark"] .tia-pm-wrap .tia-pm-badge,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-badge,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-badge,
body.kt-dark-mode .tia-pm-wrap .tia-pm-badge,
body.dark-mode .tia-pm-wrap .tia-pm-badge,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-badge {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.30);
  color: #FCA5A5;
}

/* ── PRIVACY NOTICE ─────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EFF4FF;
  border: 1px solid #B8D0FF;
  border-radius: var(--pm-r-md);
  padding: 10px 14px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 20px;
}
.tia-pm-wrap .tia-pm-notice svg { flex-shrink: 0; stroke: #5B8DEF; }

html[data-theme="dark"] .tia-pm-wrap .tia-pm-notice,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-notice,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-notice,
body.kt-dark-mode .tia-pm-wrap .tia-pm-notice,
body.dark-mode .tia-pm-wrap .tia-pm-notice,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-notice {
  background: rgba(91,141,239,.12);
  border-color: rgba(91,141,239,.30);
  color: #CBD5E1;
}

/* ── CARDS ───────────────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-card {
  background: var(--pm-surface);
  border-radius: var(--pm-r-xl);
  box-shadow: var(--pm-sh-card);
  overflow: hidden;
  margin-bottom: 20px;
}

/* ── UPLOAD / DROP ZONE ──────────────────────────────────────── */
.tia-pm-wrap .tia-pm-card--upload { padding: 0; }

.tia-pm-wrap .tia-pm-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 24px;
  border: 2.5px dashed var(--pm-accent-border);
  border-radius: var(--pm-r-xl);
  background: var(--pm-accent-light);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tia-pm-wrap .tia-pm-drop-zone:hover,
.tia-pm-wrap .tia-pm-drop-zone--active {
  border-color: var(--pm-accent);
  background: #FECACA;
}

html[data-theme="dark"] .tia-pm-wrap .tia-pm-drop-zone,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-drop-zone,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-drop-zone,
body.kt-dark-mode .tia-pm-wrap .tia-pm-drop-zone,
body.dark-mode .tia-pm-wrap .tia-pm-drop-zone,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-drop-zone {
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.35);
}

.tia-pm-wrap .tia-pm-drop-icon-box {
  width: 64px;
  height: 64px;
  background: rgba(239,68,68,.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  stroke: var(--pm-accent);
}

.tia-pm-wrap .tia-pm-drop-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--pm-text);
  margin: 0;
}
.tia-pm-wrap .tia-pm-drop-link  { color: var(--pm-accent); text-decoration: underline; }
.tia-pm-wrap .tia-pm-drop-hint  { font-size: 12.5px; color: var(--pm-muted); margin: 0; }
.tia-pm-wrap .tia-pm-file-hidden { display: none; }

/* ── PDF LIST CARD ───────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-card--list { padding: 18px 20px; }

.tia-pm-wrap .tia-pm-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.tia-pm-wrap .tia-pm-list-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-text);
}

.tia-pm-wrap .tia-pm-list-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── PDF FILE LIST ───────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.tia-pm-wrap .tia-pm-pdf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--pm-bg);
  border: 1.5px solid var(--pm-border);
  border-radius: var(--pm-r-md);
  animation: pm-item-in .18s ease;
  transition: border-color .15s;
}
.tia-pm-wrap .tia-pm-pdf-item:hover { border-color: var(--pm-border-s); }

@keyframes pm-item-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tia-pm-wrap .tia-pm-pdf-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--pm-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--pm-sh-sm);
}

.tia-pm-wrap .tia-pm-pdf-icon-wrap {
  width: 40px;
  height: 50px;
  min-width: 40px;
  background: var(--pm-accent-light);
  border: 1.5px solid var(--pm-accent-border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  stroke: var(--pm-accent);
}

html[data-theme="dark"] .tia-pm-wrap .tia-pm-pdf-icon-wrap,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-pdf-icon-wrap,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-pdf-icon-wrap,
body.kt-dark-mode .tia-pm-wrap .tia-pm-pdf-icon-wrap,
body.dark-mode .tia-pm-wrap .tia-pm-pdf-icon-wrap,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-pdf-icon-wrap {
  background: rgba(239,68,68,.12);
  border-color: rgba(239,68,68,.28);
}

.tia-pm-wrap .tia-pm-pdf-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tia-pm-wrap .tia-pm-pdf-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--pm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tia-pm-wrap .tia-pm-pdf-meta {
  font-size: 12px;
  color: var(--pm-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.tia-pm-wrap .tia-pm-pdf-sep { opacity: .4; }

.tia-pm-wrap .tia-pm-pdf-pages { color: var(--pm-muted); }

.tia-pm-wrap .tia-pm-pdf-pages--error {
  color: #B91C1C;
  font-weight: 600;
}
html[data-theme="dark"] .tia-pm-wrap .tia-pm-pdf-pages--error,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-pdf-pages--error,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-pdf-pages--error,
body.kt-dark-mode .tia-pm-wrap .tia-pm-pdf-pages--error,
body.dark-mode .tia-pm-wrap .tia-pm-pdf-pages--error,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-pdf-pages--error { color: #FCA5A5; }

.tia-pm-wrap .tia-pm-pdf-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* ── CONTROL BUTTONS (move / remove) ─────────────────────────── */
.tia-pm-wrap .tia-pm-ctrl-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-r-sm);
  cursor: pointer;
  color: var(--pm-muted);
  transition: all .12s;
  flex-shrink: 0;
}
/* Explicit stroke so theme button colour overrides can't blank the icons */
.tia-pm-wrap .tia-pm-ctrl-btn svg {
  stroke: var(--pm-muted);
  fill: none;
  flex-shrink: 0;
  display: block;
}
.tia-pm-wrap .tia-pm-ctrl-btn:hover { background: #F1F5F9; color: var(--pm-text); }
.tia-pm-wrap .tia-pm-ctrl-btn:hover svg { stroke: var(--pm-text); }
.tia-pm-wrap .tia-pm-ctrl-btn:disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }
.tia-pm-wrap .tia-pm-remove-btn:hover {
  background: var(--pm-accent-light);
  border-color: var(--pm-accent-border);
  color: var(--pm-accent);
}
.tia-pm-wrap .tia-pm-remove-btn:hover svg { stroke: var(--pm-accent); }

html[data-theme="dark"] .tia-pm-wrap .tia-pm-ctrl-btn:hover,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-ctrl-btn:hover,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-ctrl-btn:hover,
body.kt-dark-mode .tia-pm-wrap .tia-pm-ctrl-btn:hover,
body.dark-mode .tia-pm-wrap .tia-pm-ctrl-btn:hover,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-ctrl-btn:hover { background: #334155; color: #F1F5F9; }
html[data-theme="dark"] .tia-pm-wrap .tia-pm-ctrl-btn:hover svg,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-ctrl-btn:hover svg,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-ctrl-btn:hover svg,
body.kt-dark-mode .tia-pm-wrap .tia-pm-ctrl-btn:hover svg,
body.dark-mode .tia-pm-wrap .tia-pm-ctrl-btn:hover svg,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-ctrl-btn:hover svg { stroke: #F1F5F9; }

/* ── LIST FOOTER ─────────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--pm-border);
}

.tia-pm-wrap .tia-pm-total-size { font-size: 12.5px; color: var(--pm-muted); }

.tia-pm-wrap .tia-pm-limit-note {
  font-size: 12px;
  color: var(--pm-accent-dark);
  background: var(--pm-accent-light);
  border: 1px solid var(--pm-accent-border);
  border-radius: var(--pm-r-pill);
  padding: 2px 10px;
}

html[data-theme="dark"] .tia-pm-wrap .tia-pm-limit-note,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-limit-note,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-limit-note,
body.kt-dark-mode .tia-pm-wrap .tia-pm-limit-note,
body.dark-mode .tia-pm-wrap .tia-pm-limit-note,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-limit-note {
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.35);
  color: #FCA5A5;
}

.tia-pm-wrap .tia-pm-limit-link { color: var(--pm-accent); font-weight: 600; text-decoration: underline; }

/* ── SETTINGS CARD ───────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-card--settings { padding: 20px 22px 24px; }

.tia-pm-wrap .tia-pm-settings-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--pm-text);
  margin: 0 0 18px;
}

.tia-pm-wrap .tia-pm-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.tia-pm-wrap .tia-pm-setting-group { display: flex; flex-direction: column; gap: 7px; }
.tia-pm-wrap .tia-pm-setting-group--full { grid-column: 1 / -1; }

.tia-pm-wrap .tia-pm-setting-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--pm-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── FILENAME INPUT ──────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-filename-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--pm-border);
  border-radius: var(--pm-r-md);
  overflow: hidden;
  transition: border-color .15s;
}
.tia-pm-wrap .tia-pm-filename-wrap:focus-within {
  border-color: var(--pm-accent);
  box-shadow: 0 0 0 3px rgba(var(--pm-accent-rgb),.14);
}

.tia-pm-wrap .tia-pm-input {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--pm-text);
  background: var(--pm-bg);
  border: none;
  outline: none;
  font-family: var(--pm-font-b);
}
.tia-pm-wrap .tia-pm-filename-ext {
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pm-muted);
  background: var(--pm-border);
  border-left: 1.5px solid var(--pm-border);
  white-space: nowrap;
}

/* ── ACTION BAR ──────────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-action-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.tia-pm-wrap .tia-pm-status-wrap { display: flex; flex-direction: column; gap: 6px; }

.tia-pm-wrap .tia-pm-progress-track {
  height: 6px;
  background: var(--pm-border);
  border-radius: var(--pm-r-pill);
  overflow: hidden;
}
.tia-pm-wrap .tia-pm-progress-fill {
  height: 100%;
  background: var(--pm-accent);
  border-radius: var(--pm-r-pill);
  transition: width .3s ease;
}

.tia-pm-wrap .tia-pm-status-msg {
  font-size: 13px;
  color: var(--pm-muted);
}
.tia-pm-wrap .tia-pm-status--success { color: #14532D; }
.tia-pm-wrap .tia-pm-status--error   { color: #991B1B; }
.tia-pm-wrap .tia-pm-status--warn    { color: #78350F; }

html[data-theme="dark"] .tia-pm-wrap .tia-pm-status--success,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-status--success,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-status--success,
body.kt-dark-mode .tia-pm-wrap .tia-pm-status--success,
body.dark-mode .tia-pm-wrap .tia-pm-status--success,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-status--success { color: #86EFAC; }

/* ── PRIMARY BUTTON ──────────────────────────────────────────── */
.tia-pm-wrap .tia-pm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--pm-accent);
  color: #fff;
  border: none;
  border-radius: var(--pm-r-pill);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(var(--pm-accent-rgb),.45);
  transition: all .15s;
  font-family: var(--pm-font-b);
  width: 100%;
}
.tia-pm-wrap .tia-pm-btn-primary:hover {
  background: var(--pm-accent-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(var(--pm-accent-rgb),.55);
}
.tia-pm-wrap .tia-pm-btn-primary:active { transform: translateY(0); }
.tia-pm-wrap .tia-pm-btn-primary:disabled {
  background: #CBD5E1;
  color: #64748B;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

html[data-theme="dark"] .tia-pm-wrap .tia-pm-btn-primary:disabled,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-btn-primary:disabled,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-btn-primary:disabled,
body.kt-dark-mode .tia-pm-wrap .tia-pm-btn-primary:disabled,
body.dark-mode .tia-pm-wrap .tia-pm-btn-primary:disabled,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-btn-primary:disabled {
  background: #1E293B;
  color: #475569;
}

/* ── SECONDARY & GHOST BUTTONS ───────────────────────────────── */
.tia-pm-wrap .tia-pm-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pm-body);
  background: var(--pm-surface);
  border: 1.5px solid var(--pm-border);
  border-radius: var(--pm-r-pill);
  cursor: pointer;
  font-family: var(--pm-font-b);
  transition: all .15s;
}
.tia-pm-wrap .tia-pm-btn-secondary:hover {
  border-color: var(--pm-accent-border);
  color: var(--pm-accent);
  background: var(--pm-accent-light);
}

.tia-pm-wrap .tia-pm-btn-ghost {
  background: transparent;
  color: var(--pm-muted);
  border: none;
  border-radius: var(--pm-r-md);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--pm-font-b);
  transition: all .15s;
}
.tia-pm-wrap .tia-pm-btn-ghost:hover { background: #F1F5F9; color: var(--pm-body); }

html[data-theme="dark"] .tia-pm-wrap .tia-pm-btn-ghost:hover,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-btn-ghost:hover,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-btn-ghost:hover,
body.kt-dark-mode .tia-pm-wrap .tia-pm-btn-ghost:hover,
body.dark-mode .tia-pm-wrap .tia-pm-btn-ghost:hover,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-btn-ghost:hover { background: #334155; color: #CBD5E1; }

/* ── ACCESS GATE MODALS ──────────────────────────────────────── */
.tia-pm-wrap .tia-pm-gate {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tia-pm-wrap .tia-pm-gate-modal {
  background: var(--pm-surface);
  border-radius: var(--pm-r-xl);
  padding: 36px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.tia-pm-wrap .tia-pm-gate-icon {
  width: 56px;
  height: 56px;
  background: var(--pm-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  stroke: var(--pm-accent);
}

.tia-pm-wrap .tia-pm-gate-title {
  font-family: var(--pm-font-h);
  font-size: 20px;
  font-weight: 800;
  color: var(--pm-text);
  margin: 0 0 8px;
}

.tia-pm-wrap .tia-pm-gate-sub {
  font-size: 14px;
  color: var(--pm-body);
  margin: 0 0 20px;
  line-height: 1.55;
}

.tia-pm-wrap .tia-pm-gate-btn {
  display: block;
  padding: 12px 24px;
  background: var(--pm-accent);
  color: #fff;
  border: none;
  border-radius: var(--pm-r-pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(var(--pm-accent-rgb),.4);
  transition: all .15s;
  font-family: var(--pm-font-b);
}
.tia-pm-wrap .tia-pm-gate-btn:hover { background: var(--pm-accent-h); transform: translateY(-1px); }

.tia-pm-wrap .tia-pm-gate-link {
  font-size: 13px;
  color: var(--pm-muted);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--pm-font-b);
  display: block;
  margin: 0 auto;
}
.tia-pm-wrap .tia-pm-gate-link:hover { color: var(--pm-text); text-decoration: underline; }

/* ── SEO CONTENT & FAQ ───────────────────────────────────────── */
.tia-pm-wrap .tia-pm-seo-content {
  margin: 36px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--pm-body);
}
.tia-pm-wrap .tia-pm-seo-content h2 { font-family: var(--pm-font-h); font-size: 21px; font-weight: 700; color: var(--pm-text); margin: 0 0 14px; }
.tia-pm-wrap .tia-pm-seo-content h3 { font-size: 17px; font-weight: 700; color: var(--pm-text); margin: 22px 0 8px; }
.tia-pm-wrap .tia-pm-seo-content p  { margin: 0 0 14px; }
.tia-pm-wrap .tia-pm-seo-content ul,
.tia-pm-wrap .tia-pm-seo-content ol { margin: 0 0 14px; padding-left: 20px; }
.tia-pm-wrap .tia-pm-seo-content li { margin-bottom: 6px; }

.tia-pm-wrap .tia-pm-faq-section { margin: 32px 0 0; }
.tia-pm-wrap .tia-pm-faq-heading { font-family: var(--pm-font-h); font-size: 18px; font-weight: 700; color: var(--pm-text); margin: 0 0 14px; }
.tia-pm-wrap .tia-pm-faq-list    { display: flex; flex-direction: column; gap: 8px; }

.tia-pm-wrap .tia-pm-faq-item {
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-r-lg);
  overflow: hidden;
}

.tia-pm-wrap .tia-pm-faq-q {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pm-text);
  cursor: pointer;
  list-style: none;
  transition: background .15s, color .15s;
}
.tia-pm-wrap .tia-pm-faq-q::-webkit-details-marker { display: none; }
.tia-pm-wrap .tia-pm-faq-q:hover { background: var(--pm-accent-light); color: var(--pm-accent); }

html[data-theme="dark"] .tia-pm-wrap .tia-pm-faq-q,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-faq-q,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-faq-q,
body.kt-dark-mode .tia-pm-wrap .tia-pm-faq-q,
body.dark-mode .tia-pm-wrap .tia-pm-faq-q,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-faq-q { color: #F1F5F9 !important; }

.tia-pm-wrap .tia-pm-faq-a {
  padding: 14px 18px 18px;
  font-size: 14px;
  color: var(--pm-body);
  line-height: 1.7;
  background: var(--pm-bg);
  border-top: 1px solid var(--pm-border);
}

html[data-theme="dark"] .tia-pm-wrap .tia-pm-faq-a,
html.wp-dark-mode-active .tia-pm-wrap .tia-pm-faq-a,
body.wp-dark-mode-active .tia-pm-wrap .tia-pm-faq-a,
body.kt-dark-mode .tia-pm-wrap .tia-pm-faq-a,
body.dark-mode .tia-pm-wrap .tia-pm-faq-a,
body[data-theme="dark"] .tia-pm-wrap .tia-pm-faq-a { background: #0F172A; color: #CBD5E1; border-color: #334155; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tia-pm-wrap .tia-pm-header  { text-align: center; }
  .tia-pm-wrap .tia-pm-tagline { text-align: center; }
  .tia-pm-wrap .tia-pm-badges  { justify-content: center; }
}

@media (max-width: 540px) {
  .tia-pm-wrap { overflow-x: hidden; padding: 16px 0 48px; }
  .tia-pm-wrap .tia-pm-card--list,
  .tia-pm-wrap .tia-pm-card--settings { padding: 14px; }
  .tia-pm-wrap .tia-pm-pdf-item { padding: 10px 12px; gap: 8px; }
  .tia-pm-wrap .tia-pm-pdf-icon-wrap { width: 34px; height: 42px; min-width: 34px; }
  .tia-pm-wrap .tia-pm-list-header { flex-direction: column; align-items: flex-start; }
  .tia-pm-wrap .tia-pm-gate-modal { padding: 28px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
