/* Heumengen-Rechner — Tagesbedarf Raufutter
   Uses global CSS variables from styles.css
   Prefix: hr- (classes), --hr-* (custom properties) */

.hr {
  --hr-hay:        #c89f3b;
  --hr-hay-deep:   #8a6a1f;
  --hr-grass:      #6b8e4e;
  --hr-grass-deep: #44612e;
  --hr-warn:       #b8472a;
  --hr-card-bg:    rgba(255,255,255,0.12);
  --hr-card-border: rgba(255,255,255,0.22);

  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 var(--pad-x, clamp(20px, 5vw, 80px));
  font-family: var(--font-body);
  color: var(--ink);
}

/* ═══════ Header ═══════ */
.hr-header {
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 32px;
  margin-bottom: 36px;
}

.hr-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--hr-hay);
  font-weight: 600;
  margin-bottom: 10px;
}

.hr-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hr-lede {
  color: var(--ink);
  max-width: 640px;
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  opacity: 0.85;
}

/* ═══════ Layout grid ═══════ */
.hr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 880px) {
  .hr-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 36px;
  }
  .hr-results-col {
    position: sticky;
    top: 80px;       /* helfer-nav height */
    align-self: start;
  }
}

/* ═══════ Cards ═══════ */
.hr-card {
  background: var(--hr-card-bg);
  border: 1px solid var(--hr-card-border);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 32px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px -20px rgba(0,0,0,0.35);
}

.hr-card + .hr-card {
  margin-top: 18px;
}

.hr-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hr-card h2::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--hr-hay);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ═══════ Form rows ═══════ */
.hr-row {
  margin-bottom: 20px;
}
.hr-row:last-child { margin-bottom: 0; }

.hr-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hr-help {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 8px;
  opacity: 0.7;
  line-height: 1.5;
}

.hr input[type="number"],
.hr select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 16px;
  background: rgba(255,255,255,0.10);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

.hr input[type="number"]:focus,
.hr select:focus {
  outline: none;
  border-color: var(--hr-hay);
  box-shadow: 0 0 0 3px rgba(200, 159, 59, 0.22);
}

.hr select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23E1F0E5' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.hr select option {
  background: #0F1B2D;
  color: var(--ink);
}

/* Two-column input grid */
.hr-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 520px) {
  .hr-2col { grid-template-columns: 1fr 1fr; }
}

/* ═══════ Pasture sub-block ═══════ */
.hr-pasture {
  margin-top: 14px;
  padding: 18px 16px 6px;
  background: rgba(107, 142, 78, 0.12);
  border: 1px solid rgba(107, 142, 78, 0.3);
  border-radius: var(--r-md);
  transition: opacity .2s;
}
.hr-pasture.disabled {
  opacity: 0.35;
  pointer-events: none;
}
.hr-pasture h3 {
  margin: 0 0 14px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9EC88A;
  font-weight: 700;
}

/* ═══════ Results panel — warm cream gradient (bewusster Kontrast) ═══════ */
.hr-result-main {
  background: linear-gradient(135deg, #fdf6e4 0%, #f6ebcd 100%);
  border: 1.5px solid var(--hr-hay);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 32px);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.35);
  color: #3a2a1a;
}

.hr-result-main h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  margin: 0 0 4px 0;
  color: var(--hr-hay-deep);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}
.hr-result-main h2::before { display: none; }

.hr-big {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 52px);
  line-height: 1;
  font-weight: 600;
  color: #3a2a1a;
  margin: 8px 0 2px 0;
  letter-spacing: -0.02em;
}

.hr-big .unit {
  font-size: 0.45em;
  color: var(--hr-hay-deep);
  font-weight: 500;
  margin-left: 4px;
}

.hr-subtle {
  font-size: 15px;
  color: #5a4632;
  margin: 0 0 18px 0;
}

.hr-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed rgba(138, 106, 31, 0.35);
}

.hr-mini {
  text-align: left;
}
.hr-mini .lab {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hr-hay-deep);
  font-weight: 600;
  margin-bottom: 2px;
}
.hr-mini .val {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: #3a2a1a;
}
.hr-mini .sub {
  font-size: 12px;
  color: #5a4632;
}

