/* ============================================================
   Brunata Vandspild Calculator - WordPress Plugin
   Design: Liquid Minimalism — matches the Manus web version
   Fonts: Sora (headings) + Inter (body) via Google Fonts
   Colors: Ocean blue primary + Fresh mint accent + Sand bg
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ---- CSS Variables ---- */
.brunata-calculator-wrap {
  /* Standard theme defaults — overridden by inline CSS for custom theme */
  --bv-primary:        #1a5fa8;
  --bv-primary-light:  #2d7dd2;
  --bv-primary-bg:     rgba(26,95,168,0.08);
  --bv-accent:         #4ecdc4;
  --bv-accent-bg:      rgba(78,205,196,0.15);
  --bv-destructive:    #e05252;
  --bv-destructive-bg: rgba(224,82,82,0.07);
  --bv-bg:             #f9f8f5;
  --bv-card:           #ffffff;
  --bv-border:         rgba(45,125,210,0.18);
  --bv-text:           #1a2a3a;
  --bv-muted:          #5a7a90;
  --bv-radius:         20px;
  --bv-radius-sm:      12px;
  --bv-shadow:         0 4px 24px rgba(26,95,168,0.10);
  --bv-shadow-lg:      0 8px 40px rgba(26,95,168,0.18);
  --bv-hero-from:      #1a3a6a;
  --bv-hero-to:        #4ecdc4;
  --bv-heading-font:   'Sora', sans-serif;
  --bv-body-font:      'Inter', sans-serif;

  font-family: var(--bv-body-font);
  font-size: 16px;
  color: var(--bv-text);
  background: var(--bv-bg);
  box-sizing: border-box;
  line-height: 1.6;
}

.brunata-calculator-wrap *,
.brunata-calculator-wrap *::before,
.brunata-calculator-wrap *::after {
  box-sizing: inherit;
}

/* ---- Hero Section ---- */
.bv-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bv-hero-from) 0%, var(--bv-primary) 45%, var(--bv-hero-to) 100%);
  padding: 60px 24px 100px;
  text-align: center;
}

.bv-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1559825481-12a05cc00344?w=1600&q=80');
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.bv-hero__content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.bv-hero__logo {
  height: 36px;
  margin-bottom: 24px;
  filter: brightness(0) invert(1);
}

.bv-hero h1 {
  font-family: var(--bv-heading-font);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 16px;
}

.bv-hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  margin: 0 0 32px;
  font-weight: 400;
}

.bv-hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}

.bv-hero__wave svg {
  display: block;
  width: 100%;
}

/* ---- Buttons ---- */
.bv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 9999px;
  font-family: var(--bv-heading-font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  text-decoration: none;
  line-height: 1;
}

.bv-btn--white {
  background: #ffffff;
  color: var(--bv-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.bv-btn--white:hover {
  background: #f0f7ff;
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(0,0,0,0.20);
}

.bv-btn--primary {
  background: var(--bv-primary);
  color: #ffffff;
  box-shadow: var(--bv-shadow);
}

.bv-btn--primary:hover {
  background: var(--bv-primary-light);
  transform: scale(1.04);
  box-shadow: var(--bv-shadow-lg);
}

/* ---- Main Calculator Section ---- */
.bv-section {
  padding: 60px 24px;
  background: var(--bv-bg);
  position: relative;
}

.bv-section--teal {
  background: #eaf6f5;
}

.bv-section--gradient {
  background: linear-gradient(135deg, #4ecdc4 0%, #1a5fa8 100%);
}

.bv-container {
  max-width: 860px;
  margin: 0 auto;
}

.bv-section__header {
  text-align: center;
  margin-bottom: 40px;
}

.bv-section__header h2 {
  font-family: var(--bv-heading-font);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--bv-text);
  margin: 0 0 12px;
  line-height: 1.2;
}

.bv-section__header p {
  color: var(--bv-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Cards ---- */
.bv-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid var(--bv-border);
  border-radius: var(--bv-radius);
  padding: 28px;
  box-shadow: var(--bv-shadow);
  margin-bottom: 16px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.bv-card:hover {
  box-shadow: var(--bv-shadow-lg);
}

.bv-card--accent {
  border-color: rgba(78,205,196,0.35);
}

.bv-card--destructive {
  border-color: rgba(224,82,82,0.30);
  background: rgba(224,82,82,0.04);
}

.bv-card--selected {
  border-color: var(--bv-primary) !important;
  background: rgba(26,95,168,0.05) !important;
  box-shadow: 0 4px 20px rgba(26,95,168,0.15) !important;
}

/* ---- Location / Utility Selector ---- */
.bv-field-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.bv-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bv-icon-circle--accent {
  background: var(--bv-accent-bg);
}

.bv-icon-circle--primary {
  background: var(--bv-primary-bg);
}

.bv-icon-circle--destructive {
  background: var(--bv-destructive-bg);
}

.bv-icon-circle svg {
  width: 24px;
  height: 24px;
}

.bv-icon-circle--accent svg { color: #2a9d8f; }
.bv-icon-circle--primary svg { color: var(--bv-primary); }
.bv-icon-circle--destructive svg { color: var(--bv-destructive); }

.bv-field-label {
  font-family: var(--bv-heading-font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bv-text);
  display: block;
  margin-bottom: 2px;
}

.bv-field-hint {
  font-size: 0.85rem;
  color: var(--bv-muted);
}

/* ---- Select ---- */
.bv-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--bv-border);
  border-radius: var(--bv-radius-sm);
  font-family: var(--bv-body-font);
  font-size: 1rem;
  color: var(--bv-text);
  background: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a5fa8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bv-select:focus {
  outline: none;
  border-color: var(--bv-primary);
  box-shadow: 0 0 0 3px rgba(26,95,168,0.15);
}

.bv-select optgroup {
  font-weight: 700;
  color: var(--bv-muted);
  font-size: 0.85rem;
}

/* ---- Price Slider ---- */
.bv-slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.bv-slider-label {
  font-family: var(--bv-heading-font);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--bv-text);
}

.bv-price-display {
  font-family: var(--bv-heading-font);
  font-size: 2rem;
  font-weight: 800;
  color: var(--bv-primary);
  line-height: 1;
}

.bv-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--bv-primary) 0%, var(--bv-primary) var(--bv-range-pct, 40%), #d1e4f5 var(--bv-range-pct, 40%), #d1e4f5 100%);
  outline: none;
  cursor: pointer;
  margin-bottom: 12px;
}

.bv-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bv-primary);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(26,95,168,0.30);
  cursor: pointer;
  transition: transform 0.15s;
}

