/**
 * ptb.css — Styles for Phone Tree Builder Free Tool Page
 * Strictly adheres to design.txt tokens:
 *  --white: #ffffff
 *  --logo-navy: #13294b
 *  --navy: #0f2350
 *  --ink-soft: #5b6680
 *  --pink: #e8175d
 *  --pink-hi: #ff6b98
 *  --yellow: #f4f150
 *  --yellow-soft: #fbf8d2
 */

/* ==========================================================================
   Tool Section Container & Builder Shell
   ========================================================================== */
.ptb-section {
  background: #f6f7fa;
  padding-block: clamp(16px, 2.5svh, 36px);
  padding-inline: clamp(12px, 2vw, 32px);
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

.ptb-builder-mount {
  width: 100%;
  height: clamp(700px, calc(100vh - 90px), 1100px);
  position: relative;
  transition: height 0.2s ease;
}

/* Fullscreen Mode */
.ptb-shell.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  border-radius: 0 !important;
  border: none !important;
  z-index: 999999 !important;
  box-shadow: none !important;
}

/* Responsive Panel Transitions */
.ptb-palette {
  transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.25s ease;
}

.ptb-inspector-drawer {
  transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.25s ease, opacity 0.2s ease;
}

@media (max-width: 1050px) {
  .ptb-inspector-drawer {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    z-index: 25 !important;
    box-shadow: -12px 0 35px rgba(15, 35, 80, 0.18) !important;
    max-width: min(340px, 90vw) !important;
  }
}

.ptb-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  color: #0f2350;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ptb-tool-btn:hover {
  background: #eef0f5;
  border-color: #e6e9f0;
}
.ptb-tool-btn.is-active {
  background: #0f2350;
  color: #ffffff;
}

.ptb-zoom-badge {
  font-size: 12px;
  font-weight: 700;
  color: #5b6680;
  min-width: 38px;
  text-align: center;
  padding-inline: 2px;
  user-select: none;
}

@media (max-width: 768px) {
  .ptb-builder-mount {
    height: clamp(560px, calc(100vh - 70px), 800px);
  }
  .ptb-tool-btn span.btn-label {
    display: none;
  }
}

/* ==========================================================================
   Hero Adjustments for Free Tool
   ========================================================================== */
.ptb-hero {
  padding-top: clamp(80px, 12svh, 110px);
  padding-bottom: clamp(32px, 5svh, 48px);
  padding-inline: max(24px, calc(50vw - 600px));
  text-align: center;
}

.ptb-crumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.ptb-crumbs a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
}
.ptb-crumbs a:hover {
  text-decoration: underline;
}

.ptb-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.ptb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow-soft);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(244, 241, 80, 0.7);
}
.ptb-chip::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
}

/* ==========================================================================
   How It Works Steps
   ========================================================================== */
.ptb-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.ptb-step-card {
  background: #ffffff;
  border: 1px solid #e6e9f0;
  border-radius: 22px;
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 1px 2px rgba(15, 35, 80, 0.04);
  transition: transform 0.2s var(--ease-out, ease), border-color 0.2s ease;
}
.ptb-step-card:hover {
  transform: translateY(-4px);
  border-color: #d9deea;
}

.ptb-step-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--pink);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.ptb-step-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--logo-navy);
  margin: 0 0 10px;
  line-height: 1.25;
}
.ptb-step-desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Industry Templates Grid
   ========================================================================== */
.ptb-templates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.ptb-template-card {
  background: #ffffff;
  border: 1px solid #e6e9f0;
  border-radius: 22px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  box-shadow: 0 1px 2px rgba(15, 35, 80, 0.04);
  transition: transform 0.2s var(--ease-out, ease), border-color 0.2s ease;
}
.ptb-template-card:hover {
  transform: translateY(-4px);
  border-color: #d9deea;
}

.ptb-tpl-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ptb-tpl-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef0f5;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptb-tpl-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--logo-navy);
  margin: 0;
}
.ptb-tpl-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 16px;
}
.ptb-tpl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  background: #f6f7fa;
  border: 1px solid #e6e9f0;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s ease;
}
.ptb-tpl-btn:hover {
  background: #eef0f5;
}

/* ==========================================================================
   Comparison Cards (±1.5deg tilt rule)
   ========================================================================== */
.ptb-compare-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 52px;
}

