/* ── Kg/hr to GPM Converter – Styles ───────────────────────────────────── */

.kgc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 880px;
  margin: 2rem auto;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 6px 32px rgba(180, 120, 0, 0.12);
  color: #1e293b;
  box-sizing: border-box;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.kgc__header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.kgc__logo { font-size: 2.4rem; line-height: 1; flex-shrink: 0; }

.kgc__title {
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: 800;
  margin: 0 0 0.2rem;
  color: #78350f;
}

.kgc__desc {
  font-size: 0.9rem;
  color: #b45309;
  margin: 0;
  line-height: 1.5;
}

/* ── Form grid ───────────────────────────────────────────────────────────── */

.kgc__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 580px) {
  .kgc__form { grid-template-columns: 1fr; }
}

.kgc__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.kgc__field label {
  font-size: 0.83rem;
  font-weight: 700;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.kgc__field-icon { font-size: 1rem; }

.kgc__input,
.kgc__select {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #fcd34d;
  border-radius: 9px;
  font-size: 0.98rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
  appearance: auto;
}

.kgc__input:focus,
.kgc__select:focus {
  outline: none;
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}

.kgc__field-hint {
  font-size: 0.75rem;
  color: #b45309;
  margin-top: 0.1rem;
  opacity: 0.75;
}

/* ── Fluid presets ───────────────────────────────────────────────────────── */

.kgc__presets-label {
  font-size: 0.83rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.55rem;
}

.kgc__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.kgc__preset {
  padding: 0.5rem 0.8rem;
  background: #fef3c7;
  border: 1.5px solid #fcd34d;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #78350f;
  cursor: pointer;
  line-height: 1.4;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.kgc__preset small {
  font-size: 0.72rem;
  font-weight: 500;
  color: #b45309;
}

.kgc__preset:hover { background: #fde68a; border-color: #d97706; }

.kgc__preset--active {
  background: #d97706;
  border-color: #b45309;
  color: #fff;
}

.kgc__preset--active small { color: #fde68a; }

/* ── Convert button ──────────────────────────────────────────────────────── */

.kgc__btn-calc {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}

.kgc__btn-calc:hover  { filter: brightness(1.1); }
.kgc__btn-calc:active { transform: scale(0.99); }

/* ── Results ─────────────────────────────────────────────────────────────── */

.kgc__results { display: none; }
.kgc__results.visible { display: block; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.kgc__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #92400e 0%, #b45309 50%, #d97706 100%);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.kgc__hero::before {
  content: '🌊';
  position: absolute;
  font-size: 9rem;
  opacity: 0.07;
  top: -2rem;
  right: -1rem;
  line-height: 1;
}

.kgc__hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.kgc__hero-label {
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.65);
}

.kgc__hero-value {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
  word-break: break-all;
}

.kgc__hero-side--right .kgc__hero-value { color: #fde68a; }

.kgc__hero-eq {
  font-size: 2rem;
  color: rgba(255,255,255,0.4);
  font-weight: 300;
  flex-shrink: 0;
}

/* ── Density tag ─────────────────────────────────────────────────────────── */

.kgc__density-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: #78350f;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  display: inline-block;
  margin-bottom: 0.25rem;
}

/* ── Section title ───────────────────────────────────────────────────────── */

.kgc__section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #78350f;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 1.25rem 0 0.7rem;
}

/* ── Conversion table ────────────────────────────────────────────────────── */

.kgc__table {
  background: #fef3c7;
  border: 1.5px solid #fcd34d;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.kgc__table-row {
  display: flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #fcd34d;
  gap: 0.75rem;
}

.kgc__table-row:last-child { border-bottom: none; }
.kgc__table-row:nth-child(even) { background: #fffbeb; }

.kgc__table-row--highlight {
  background: #fde68a !important;
  font-weight: 700;
}

.kgc__table-icon { font-size: 1.2rem; flex-shrink: 0; }

.kgc__table-info { flex: 1; min-width: 0; }

.kgc__table-unit {
  font-size: 0.9rem;
  font-weight: 700;
  color: #78350f;
}

.kgc__table-name {
  font-size: 0.75rem;
  color: #b45309;
  margin-top: 0.1rem;
}

.kgc__table-value {
  font-size: 0.97rem;
  font-weight: 800;
  color: #92400e;
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

/* ── Context cards ───────────────────────────────────────────────────────── */

.kgc__context {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0.25rem;
}

@media (max-width: 500px) {
  .kgc__context { grid-template-columns: 1fr; }
}

.kgc__ctx-card {
  background: #fef3c7;
  border: 1.5px solid #fcd34d;
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.kgc__ctx-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }

.kgc__ctx-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 0.25rem;
}

.kgc__ctx-text {
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.55;
}

/* ── Error ───────────────────────────────────────────────────────────────── */

.kgc__error {
  padding: 0.85rem 1rem;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  color: #dc2626;
  font-size: 0.93rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  display: none;
}

.kgc__error.visible { display: block; }

/* ── Info box ────────────────────────────────────────────────────────────── */

.kgc__info {
  margin-top: 1.75rem;
  padding: 1.1rem 1.2rem;
  background: #fef3c7;
  border-radius: 10px;
  border-left: 4px solid #d97706;
  font-size: 0.92rem;
  color: #78350f;
  line-height: 1.75;
}

.kgc__info strong { color: #0f172a; }