.bv-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.bv-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bv-primary);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(26,95,168,0.30);
  cursor: pointer;
}

.bv-slider-hint {
  font-size: 0.85rem;
  color: var(--bv-muted);
  margin-top: 4px;
}

.bv-slider-hint a {
  color: var(--bv-primary);
  font-weight: 600;
  text-decoration: none;
}

.bv-slider-hint a:hover {
  text-decoration: underline;
}

/* ---- Total Cost Summary Card ---- */
.bv-total-card {
  display: none;
  animation: bv-fadein 0.4s ease;
}

.bv-total-card.bv-visible {
  display: block;
}

@keyframes bv-fadein {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bv-total-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.bv-total-meta {
  flex: 1;
  min-width: 200px;
}

.bv-total-meta h3 {
  font-family: var(--bv-heading-font);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--bv-text);
  margin: 0 0 6px;
}

.bv-total-meta p {
  color: var(--bv-muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.bv-total-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bv-stat-box {
  background: rgba(255,255,255,0.55);
  border-radius: var(--bv-radius-sm);
  padding: 14px 18px;
}

.bv-stat-box__label {
  font-size: 0.8rem;
  color: var(--bv-muted);
  margin-bottom: 4px;
}

.bv-stat-box__value {
  font-family: var(--bv-heading-font);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--bv-text);
  line-height: 1;
}

.bv-stat-box__value--red {
  color: var(--bv-destructive);
}

/* ---- Instruction text ---- */
.bv-instruction {
  text-align: center;
  color: var(--bv-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

/* ---- Waste Item Rows ---- */
.bv-waste-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bv-waste-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  cursor: pointer;
  border-radius: var(--bv-radius);
  border: 2px solid rgba(45,125,210,0.15);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  padding: 18px 22px;
  transition: all 0.22s ease;
  box-shadow: 0 2px 12px rgba(26,95,168,0.06);
}

.bv-waste-item:hover {
  border-color: rgba(26,95,168,0.40);
  box-shadow: 0 4px 20px rgba(26,95,168,0.12);
}

.bv-waste-item.bv-waste-item--selected {
  border-color: var(--bv-primary);
  background: rgba(26,95,168,0.05);
  box-shadow: 0 4px 20px rgba(26,95,168,0.15);
}

/* Custom checkbox */
.bv-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--bv-border);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
  cursor: pointer;
}

.bv-checkbox--checked {
  background: var(--bv-primary);
  border-color: var(--bv-primary);
}

.bv-checkbox svg {
  display: none;
  width: 14px;
  height: 14px;
  color: #fff;
}

.bv-checkbox--checked svg {
  display: block;
}

