/* ── Water Intake Calculator – Styles ───────────────────────────────────── */

.wic-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 880px;
  margin: 2rem auto;
  background: #f0f7ff;
  border: 1px solid #bdd5f0;
  border-radius: 18px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 6px 32px rgba(30,100,200,0.13);
  color: #1e293b;
  box-sizing: border-box;
}

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

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

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

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

.wic__desc {
  font-size: 0.9rem;
  color: #4b6a9b;
  margin: 0;
  line-height: 1.5;
}

/* ── Unit toggle ─────────────────────────────────────────────────────────── */

.wic__unit-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.wic__unit-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
}

.wic__toggle-group {
  display: flex;
  background: #dbeafe;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.wic__toggle-btn {
  padding: 0.3rem 0.9rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: #3b82f6;
  transition: background 0.15s, color 0.15s;
}

.wic__toggle-btn--active {
  background: #2563eb;
  color: #fff;
}

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

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

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

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

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

.wic__field label .wic__field-icon { font-size: 1rem; }

.wic__input,
.wic__select {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #bdd5f0;
  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;
}

.wic__input:focus,
.wic__select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.wic__field-hint {
  font-size: 0.75rem;
  color: #6b8cc7;
  margin-top: 0.1rem;
}

/* ── Full-width field ────────────────────────────────────────────────────── */

.wic__field--full {
  grid-column: 1 / -1;
}

/* ── Checkbox row ────────────────────────────────────────────────────────── */

.wic__checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: #dbeafe;
  border-radius: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  color: #1e3a6e;
  font-weight: 600;
  border: 1.5px solid #bdd5f0;
  transition: background 0.15s;
}

.wic__checkbox-row:hover { background: #bfdbfe; }

.wic__checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563eb;
}

/* ── Calculate button ────────────────────────────────────────────────────── */

.wic__btn-calc {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 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;
}

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

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

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

/* Main water amount card */
.wic__main-result {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
  border-radius: 14px;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.wic__main-result::before {
  content: '💧';
  position: absolute;
  font-size: 8rem;
  opacity: 0.07;
  top: -1rem;
  right: -1rem;
  line-height: 1;
}

.wic__main-label {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.wic__main-amount {
  font-size: clamp(2.8rem, 9vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

.wic__main-unit {
  font-size: 1.3rem;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.wic__main-alt {
  font-size: 1rem;
  opacity: 0.8;
  font-weight: 500;
}

/* ── Stats row ───────────────────────────────────────────────────────────── */

.wic__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

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

.wic__stat-card {
  background: #dde8fb;
  border: 1.5px solid #bdd5f0;
  border-radius: 12px;
  padding: 1rem 0.85rem;
  text-align: center;
}

.wic__stat-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }

.wic__stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e40af;
  line-height: 1.1;
}

.wic__stat-label {
  font-size: 0.78rem;
  color: #3b5a9a;
  font-weight: 600;
  margin-top: 0.2rem;
}

/* ── Breakdown section ───────────────────────────────────────────────────── */

.wic__section-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e3a6e;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.wic__breakdown {
  background: #dde8fb;
  border: 1.5px solid #bdd5f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.wic__breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #c3d5f0;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wic__breakdown-row:last-child { border-bottom: none; }

.wic__breakdown-row:nth-child(even) { background: #e8f0fc; }

.wic__breakdown-factor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: #1e3a6e;
  font-weight: 600;
}

.wic__breakdown-icon { font-size: 1.1rem; }

.wic__breakdown-amount {
  font-size: 0.97rem;
  font-weight: 800;
  color: #1d4ed8;
  white-space: nowrap;
}

/* ── Schedule ────────────────────────────────────────────────────────────── */

.wic__schedule {
  background: #dde8fb;
  border: 1.5px solid #bdd5f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

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

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

.wic__schedule-time {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e3a6e;
  min-width: 90px;
}

.wic__schedule-bar-wrap {
  flex: 1;
  height: 8px;
  background: #bdd5f0;
  border-radius: 4px;
  overflow: hidden;
}

.wic__schedule-bar {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.wic__schedule-amount {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1d4ed8;
  min-width: 60px;
  text-align: right;
}

/* ── Tips ────────────────────────────────────────────────────────────────── */

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

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

.wic__tip {
  background: #dde8fb;
  border: 1.5px solid #bdd5f0;
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.wic__tip-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.05rem; }

.wic__tip-text {
  font-size: 0.88rem;
  color: #1e3a6e;
  line-height: 1.55;
  font-weight: 500;
}

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

.wic__info {
  margin-top: 1.75rem;
  padding: 1.1rem 1.2rem;
  background: #dde8fb;
  border-radius: 10px;
  border-left: 4px solid #2563eb;
  font-size: 0.92rem;
  color: #1e3a6e;
  line-height: 1.75;
}

.wic__info strong { color: #0f172a; }

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

.wic__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;
}

.wic__error.visible { display: block; }
