/* =============================================
   Pentair-style Pool Volume Calculator — 1:1
   ============================================= */

/* --- Page --- */
.pvc-page { background: #fff; }
.pvc { max-width: 880px; margin: 0 auto; padding: 2rem 1rem 3rem; }

/* --- Card --- */
.pvc-card {
  background: #fff;
  border: none;
  position: relative;
}

/* =============================================
   HERO BANNER
   ============================================= */
.pvc-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  background: url('/Pool_images/Serene%20modern%20backyard%20with%20pool.png') center/cover no-repeat;
  color: #fff;
  text-align: center;
}
.pvc-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 36, 64, 0.90) 0%,
    rgba(26, 58, 92, 0.80) 40%,
    rgba(8, 145, 178, 0.70) 100%
  );
}
.pvc-hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 3.5rem 1.5rem 3rem;
}
.pvc-hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-cyan, #06b6d4);
  margin-bottom: 0.8rem;
  padding: 0.35rem 1.1rem;
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 100px;
  background: rgba(6, 182, 212, 0.08);
}
.pvc-hero__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.9rem;
  letter-spacing: -0.02em;
}
.pvc-hero__subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.6;
  opacity: 0.88;
  margin: 0 auto;
  max-width: 560px;
}

/* =============================================
   TABS
   ============================================= */
.pvc-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #dfe3e6;
}

.pvc-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 8px 14px;
  background: none;
  border: none;
  border-top: 4px solid transparent;
  cursor: pointer;
  position: relative;
  color: #b8c4ce;
  transition: color .15s;
}

/* Vertical dividers between tabs */
.pvc-tab + .pvc-tab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: #dfe3e6;
}

.pvc-tab__icon {
  width: 38px;
  height: 38px;
  display: block;
}

.pvc-tab__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1;
}

.pvc-tab:hover { color: #7a909e; }

.pvc-tab.is-active {
  color: #005C71;
  border-top-color: #005C71;
}

/* =============================================
   CONTENT AREA (below tabs)
   ============================================= */
.pvc-content { padding: 24px 28px 28px; }

/* Header row: title + share */
.pvc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.pvc-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #003D5B;
}

/* Print button (inside result block) */
.pvc-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  padding: 6px 14px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 4px;
  color: rgba(255,255,255,.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pvc-print-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}
.pvc-print-btn:hover {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* =============================================
   3-COL BODY: diagram | fields | result
   Ratio ≈ 3 : 4 : 3
   ============================================= */
.pvc-body {
  display: grid;
  grid-template-columns: 3fr 4fr 3fr;
  gap: 20px;
  align-items: start;
}

/* --- Diagram column --- */
.pvc-diagram-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 8px;
}
.pvc-diagram {
  margin: 0;
  width: 100%;
}
.pvc-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Fields column --- */
.pvc-fields-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pvc-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.pvc-field { display: flex; flex-direction: column; gap: 4px; }

.pvc-field__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #005C71;
}

.pvc-field__wrap {
  position: relative;
  display: flex;
  align-items: baseline;
}

.pvc-field__input {
  flex: 1;
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  padding: 6px 28px 6px 0;
  font-size: 15px;
  color: #1f2937;
  background: transparent;
  outline: none;
  transition: border-color .15s;
}
.pvc-field__input::placeholder {
  color: #bfc8d0;
  font-style: italic;
  font-weight: 400;
}
.pvc-field__input:focus {
  border-bottom-color: #005C71;
}

.pvc-field__unit {
  position: absolute;
  right: 0;
  bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7a86;
  pointer-events: none;
}

/* Circle mode toggle */
.pvc-circle-mode { margin-top: -6px; }
.pvc-circle-mode__fieldset {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #d4dde6;
  border-radius: 5px;
  display: flex;
  gap: 14px;
}
.pvc-circle-mode__fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}

/* Calculate button */
.pvc-calculate {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 3px;
  background: #4C840C;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .15s;
}
.pvc-calculate:hover { background: #437509; }
.pvc-calculate::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: #365E08;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* --- Result column --- */
.pvc-result {
  background: #007399;
  border-radius: 4px;
  padding: 30px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  align-self: stretch;
  min-height: 200px;
}

.pvc-result__heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  line-height: 1.5;
  margin-bottom: 12px;
}

.pvc-result__number {
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 6px;
}

.pvc-result__unit {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

/* =============================================
   MESSAGES
   ============================================= */
.pvc-messages { padding: 0 28px; }
.pvc-info,
.pvc-error {
  margin-top: 12px;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
}
.pvc-info { border: 1px solid #c8d8e8; background: #eff6fc; color: #28445b; }
.pvc-error { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }

/* =============================================
   DETAIL CARDS (post-calculate)
   ============================================= */
.pvc-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 28px 0;
}
.pvc-detail-card {
  text-align: left;
  border: 1px solid #dfe3e8;
  border-left: 3px solid #007399;
  border-radius: 4px;
  background: #fff;
  padding: 10px 12px;
}
.pvc-detail-card__label { display: block; font-size: 11px; color: #5f6b7a; }
.pvc-detail-card__value { display: block; margin-top: 2px; font-size: 15px; font-weight: 700; color: #1f2937; }

/* =============================================
   POST-CALCULATE ACTIONS
   ============================================= */
.pvc-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 18px 28px 24px;
}
.pvc-actions .btn { min-width: 180px; }

/* =============================================
   BACK TO TOP
   ============================================= */
.pvc-btt {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #005C71;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: background .15s;
  z-index: 100;
}
.pvc-btt svg { width: 16px; height: 16px; }
.pvc-btt span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pvc-btt:hover { background: #004a5c; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 780px) {
  .pvc-body {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .pvc-result {
    grid-column: 1 / -1;
    min-height: auto;
    flex-direction: row;
    gap: 12px;
    padding: 16px 20px;
  }
  .pvc-result__number { font-size: 36px; }
  .pvc-share { display: none; }
}

@media (max-width: 560px) {
  .pvc-content { padding: 16px; }
  .pvc-tabs { grid-template-columns: repeat(4, 1fr); }
  .pvc-tab { padding: 12px 4px 10px; gap: 4px; }
  .pvc-tab__icon { width: 28px; height: 28px; }
  .pvc-tab__label { font-size: 9px; }
  .pvc-body { grid-template-columns: 1fr; }
  .pvc-result { flex-direction: column; }
  .pvc-fields-row { grid-template-columns: 1fr; gap: 14px; }
  .pvc-details { grid-template-columns: 1fr; }
  .pvc-actions { flex-direction: column; }
  .pvc-actions .btn { width: 100%; }
  .pvc-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* =============================================
   FOOTER FIX — eliminate white gap
   ============================================= */
.pvc-page .footer { background: var(--color-navy-dark, #0f2440); }

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
  .site-header,
  .pvc-hero,
  .pvc-tabs,
  .pvc-calculate,
  .pvc-print-btn,
  .pvc-circle-mode,
  .pvc-actions,
  .pvc-btt,
  .footer,
  .nav { display: none !important; }

  .pvc-page { background: #fff; }
  .pvc { padding: 0; max-width: 100%; }
  .pvc-card { border: none; }
  .pvc-content { padding: 16px 0; }

  .pvc-body {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
  }

  .pvc-result {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pvc-details {
    padding: 12px 0 0;
  }

  .pvc-detail-card {
    border: 1px solid #ccc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Hide number input spinners */
.pvc-field__input::-webkit-inner-spin-button,
.pvc-field__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pvc-field__input[type="number"] {
  -moz-appearance: textfield;
}