/* Icon circle in waste row */
.bv-waste-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bv-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.bv-waste-item--selected .bv-waste-icon {
  background: rgba(26,95,168,0.18);
}

.bv-waste-icon svg {
  width: 22px;
  height: 22px;
  color: var(--bv-primary);
}

.bv-waste-label {
  flex: 1;
  min-width: 160px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--bv-text);
}

.bv-waste-numbers {
  display: flex;
  gap: 28px;
  align-items: center;
  margin-left: auto;
  text-align: right;
  flex-wrap: wrap;
}

.bv-waste-num__label {
  font-size: 0.75rem;
  color: var(--bv-muted);
  margin-bottom: 2px;
}

.bv-waste-num__value {
  font-family: var(--bv-heading-font);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bv-text);
}

.bv-waste-num__value--primary {
  font-size: 1.4rem;
  color: var(--bv-primary);
}

/* ---- Wave Divider ---- */
.bv-wave-divider {
  line-height: 0;
  overflow: hidden;
  margin-top: -1px;
}

.bv-wave-divider svg {
  display: block;
  width: 100%;
}

/* ---- Info Cards (Toilet / Faucet) ---- */
.bv-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .bv-info-grid {
    grid-template-columns: 1fr;
  }
}

.bv-info-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(12px);
  border: 2px solid var(--bv-border);
  border-radius: var(--bv-radius);
  padding: 32px 28px;
  box-shadow: var(--bv-shadow);
  overflow: hidden;
  position: relative;
}

.bv-info-card__blob {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  pointer-events: none;
}

.bv-info-card__blob--top-right {
  top: -20px;
  right: -20px;
  background: var(--bv-primary-bg);
}

.bv-info-card__blob--top-left {
  top: -20px;
  left: -20px;
  background: var(--bv-accent-bg);
}

.bv-info-card__icon {
  width: 60px;
  height: 60px;
  color: var(--bv-primary);
  margin-bottom: 20px;
  animation: bv-float 3s ease-in-out infinite;
}

.bv-info-card__icon--delay {
  animation-delay: 1s;
}

@keyframes bv-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.bv-info-card h3 {
  font-family: var(--bv-heading-font);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--bv-text);
  margin: 0 0 12px;
  line-height: 1.25;
}

.bv-info-card p {
  color: var(--bv-muted);
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.bv-info-card p.bv-body {
  color: var(--bv-text);
}

.bv-callout {
  border-left: 4px solid var(--bv-primary);
  background: var(--bv-primary-bg);
  border-radius: 0 var(--bv-radius-sm) var(--bv-radius-sm) 0;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.88rem;
  color: var(--bv-text);
}

.bv-callout--accent {
  border-left-color: var(--bv-accent);
  background: var(--bv-accent-bg);
}

.bv-info-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--bv-radius-sm);
  margin-top: 16px;
}

/* ---- Tips Grid ---- */
.bv-tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .bv-tips-grid {
    grid-template-columns: 1fr;
  }
}

.bv-tip-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--bv-border);
  border-radius: var(--bv-radius);
  padding: 20px 22px;
  display: flex;
  gap: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bv-tip-card:hover {
  border-color: rgba(26,95,168,0.40);
  box-shadow: var(--bv-shadow);
}

.bv-tip-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bv-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.bv-tip-card:hover .bv-tip-card__icon {
  background: rgba(26,95,168,0.18);
}

.bv-tip-card__icon svg {
  width: 20px;
  height: 20px;
  color: var(--bv-primary);
}

.bv-tip-card h4 {
  font-family: var(--bv-heading-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bv-text);
  margin: 0 0 6px;
}

.bv-tip-card p {
  font-size: 0.88rem;
  color: var(--bv-muted);
  margin: 0;
}

/* ---- CTA Section ---- */
.bv-cta {
  background: linear-gradient(135deg, #4ecdc4 0%, #1a5fa8 100%);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bv-cta__bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1559825481-12a05cc00344?w=1200&q=60');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
}

.bv-cta__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

.bv-cta h2 {
  font-family: var(--bv-heading-font);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px;
  line-height: 1.2;
}

.bv-cta p {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  margin: 0 0 28px;
}

/* ---- Footer ---- */
.bv-footer {
  background: #1a2a3a;
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 36px 24px;
}

.bv-footer img {
  height: 28px;
  filter: brightness(0) invert(1);
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.bv-footer p {
  font-size: 0.85rem;
  margin: 4px 0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .bv-waste-numbers {
    gap: 14px;
  }
  .bv-waste-num__value--primary {
    font-size: 1.15rem;
  }
  .bv-total-stats {
    grid-template-columns: 1fr;
  }
  .bv-hero {
    padding: 48px 16px 90px;
  }
}
