/* Peptide Dosage Calculator – WordPress Plugin Styles
   All selectors are scoped to .ppc-wrap to avoid theme conflicts */

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

.ppc-wrap *,
.ppc-wrap *::before,
.ppc-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ppc-wrap {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #0f172a;
  background: #f4f7fb;
  padding: 24px 0 40px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.ppc-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 900px) {
  .ppc-layout {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }
}

/* ── Cards ── */
.ppc-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
}

.ppc-inputs-card {
  padding: 24px;
}

.ppc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ppc-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ppc-card-title svg {
  color: #2563eb;
  flex-shrink: 0;
}

.ppc-realtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 3px 10px;
}

/* ── Input Section ── */
.ppc-input-section {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.ppc-input-section--last {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.ppc-section-label {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}

.ppc-section-desc {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

/* ── Chips ── */
.ppc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ppc-chip {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  line-height: 1;
}

.ppc-chip:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.ppc-chip--active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15), 0 1px 2px rgba(0,0,0,0.1);
}

.ppc-chip--active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.ppc-custom-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ppc-custom-input {
  width: 108px;
  padding: 7px 36px 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  outline: none;
  -moz-appearance: textfield;
}

.ppc-custom-input::-webkit-inner-spin-button,
.ppc-custom-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.ppc-custom-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.ppc-custom-input--active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.ppc-custom-unit {
  position: absolute;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.15s;
}

.ppc-custom-input--active + .ppc-custom-unit {
  color: #2563eb;
}

/* ── Results ── */
.ppc-results-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ppc-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 20px;
}

.ppc-result-box {
  background: #f8fafc;
  border: 1px solid #e9eef5;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ppc-result-box--highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ppc-result-box--full {
  grid-column: 1 / -1;
}

.ppc-result-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.ppc-result-label--highlight {
  color: #2563eb;
}

.ppc-result-val {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.ppc-result-val--big {
  font-size: 28px;
  color: #2563eb;
}

/* Doses row */
.ppc-doses-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ppc-doses-icon {
  color: #94a3b8;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ppc-doses-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ppc-doses-main {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.ppc-doses-sub {
  font-size: 11px;
  color: #94a3b8;
}

.ppc-doses-num {
  font-size: 18px;
  white-space: nowrap;
}

/* ── Reset ── */
.ppc-reset-row {
  display: flex;
  justify-content: flex-end;
}

.ppc-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #64748b;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ppc-reset-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ── Warnings ── */
.ppc-warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  animation: ppc-fadein 0.25s ease;
}

.ppc-warning--red {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ppc-warning--red svg { color: #dc2626; flex-shrink: 0; margin-top: 1px; }
.ppc-warning--red strong { color: #7f1d1d; display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.ppc-warning--red p { color: #b91c1c; margin: 0; }

.ppc-warning--amber {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.ppc-warning--amber svg { color: #d97706; flex-shrink: 0; margin-top: 1px; }
.ppc-warning--amber strong { color: #78350f; display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; }
.ppc-warning--amber p { color: #b45309; margin: 0; }

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

/* ── Syringe ── */
.ppc-syringe-card { }

.ppc-syringe-area {
  padding: 20px;
  background: #f8fafc;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ppc-syringe-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
}

.ppc-syringe-empty p { margin: 0; }

.ppc-syringe-units-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 3px 9px;
}

/* SVG transition */
#ppc-liquid-fill,
#ppc-plunger-head,
#ppc-plunger-stem,
#ppc-plunger-stem-shadow,
#ppc-plunger-thumb {
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Accordion ── */
.ppc-accordion {
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 0 16px;
}

.ppc-accordion > div {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  overflow: hidden;
}

.ppc-accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #f8fafc;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
  text-align: left;
}

.ppc-accordion-trigger:hover { background: #f1f5f9; }

.ppc-accordion-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.ppc-info-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ppc-info-icon svg { color: #2563eb; }

.ppc-chevron {
  color: #64748b;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.ppc-accordion-trigger[aria-expanded="true"] .ppc-chevron {
  transform: rotate(180deg);
}

.ppc-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.ppc-accordion-content.ppc-open {
  max-height: 2000px;
}

.ppc-accordion-inner {
  padding: 20px 24px 24px;
  border-top: 1px solid #e2e8f0;
}

.ppc-edu-intro {
  font-size: 14px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 20px;
}

.ppc-edu-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ppc-edu-step {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}

.ppc-edu-step strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.ppc-edu-step p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.ppc-edu-step code {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  color: #334155;
}

.ppc-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px;
  color: #1e3a8a;
}

.ppc-disclaimer svg { color: #2563eb; flex-shrink: 0; margin-top: 2px; }
.ppc-disclaimer strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; color: #1e40af; }
.ppc-disclaimer p { font-size: 13px; color: #3b5fa0; margin: 0; line-height: 1.6; }

/* ── Responsive ── */
@media (max-width: 520px) {
  .ppc-results-grid { grid-template-columns: 1fr; }
  .ppc-result-box--full { grid-column: 1; }
  .ppc-result-val--big { font-size: 22px; }
}