.ptb-compare-card {
  border-radius: 26px;
  padding: 38px 34px;
  position: relative;
  box-shadow: 0 12px 28px -18px rgba(15,35,80,0.1);
}

.ptb-compare-card--tree {
  background: #ffffff;
  border: 1px solid #e6e9f0;
  rotate: -1.2deg;
}

.ptb-compare-card--hannah {
  background: var(--logo-navy);
  color: #ffffff;
  border: 1px solid var(--logo-navy);
  rotate: 1.2deg;
  box-shadow: 0 40px 90px -50px rgba(15,35,80,0.45);
}

.ptb-compare-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.ptb-compare-card--tree .ptb-compare-badge {
  background: #eef0f5;
  color: var(--navy);
}
.ptb-compare-card--hannah .ptb-compare-badge {
  background: var(--pink);
  color: #ffffff;
}

.ptb-timeline {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ptb-timeline li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
}
.ptb-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ptb-compare-card--tree .ptb-timeline-dot {
  background: var(--ink-soft);
}
.ptb-compare-card--hannah .ptb-timeline-dot {
  background: var(--yellow);
}

/* ==========================================================================
   Editorial Guide & Callout Blocks
   ========================================================================== */
.ptb-guide-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--navy);
}
.ptb-guide-content h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--logo-navy);
  margin: 40px 0 14px;
}
.ptb-guide-content p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}
.ptb-script-box {
  background: #f6f7fa;
  border-left: 4px solid var(--pink);
  border-radius: 0 14px 14px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--navy);
}

/* ==========================================================================
   Glossary Table
   ========================================================================== */
.ptb-glossary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 18px;
  border: 1px solid #e6e9f0;
  overflow: hidden;
  margin-top: 36px;
  background: #ffffff;
}
.ptb-glossary-table th {
  background: #f6f7fa;
  color: var(--logo-navy);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid #e6e9f0;
}
.ptb-glossary-table td {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--navy);
  border-bottom: 1px solid #eef0f5;
  vertical-align: top;
}
.ptb-glossary-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.ptb-faq-list {
  max-width: 860px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ptb-faq-item {
  border: 1px solid #e6e9f0;
  border-radius: 16px;
  background: #ffffff;
  padding: 18px 22px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.ptb-faq-item[open] {
  border-color: #d9deea;
}
.ptb-faq-item summary {
  font-size: 17px;
  font-weight: 700;
  color: var(--logo-navy);
  outline: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ptb-faq-item summary::-webkit-details-marker {
  display: none;
}
.ptb-faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--ink-soft);
  font-weight: 400;
}
.ptb-faq-item[open] summary::after {
  content: "\2212";
}
.ptb-faq-item p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ==========================================================================
   Mobile & Responsive Breakpoints (1000px and 760px)
   ========================================================================== */
@media (max-width: 1000px) {
  .ptb-steps,
  .ptb-templates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ptb-compare-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ptb-steps,
  .ptb-templates-grid {
    grid-template-columns: 1fr;
  }
  .ptb-palette {
    width: 64px;
  }
}

/* ==========================================================================
   Live Call Simulator Active Node Glow & Draggable Window
   ========================================================================== */
.ptb-node-card.is-sim-active {
  border: 2px solid #28c840 !important;
  box-shadow: 0 0 0 5px rgba(40, 200, 64, 0.28), 0 16px 40px -10px rgba(40, 200, 64, 0.45) !important;
  transform: scale(1.025);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  z-index: 10;
}

.ptb-sim-window {
  position: fixed;
  z-index: 99999;
  width: clamp(280px, 25vw, 390px);
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 30px);
  background: #ffffff;
  border-radius: clamp(16px, 2vw, 24px);
  box-shadow: 0 30px 80px -20px rgba(15, 35, 80, 0.42), 0 0 0 1px rgba(15, 35, 80, 0.12);
  overflow-y: auto;
  overflow-x: hidden;
  user-select: none;
  touch-action: none;
  box-sizing: border-box;
  animation: ptbSimPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ptbSimPopIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   Connection Ports, Target Sockets & Call Path Tracing
   ========================================================================== */
.ptb-node-port-pin {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.ptb-node-port-pin:hover {
  transform: scale(1.25);
  border-color: #e8175d !important;
}

.ptb-target-pin {
  box-sizing: border-box;
}

@keyframes ptbDashMove {
  to {
    stroke-dashoffset: -18;
  }
}

