/*
 * Cycle calculator widget styles. Standalone — must work on any guide page
 * without leaking into the surrounding article. Scoped via the .luna-calc
 * root class. See calculator.js for the markup contract.
 */

.luna-calc {
  margin: 32px 0;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(212, 165, 191, 0.08), rgba(199, 156, 191, 0.04));
  border: 1px solid var(--accent, #d4a5bf);
  border-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.luna-calc__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #1a1a1a);
}

.luna-calc__subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--text-muted, #666);
}

.luna-calc__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.luna-calc__tab {
  padding: 8px 14px;
  border: 1px solid rgba(212, 165, 191, 0.4);
  background: transparent;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text, #1a1a1a);
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.luna-calc__tab:hover {
  background: rgba(212, 165, 191, 0.08);
}

.luna-calc__tab--active {
  background: var(--accent, #d4a5bf);
  color: #fff;
  border-color: var(--accent, #d4a5bf);
}

.luna-calc__form {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.luna-calc__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.luna-calc__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
}

.luna-calc__input {
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: #fff;
  color: var(--text, #1a1a1a);
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.luna-calc__input:focus {
  outline: none;
  border-color: var(--accent, #d4a5bf);
  box-shadow: 0 0 0 3px rgba(212, 165, 191, 0.15);
}

.luna-calc__hint {
  font-size: 12px;
  color: var(--text-muted, #888);
}

.luna-calc__result {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(212, 165, 191, 0.3);
}

.luna-calc__result-title {
  font-size: 13px;
  color: var(--text-muted, #666);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.luna-calc__result-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  margin: 0;
}

.luna-calc__result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 14px;
}

.luna-calc__result-row + .luna-calc__result-row {
  border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

.luna-calc__result-row span:first-child {
  color: var(--text-muted, #666);
}

.luna-calc__result-row span:last-child {
  font-weight: 600;
  color: var(--text, #1a1a1a);
}

.luna-calc__cta {
  display: block;
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--accent, #d4a5bf);
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
}

.luna-calc__cta:hover {
  background: #c084a3;
}

.luna-calc__error {
  color: #c0392b;
  font-size: 13px;
  margin-top: 8px;
}

.luna-calc__disclaimer {
  font-size: 11px;
  color: var(--text-muted, #999);
  margin-top: 16px;
  font-style: italic;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .luna-calc__input,
  .luna-calc__result {
    background: #2a1f25;
    color: #f5e6ee;
    border-color: rgba(212, 165, 191, 0.25);
  }
  .luna-calc__result-value {
    color: #f5e6ee;
  }
}
