/*
  Phone Distraction Cost Calculator. Scoped to .pdc-page and built only on
  shared tokens in styles.css (:root). No gradients, no decorative shadows;
  elevation comes from tonal surfaces, matching the 4 reference tools.
*/

.pdc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pdc-page.seo-design-template .how-hero.pdc-hero {
  display: block;
  min-height: 0;
  padding: 72px 0 56px;
}

.pdc-page.seo-design-template .pdc-hero .text-card h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.1;
}

.pdc-h1-payoff {
  display: block;
}

.pdc-page.seo-design-template .pdc-hero .lead {
  max-width: 640px;
  margin: 0 auto;
}

.pdc-disclaimer {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--fella-secondary-text);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

/* Tool shell — matches vs-compare width for exact horizontal alignment */
.pdc-tool {
  max-width: none;
  margin: 36px auto 0;
  text-align: left;
}

.pdc-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.pdc-card:focus-visible {
  outline: 2px solid var(--fella-accent);
  outline-offset: 2px;
}

/* Grid */
.pdc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.pdc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdc-field--full {
  grid-column: 1 / -1;
}

.pdc-label {
  color: var(--fella-primary-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.pdc-label span {
  color: var(--fella-secondary-text);
  font-weight: 400;
}

.pdc-hint {
  color: var(--fella-secondary-text);
  font-size: 12px;
  line-height: 1.4;
}

.pdc-control {
  display: flex;
  gap: 8px;
}

.pdc-input,
.pdc-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--fella-separator);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--fella-primary-text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.pdc-select {
  padding-right: 34px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%231d1d1f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 12px;
  cursor: pointer;
}

.pdc-input:focus-visible,
.pdc-select:focus-visible {
  outline: 2px solid var(--fella-accent);
  outline-offset: 2px;
}

.pdc-input:hover,
.pdc-select:hover {
  filter: var(--hover-brighten);
}

.pdc-time-group {
  display: flex;
  gap: 8px;
}

.pdc-time-group .pdc-select {
  flex: 1;
}

.pdc-details {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--fella-separator);
  border-radius: var(--radius-md);
  background: var(--fella-card);
}

.pdc-details summary {
  color: var(--fella-primary-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.pdc-details summary::-webkit-details-marker {
  display: none;
}

.pdc-details summary::before {
  content: "›";
  display: inline-block;
  margin-right: 8px;
  transition: transform 150ms ease;
}

.pdc-details[open] summary::before {
  transform: rotate(90deg);
}

.pdc-details-body {
  margin-top: 12px;
  color: var(--fella-secondary-text);
  font-size: 13px;
  line-height: 1.5;
}

.pdc-details-body p {
  margin: 0 0 8px;
}

.pdc-details-body p:last-child {
  margin-bottom: 0;
}

.pdc-status {
  min-height: 20px;
  margin: 16px 0 0;
  color: var(--fella-destructive);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.pdc-status:empty {
  display: none;
}

/* Results */
.pdc-results {
  margin-top: 20px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.pdc-results[hidden] {
  display: none;
}

.pdc-fallback {
  margin: 0;
  color: var(--fella-primary-text);
  font-size: 15px;
  text-align: center;
}

.pdc-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 16px;
}

.pdc-figure {
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
}

.pdc-figure dt {
  color: var(--fella-secondary-text);
  font-size: 13px;
  line-height: 1.35;
}

.pdc-figure dd {
  margin: 0;
  color: var(--fella-primary-text);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.pdc-cost {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--fella-secondary-fill);
}

.pdc-cost-figure {
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  text-align: center;
}

.pdc-cost-figure dt {
  color: var(--fella-secondary-text);
  font-size: 12px;
}

.pdc-cost-figure dd {
  margin: 0;
  color: var(--fella-primary-text);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pdc-table-wrap {
  margin-top: 16px;
}

.pdc-note {
  margin-top: 12px;
  color: var(--fella-secondary-text);
  font-size: 12px;
  line-height: 1.45;
}

.pdc-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.pdc-copy-row .button {
  flex: 1 1 160px;
  min-height: 44px;
}

.pdc-copy-row .button-secondary {
  background: transparent;
  border: 1px solid var(--fella-primary-text);
  color: var(--fella-primary-text);
  font-weight: 500;
  font-size: 15px;
}

.pdc-copy-row .button-primary {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-weight: 500;
  font-size: 15px;
}

.pdc-page.seo-design-template .pdc-results .vs-compare-wrap {
  max-width: 100%;
  margin: 12px 0 0;
  overflow-x: auto;
}

@media (max-width: 767px) {
  .pdc-page.seo-design-template .how-hero.pdc-hero {
    padding: 48px 0 32px;
  }

  .pdc-page.seo-design-template .pdc-hero .text-card h1 {
    font-size: 34px;
  }

  .pdc-h1-payoff {
    margin-top: 6px;
    font-size: 24px;
  }

  .pdc-tool {
    margin-top: 28px;
  }

  .pdc-card {
    padding: 20px 16px;
  }

  .pdc-grid {
    grid-template-columns: 1fr;
  }

  .pdc-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pdc-cost {
    grid-template-columns: 1fr;
  }

  .pdc-copy-row {
    flex-direction: column;
  }

  .pdc-copy-row .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdc-input,
  .pdc-select {
    transition: none;
  }
}

/* Hold the tool's rendered height until its script replaces the no-JS note,
   so the sections below do not jump when the tool appears (layout shift). */
@media (scripting: enabled) {
  [data-pdc]:has([data-pdc-fallback]) {
    min-height: 1480px;
  }

  @media (min-width: 768px) {
    [data-pdc]:has([data-pdc-fallback]) {
      min-height: 920px;
    }
  }
}