/* ═══════ Secondary result blocks ═══════ */
.hr-result-block {
  background: var(--hr-card-bg);
  border: 1px solid var(--hr-card-border);
  border-radius: var(--r-md);
  padding: clamp(18px, 2.5vw, 24px);
  margin-top: 16px;
  backdrop-filter: blur(8px);
}

.hr-result-block h3 {
  margin: 0 0 14px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hr-result-block.haylage h3::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--hr-grass);
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}
.hr-result-block.breakdown h3::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--muted);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.hr-amount-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dotted rgba(255,255,255,0.12);
  font-size: 15.5px;
  line-height: 1.4;
}
.hr-amount-line:last-child { border-bottom: none; }
.hr-amount-line .lbl { color: var(--ink); opacity: 0.75; }
.hr-amount-line .num {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
}

/* ═══════ Warning banner ═══════ */
.hr-warn {
  margin-top: 16px;
  padding: 16px 18px;
  background: rgba(184, 71, 42, 0.14);
  border: 1px solid rgba(184, 71, 42, 0.35);
  border-left: 4px solid var(--hr-warn);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.6;
  opacity: 0.95;
}
.hr-warn strong { color: #E36548; font-weight: 700; }

/* ═══════ Info note ═══════ */
.hr-note {
  margin-top: 16px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 4px solid var(--hr-hay);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.65;
  opacity: 0.9;
}

/* ═══════ Footer / Quellen — warmer Cream-Bereich wie BCS-Info ═══════ */
.hr-footer {
  margin-top: 80px;
  padding: 64px 24px;
  background: #faf6ed;
  border-top: 1px solid rgba(15, 27, 45, 0.18);
  color: #0F1B2D;
}
.hr-footer__inner {
  max-width: 720px;
  margin: 0 auto;
}
.hr-footer h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #0F1B2D;
  margin: 0 0 14px 0;
  line-height: 1.25;
}
.hr-footer h3 + h3 { margin-top: 32px; }
.hr-footer ul {
  margin: 0 0 16px 0;
  padding: 0;
  list-style: none;
}
.hr-footer li {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: #1F2D45;
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}
.hr-footer li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--hr-hay);
}
.hr-footer li strong { color: #0F1B2D; }

.hr-disclaimer {
  margin-top: 24px;
  padding: 18px 22px;
  background: #fffdf9;
  border: 1px solid rgba(15, 27, 45, 0.12);
  border-radius: var(--r-md);
  font-size: 15px;
  line-height: 1.6;
  color: #1F2D45;
}
.hr-disclaimer strong { color: #0F1B2D; }

/* ═══════ Print ═══════ */
@media print {
  .helfer-nav, .hr-pasture.disabled { display: none; }
  .hr-result-main { box-shadow: none; }
  .hr { padding: 0; }
}

/* ═══════ Mobile adjustments ═══════ */
@media (max-width: 600px) {
  .hr-footer { padding: 48px 16px; }
  .hr-footer h3 { font-size: 18px; }
  .hr-footer li { font-size: 14px; }
  .hr-bar { grid-template-columns: 1fr; gap: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Cream-Theme-Overrides (gescopt) — greifen nur bei <body class="cream-theme">.
   Hartcodierte Dark-Werte → Cream. Funktionsfarben (--hr-hay/grass/warn,
   Result-Panels, .hr-pasture) bleiben unverändert.
   ═══════════════════════════════════════════════════════════════════════ */
.cream-theme .hr {
  --hr-card-bg: var(--bg-soft);
  --hr-card-border: var(--line);
}
.cream-theme .hr-header { border-bottom-color: var(--line); }
.cream-theme .hr-card h2 { border-bottom-color: var(--line); }
.cream-theme .hr input[type="number"],
.cream-theme .hr select {
  background-color: var(--bg-soft);
  border-color: var(--line);
}
/* Select-Pfeil: hell (#E1F0E5) → dunkelgrün (#1f3a32) */
.cream-theme .hr select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231f3a32' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
}
.cream-theme .hr select option { background: #fffdf8; color: var(--ink); }
.cream-theme .hr-result-block h3 { border-bottom-color: var(--line); }
.cream-theme .hr-amount-line { border-bottom-color: var(--line); }
.cream-theme .hr-note { background: var(--bg-warm); border-color: var(--line); }
