/* PPC Budget Calculator widget — scoped under .mm-ppc-calc.
   Brand match: frosted-glass dark navy card, cyan #38BDF8 accent,
   24px-ish rounded corners. Subtle animations only. */

.mm-ppc-calc {
  position: relative;
  display: block;
  margin: 2.5rem 0;
  padding: 1.75rem 1.75rem 1.5rem;
  background: linear-gradient(180deg, rgba(56,189,248,0.06), rgba(13,10,42,0.6));
  border: 1px solid rgba(56,189,248,0.25);
  border-radius: 20px;
  box-shadow: 0 0 32px rgba(56,189,248,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: rgba(255,255,255,0.92);
}

/* Header */
.mm-ppc-calc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(56,189,248,0.15);
}
.mm-ppc-calc__header h3 {
  margin: 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.6rem;
  color: #fff;
  line-height: 1.2;
}
.mm-ppc-calc__reset {
  font: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(56,189,248,0.85);
  background: transparent;
  border: 1px solid rgba(56,189,248,0.3);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mm-ppc-calc__reset:hover {
  background: rgba(56,189,248,0.1);
  color: #38BDF8;
}

/* Inputs grid */
.mm-ppc-calc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 640px) {
  .mm-ppc-calc__grid { grid-template-columns: 1fr; }
}

.mm-ppc-calc__field { display: flex; flex-direction: column; gap: 0.4rem; }
.mm-ppc-calc__field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.01em;
}
.mm-ppc-calc__field small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}
.mm-ppc-calc__field small a {
  color: rgba(56,189,248,0.8);
  text-decoration: underline;
  text-decoration-color: rgba(56,189,248,0.3);
}
.mm-ppc-calc__field small a:hover { color: #38BDF8; }

.mm-ppc-calc__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mm-ppc-calc__input-wrap:focus-within {
  border-color: rgba(56,189,248,0.6);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}
.mm-ppc-calc__prefix {
  padding: 0 0.5rem 0 0.85rem;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.mm-ppc-calc input[type="number"],
.mm-ppc-calc select {
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
  width: 100%;
  padding: 0.65rem 0.85rem;
  -moz-appearance: textfield;
  appearance: textfield;
}
.mm-ppc-calc__input-wrap input { padding-left: 0; }
.mm-ppc-calc input::-webkit-outer-spin-button,
.mm-ppc-calc input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mm-ppc-calc select {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%2338BDF8'><path stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.25rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.mm-ppc-calc select:focus {
  border-color: rgba(56,189,248,0.6);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}
.mm-ppc-calc select option { background: #13102a; color: #fff; }

/* Results panel */
.mm-ppc-calc__results {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.25rem;
}
.mm-ppc-calc__primary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 640px) {
  .mm-ppc-calc__primary { grid-template-columns: 1fr 1fr; }
}
.mm-ppc-calc__stat { display: flex; flex-direction: column; gap: 0.25rem; }
.mm-ppc-calc__stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}
.mm-ppc-calc__stat-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.85rem;
  color: #38BDF8;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* 70/20/10 allocation bars */
.mm-ppc-calc__alloc h4 {
  margin: 0 0 0.85rem;
  font-family: inherit;
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}
.mm-ppc-calc__alloc h4 span { color: #38BDF8; font-weight: 600; }
.mm-ppc-calc__alloc-row {
  display: grid;
  grid-template-columns: 130px 1fr 80px;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}
.mm-ppc-calc__alloc-label { color: rgba(255,255,255,0.75); }
.mm-ppc-calc__alloc-bar {
  display: block;
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  overflow: hidden;
}
.mm-ppc-calc__alloc-bar > span {
  display: block;
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease-out;
}
.mm-ppc-calc__alloc-bar--proven > span      { background: linear-gradient(90deg, #38BDF8, #7dd3fc); }
.mm-ppc-calc__alloc-bar--growth > span      { background: linear-gradient(90deg, #a78bfa, #c4b5fd); }
.mm-ppc-calc__alloc-bar--experiments > span { background: linear-gradient(90deg, #f0719d, #fbbf85); }
.mm-ppc-calc__alloc-amount {
  text-align: right;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .mm-ppc-calc__alloc-row { grid-template-columns: 110px 1fr 70px; gap: 0.5rem; font-size: 0.8rem; }
}

/* CTA */
.mm-ppc-calc__cta {
  text-align: center;
  padding: 1.25rem 0 0.5rem;
}
.mm-ppc-calc__cta p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
}
/* Specificity bumped to .mm-ppc-calc a.mm-ppc-calc__cta-btn so it wins over
   the .prose a base-link styles that color all anchors cyan. */
.mm-ppc-calc a.mm-ppc-calc__cta-btn {
  display: inline-block;
  background: #38BDF8;
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  text-decoration: none;
  border-bottom: 0;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.mm-ppc-calc a.mm-ppc-calc__cta-btn:hover {
  background: #7dd3fc;
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56,189,248,0.3);
}

/* Footer formula note */
.mm-ppc-calc__formula {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
  line-height: 1.5;
}
.mm-ppc-calc__formula strong { color: rgba(56,189,248,0.85); font-weight: 500; }
