/* Peptide Dose Calculator — pdc-style.css v1.0.0 */

/* ─── Reset & container ─────────────────────────────────────────── */
.pdc-wrap *,
.pdc-wrap *::before,
.pdc-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.pdc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a1a;
  color-scheme: light;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 2rem;
}

/* ─── Header ────────────────────────────────────────────────────── */
.pdc-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e8e4dc;
}

/* ─── Usage tip ─────────────────────────────────────────────────────── */
.pdc-usage-tip {
  font-size: 0.85rem;
  color: #666;
  background: #daf6da;
  border: 1px solid #d4e5d4;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 1.5rem;
  text-align: center;
}
.pdc-usage-tip strong { color: #2c5530; }
.pdc-header-icon {
  color: #0f77ee;
  flex-shrink: 0;
}
.pdc-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.2;
}
.pdc-subtitle {
  font-size: 0.82rem;
  color: #777;
  margin-top: 2px;
}

/* ─── Grid layout ───────────────────────────────────────────────── */
.pdc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .pdc-grid { grid-template-columns: 1fr; }
}

/* ─── Cards ─────────────────────────────────────────────────────── */
.pdc-card {
  background: #fff;
  border: 1px solid #e4e0d8;
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
}
.pdc-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 1rem;
}
.pdc-divider {
  height: 1px;
  background: #e8e4dc;
  margin: 1.25rem 0;
}

/* ─── Fields ────────────────────────────────────────────────────── */
.pdc-field {
  margin-bottom: 1.1rem;
}
.pdc-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 5px;
}
.pdc-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdc-input-row input[type="number"] {
  width: 90px;
  padding: 7px 10px;
  border: 1px solid #d4d0c8;
  border-radius: 7px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
  -moz-appearance: textfield;
}
.pdc-input-row input[type="number"]::-webkit-outer-spin-button,
.pdc-input-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.pdc-input-row input[type="number"]:focus {
  outline: none;
  border-color: #0f77ee;
  box-shadow: 0 0 0 3px rgba(26,60,110,0.12);
  background: #fff;
}
.pdc-unit {
  font-size: 0.8rem;
  color: #888;
}

/* Dual mg/mcg input row — two number inputs + two unit labels */
.pdc-input-row--dual { flex-wrap: wrap; gap: 6px; }
.pdc-input-row--dual input[type="number"] { width: 78px; }
.pdc-input-row--dual .pdc-unit { margin-right: 4px; }

/* ─── Range slider ──────────────────────────────────────────────── */
.pdc-range {
  width: 100%;
  margin-top: 6px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #0f77ee 0%, #0f77ee var(--pct, 20%), #ddd var(--pct, 20%), #ddd 100%);
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}
.pdc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f77ee;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  cursor: pointer;
}
.pdc-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f77ee;
  border: 2px solid #fff;
  cursor: pointer;
}

/* ─── Toggle buttons ────────────────────────────────────────────── */
.pdc-toggle-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pdc-toggle, .pdc-syringe, .pdc-blend-toggle, .pdc-blend-syringe {
  padding: 6px 13px;
  border: 1px solid #d4d0c8;
  border-radius: 6px;
  background: #f7f9fc;
  font-size: 0.82rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
  transition: all 0.13s;
}
.pdc-toggle:hover, .pdc-syringe:hover, .pdc-blend-toggle:hover, .pdc-blend-syringe:hover {
  border-color: #0f77ee;
  color: #0f77ee;
  background: #f0f4fa;
}
.pdc-toggle.active, .pdc-syringe.active, .pdc-blend-toggle.active, .pdc-blend-syringe.active {
  background: #0f77ee;
  border-color: #0f77ee;
  color: #fff;
}

/* ─── Vial visualization ────────────────────────────────────────── */
.pdc-vial-vis {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}
.pdc-vial-outer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
}
.pdc-vial-cap {
  width: 28px;
  height: 14px;
  background: #0f77ee;
  border-radius: 4px 4px 0 0;
}
.pdc-vial-body {
  width: 64px;
  height: 110px;
  border: 2px solid #c8c4bc;
  border-radius: 4px;
  background: #f7f9fc;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdc-vial-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, #c8daf5, #d4e5fb);
  transition: height 0.4s cubic-bezier(0.4,0,0.2,1);
  height: 40%;
}
.pdc-vial-label {
  position: relative;
  z-index: 2;
  text-align: center;
}
.pdc-vial-label #pdc-label-mgml {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0d1f3c;
}
.pdc-label-unit {
  font-size: 0.65rem;
  color: #0f77ee;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pdc-vial-caption {
  margin-top: 7px;
  font-size: 0.75rem;
  color: #888;
  text-align: center;
}

/* ─── Metrics grid ──────────────────────────────────────────────── */
.pdc-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}
.pdc-metric {
  background: #f7f9fc;
  border-radius: 8px;
  padding: 10px 12px;
}
.pdc-metric--accent {
  background: #f0f6f0;
}
.pdc-metric-label {
  font-size: 0.72rem;
  color: #888;
  font-weight: 500;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pdc-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}
.pdc-metric--accent .pdc-metric-value {
  color: #0f77ee;
}

