/* Pretty Papery — Tool Page Components
   Loaded on every page (tiny). Used by /tools/* pages. */

/* ============ Donut Chart (Budget Calc) ============ */
.pp-donut {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  margin: 0 auto;
  position: relative;
}
.pp-donut svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.pp-donut-segment {
  fill: none;
  stroke-width: 16;
  transition: stroke-width 200ms ease;
}
.pp-donut-segment:hover {
  stroke-width: 22;
  cursor: pointer;
}
.pp-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.pp-donut-center .pp-total {
  font-family: Cormorant, Georgia, serif;
  font-size: 2.4rem;
  font-weight: 300;
  color: #1f2937;
  line-height: 1;
}
.pp-donut-center .pp-label {
  font-family: Cormorant, Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  color: #b47958;
  margin-top: 6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Donut Legend */
.pp-donut-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-top: 28px;
}
.pp-donut-legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}
.pp-donut-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}
.pp-donut-legend-label {
  color: #6b7280;
  flex: 1;
}
.pp-donut-legend-amount {
  font-family: Cormorant, Georgia, serif;
  font-size: 1.05rem;
  color: #1f2937;
  font-weight: 500;
}

/* ============ Timeline Bar (Save-the-Date Calc) ============ */
.pp-timeline-bar {
  position: relative;
  /* generous vertical room for labels above + below */
  margin: 24px 0 32px;
  padding: 80px 8px 64px;
}
.pp-timeline-track {
  position: relative;
  height: 4px;
  background: linear-gradient(to right, #f0e6d7 0%, #b47958 100%);
  border-radius: 2px;
}
.pp-timeline-marker {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1f2937;
  border: 3px solid #faf6f0;
  cursor: default;
}
.pp-timeline-marker.is-end {
  background: #b47958;
  width: 20px;
  height: 20px;
  top: -8px;
}
.pp-timeline-marker.is-today {
  background: #9ca3af;
  width: 12px;
  height: 12px;
  top: -4px;
}
.pp-timeline-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  white-space: nowrap;
  text-align: center;
}
/* Labels alternate above/below to avoid overlap.
   Connector line drawn via ::before. */
.pp-timeline-label.is-above {
  bottom: calc(50% + 14px);
}
.pp-timeline-label.is-below {
  top: calc(50% + 14px);
}
.pp-timeline-label.is-above::after,
.pp-timeline-label.is-below::before {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 16px;
  background: #d6c7af;
}
.pp-timeline-label.is-above::after { bottom: -16px; }
.pp-timeline-label.is-below::before { top: -16px; }
.pp-timeline-label-date {
  display: block;
  font-family: Cormorant, Georgia, serif;
  font-size: 0.92rem;
  font-style: italic;
  color: #1f2937;
  margin-top: 2px;
  text-transform: none;
  letter-spacing: 0;
}
.pp-timeline-past-note {
  background: #fef3e7;
  border-left: 3px solid #b47958;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #6b4d33;
  margin-bottom: 24px;
  line-height: 1.5;
}
.pp-timeline-past-note strong {
  color: #1f2937;
}
@media (max-width: 640px) {
  .pp-timeline-label {
    font-size: 0.6rem;
    max-width: 80px;
    white-space: normal;
  }
  .pp-timeline-label-date { font-size: 0.75rem; }
  .pp-timeline-bar { padding: 90px 8px 80px; }
}

/* ============ Hour Bar (Timeline Generator) ============ */
.pp-hour-bar {
  position: relative;
  margin: 28px 0 40px;
  padding: 0 8px;
}
.pp-hour-track {
  position: relative;
  height: 8px;
  background: #f0e6d7;
  border-radius: 4px;
}
.pp-hour-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.7rem;
  color: #9ca3af;
  letter-spacing: 0.08em;
}
.pp-hour-event {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  width: 12px;
  height: 20px;
  background: #b47958;
  border-radius: 2px;
}
.pp-hour-event.is-major {
  background: #1f2937;
  width: 14px;
  height: 24px;
  top: -8px;
}

/* ============ Cross-Sell Section ============ */
.pp-crosssell {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid #e7d9c4;
}
.pp-crosssell-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 640px) {
  .pp-crosssell-grid { grid-template-columns: 1fr; }
}
.pp-crosssell-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.pp-crosssell-card-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f0e6d7;
  border-radius: 2px;
}
.pp-crosssell-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.pp-crosssell-card:hover .pp-crosssell-card-img img {
  transform: scale(1.04);
}

/* ============ Action Bar (Export buttons) ============ */
.pp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 8px;
}
.pp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 1px solid #e7d9c4;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #1f2937;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
}
.pp-action-btn:hover {
  background: #1f2937;
  color: #faf6f0;
  border-color: #1f2937;
}
.pp-action-btn svg {
  width: 14px;
  height: 14px;
}

/* ============ Print Stylesheet ============ */
@media print {
  /* Hide everything that's not the main result */
  header, nav, footer, form, .pp-actions, .pp-crosssell,
  .lang-switch, [class*="ornament-"]:not(.pp-print-keep) {
    display: none !important;
  }
  body {
    background: white !important;
    color: #1f2937 !important;
    font-size: 11pt;
  }
  /* Brand-mini-header for the printed page */
  .pp-print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 24pt;
    padding-bottom: 12pt;
    border-bottom: 1px solid #ccc;
  }
  .pp-print-header h1 {
    font-family: Cormorant, Georgia, serif;
    font-style: italic;
    font-size: 14pt;
    color: #b47958;
    margin: 0;
    letter-spacing: 0.15em;
  }
  .pp-print-header p {
    font-size: 9pt;
    color: #6b7280;
    margin: 4pt 0 0;
  }
  /* Result blocks become clean, no shadows */
  [class*="bg-"], [class*="border-"] {
    box-shadow: none !important;
    background: white !important;
  }
  .pp-donut {
    max-width: 220px;
  }
  /* Page break hints */
  .pp-print-pagebreak { page-break-before: always; }
  .pp-print-keep-together { page-break-inside: avoid; }
}
.pp-print-header { display: none; }  /* Only visible on print */