/* ─── Syringe visualization ─────────────────────────────────────── */
.pdc-syringe-vis {
  margin: 1rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pdc-syringe-barrel {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 36px;
  background: #f7f9fc;
  border: 1.5px solid #c8c4bc;
  border-radius: 4px;
  overflow: hidden;
}
.pdc-syringe-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  background: linear-gradient(to right, #a8c4e8, #c8d9f5);
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
}
.pdc-syringe-marks {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}
.pdc-syringe-mark-line {
  position: absolute;
  top: 50%;
  width: 1px;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.18);
}
.pdc-syringe-mark-line.major {
  height: 60%;
  background: rgba(0,0,0,0.28);
}
.pdc-syringe-mark-label {
  position: absolute;
  top: 2px;
  font-size: 9px;
  color: #666;
  transform: translateX(-50%);
  white-space: nowrap;
}
.pdc-syringe-dose-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: #c0392b;
  opacity: 0.8;
  transition: left 0.4s cubic-bezier(0.4,0,0.2,1);
}
.pdc-syringe-plunger {
  width: 100%;
  max-width: 340px;
  height: 10px;
  background: #d4d0c8;
  border-radius: 0 0 3px 3px;
  border: 1px solid #c8c4bc;
  border-top: none;
  transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
}
.pdc-syringe-caption {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #888;
  text-align: center;
}

/* ─── Disclaimer ────────────────────────────────────────────────── */
.pdc-disclaimer {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #aaa;
  line-height: 1.5;
  padding: 10px 12px;
  background: #f7f9fc;
  border-radius: 7px;
  border-left: 3px solid #e0dbd0;
}

/* ─── Utility ───────────────────────────────────────────────────── */
.pdc-hidden { display: none !important; }

/* Dark mode intentionally disabled — calculator always renders in light theme. */

/* ─── Mode switcher ─────────────────────────────────────────────── */
.pdc-mode-switcher {
  margin-left: auto;
  display: flex;
  gap: 4px;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 3px;
}
.pdc-mode-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: #777;
  cursor: pointer;
  transition: all 0.15s;
}
.pdc-mode-btn:hover  { color: #0f77ee; }
.pdc-mode-btn.active { background: #fff; color: #0f77ee; box-shadow: 0 1px 4px rgba(0,0,0,0.12); }

/* ─── Blend layout ──────────────────────────────────────────────── */
.pdc-blend-top {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 680px) { .pdc-blend-top { grid-template-columns: 1fr; } }

/* ─── Blend header row ──────────────────────────────────────────── */
.pdc-blend-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.pdc-add-peptide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #0f77ee;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.13s;
}
.pdc-add-peptide-btn:hover { background: #0a5fcb; }

/* ─── Peptide rows ──────────────────────────────────────────────── */
.pdc-peptide-list { display: flex; flex-direction: column; gap: 10px; }

.pdc-peptide-row {
  display: flex;
  border: 1px solid #e4e0d8;
  border-radius: 9px;
  overflow: hidden;
  background: #fafafa;
}
.pdc-peptide-accent { width: 5px; flex-shrink: 0; }
.pdc-peptide-body   { flex: 1; padding: 10px 12px; }

.pdc-peptide-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.pdc-peptide-name {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1a1a1a;
  outline: none;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 2px;
}
.pdc-peptide-name:focus { border-bottom-color: #0f77ee; }

.pdc-remove-peptide {
  width: 22px; height: 22px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  color: #999;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.13s;
}
.pdc-remove-peptide:hover { background: #fde8e8; color: #c0392b; }

.pdc-peptide-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 640px) { .pdc-peptide-fields { grid-template-columns: repeat(2, 1fr); } }

.pdc-pf-label {
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  font-weight: 500;
  color: #888;
  gap: 4px;
}
.pdc-pf-num {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #d4d0c8;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #1a1a1a;
  background: #fff;
  -moz-appearance: textfield;
}
.pdc-pf-num::-webkit-outer-spin-button,
.pdc-pf-num::-webkit-inner-spin-button { -webkit-appearance: none; }
.pdc-pf-num:focus { outline: none; border-color: #0f77ee; box-shadow: 0 0 0 2px rgba(15,119,238,0.12); }

/* ─── Blend summary grid ────────────────────────────────────────── */
.pdc-blend-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 600px) { .pdc-blend-summary-grid { grid-template-columns: 1fr 1fr; } }

/* ─── Per-peptide breakdown ─────────────────────────────────────── */
.pdc-blend-breakdown { display: flex; flex-direction: column; gap: 10px; margin-top: 0.5rem; }

.pdc-breakdown-row {
  background: #f7f9fc;
  border-radius: 8px;
  padding: 10px 12px;
}
.pdc-bd-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: #1a1a1a;
  margin-bottom: 8px;
}
.pdc-bd-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pdc-bd-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pdc-bd-metric { background: #fff; border-radius: 6px; padding: 5px 9px; min-width: 80px; }
.pdc-bd-metric-label { font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.04em; color: #aaa; margin-bottom: 2px; }
.pdc-bd-metric-val   { font-size: 0.85rem; font-weight: 700; color: #1a1a1a; }
.pdc-bd-bar-wrap { height: 4px; background: #e8e4dc; border-radius: 4px; overflow: hidden; }
.pdc-bd-bar      { height: 100%; border-radius: 4px; transition: width 0.4s cubic-bezier(0.4,0,0.2,1); }

/* Dark mode additions removed — light theme only. */
