/* Round Fit studio planner. Uses the theme presets, with fallbacks. */
.rfp {
  --rfp-base: var(--wp--preset--color--base, #151412);
  --rfp-surface: var(--wp--preset--color--surface, #1f1c19);
  --rfp-surface-2: var(--wp--preset--color--surface-2, #2a2622);
  --rfp-border: var(--wp--preset--color--border, #3b352f);
  --rfp-text: var(--wp--preset--color--contrast, #d9d2c7);
  --rfp-heading: var(--wp--preset--color--heading, #efe9df);
  --rfp-muted: var(--wp--preset--color--muted, #a39a8e);
  --rfp-brand: var(--wp--preset--color--brand, #c8893f);
  --rfp-brand-soft: var(--wp--preset--color--brand-soft, #d9a25e);
  --rfp-on-brand: var(--wp--preset--color--on-brand, #12100e);
  --rfp-ink: var(--wp--preset--color--ink, #0b0a09);
  --rfp-num: var(--wp--preset--font-family--numeric, "Genos", ui-monospace, monospace);
  --rfp-r: var(--round-radius, 4px);
  --rfp-r-sm: var(--round-radius-sm, 3px);
  color: var(--rfp-text);
  font-family: inherit;
  max-width: 1240px;
  margin-inline: auto;
}
.rfp *, .rfp *::before, .rfp *::after { box-sizing: border-box; }
.rfp button { font: inherit; color: inherit; cursor: pointer; }
.rfp [hidden] { display: none !important; }

/* Plan tabs */
.rfp-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rfp-border); border-radius: var(--rfp-r); overflow: hidden; margin-bottom: 1.5rem; }
.rfp-tab { text-align: left; background: var(--rfp-surface); border: 0; border-right: 1px solid var(--rfp-border); padding: 1rem 1.25rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; position: relative; transition: background-color .15s; }
.rfp-tab:last-child { border-right: 0; }
.rfp-tab:hover { background: var(--rfp-surface-2); }
.rfp-tab__t { color: var(--rfp-heading); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.rfp-tab__d { color: var(--rfp-muted); font-size: .875rem; line-height: 1.4; }
.rfp-tab.is-active { background: var(--rfp-surface-2); }
.rfp-tab.is-active::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rfp-brand); }
.rfp-tab:focus-visible { outline: 2px solid var(--rfp-brand-soft); outline-offset: -2px; }

/* Layout */
.rfp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
.rfp-main { display: grid; gap: 1.5rem; min-width: 0; }
.rfp-card { background: var(--rfp-surface); border: 1px solid var(--rfp-border); border-radius: var(--rfp-r); padding: 1.5rem; min-width: 0; }
.rfp-card__h { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rfp-h { margin: 0; color: var(--rfp-heading); font-size: 1.25rem; font-weight: 750; line-height: 1.08; letter-spacing: -.025em; display: flex; align-items: baseline; gap: .65rem; }
.rfp-n { font-family: var(--rfp-num); color: var(--rfp-brand); font-size: 1rem; font-weight: 600; letter-spacing: .04em; }
.rfp-note { margin: 0 0 1rem; color: var(--rfp-muted); font-size: .9375rem; line-height: 1.5; }
.rfp-note--sm { font-size: .8125rem; margin: .5rem 0 0; }
.rfp-rule { border: 0; border-top: 1px solid var(--rfp-border); margin: 1rem 0; }

/* Inputs, matching .round-form */
.rfp select, .rfp input[type="number"], .rfp input[type="text"], .rfp input[type="email"], .rfp input[type="tel"], .rfp textarea {
  background: var(--rfp-base); color: var(--rfp-heading); border: 1px solid var(--rfp-border); border-radius: var(--rfp-r-sm);
  padding: .75rem .9rem; min-height: 48px; font: inherit; font-size: 1rem; width: 100%; max-width: 100%;
}
.rfp select:focus, .rfp input:focus, .rfp textarea:focus { outline: none; border-color: var(--rfp-brand-soft); box-shadow: 0 0 0 3px rgba(200, 137, 63, .25); }
.rfp input[type="number"] { font-family: var(--rfp-num); font-size: 1.125rem; -moz-appearance: textfield; }
.rfp input[type="number"]::-webkit-outer-spin-button, .rfp input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rfp-currency-wrap { display: flex; align-items: center; gap: .6rem; color: var(--rfp-muted); font-size: .875rem; }
.rfp-currency { width: auto !important; min-height: 40px !important; padding: .45rem 2rem .45rem .75rem !important; }

/* Equipment list */
.rfp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rfp-border); }
.rfp-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 8.5rem 2.25rem; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--rfp-border); }
.rfp-item__name { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.rfp-item__t { color: var(--rfp-heading); font-weight: 600; line-height: 1.3; }
.rfp-item__u { color: var(--rfp-muted); font-size: .8125rem; }
.rfp-item__total { font-family: var(--rfp-num); font-size: 1.25rem; color: var(--rfp-heading); text-align: right; white-space: nowrap; }
.rfp-item__x { background: none; border: 1px solid transparent; border-radius: var(--rfp-r-sm); width: 2.25rem; height: 2.25rem; color: var(--rfp-muted); font-size: 1.35rem; line-height: 1; }
.rfp-item__x:hover, .rfp-item__x:focus-visible { color: var(--rfp-heading); border-color: var(--rfp-border); outline: none; }
.rfp-empty { padding: 1.25rem 0; color: var(--rfp-muted); border-bottom: 1px solid var(--rfp-border); }
.rfp-qty { display: inline-flex; align-self: center; border: 1px solid var(--rfp-border); border-radius: var(--rfp-r-sm); overflow: hidden; background: var(--rfp-base); }
.rfp-qty__b { background: none; border: 0; width: 2.5rem; min-height: 44px; font-size: 1.15rem; color: var(--rfp-muted); }
.rfp-qty__b:hover, .rfp-qty__b:focus-visible { color: var(--rfp-on-brand); background: var(--rfp-brand); outline: none; }
.rfp .rfp-qty input.rfp-qty__in { width: 3.5rem; min-height: 44px; border: 0; border-radius: 0; text-align: center; padding: .25rem; background: transparent; }
.rfp .rfp-qty input.rfp-qty__in:focus { box-shadow: inset 0 0 0 2px var(--rfp-brand-soft); }
.rfp-add { margin-top: 1rem; }
.rfp-row-actions { margin-top: .75rem; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.rfp-link { background: none; border: 0; padding: .25rem 0; color: var(--rfp-brand-soft); font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.rfp-link:hover, .rfp-link:focus-visible { color: var(--rfp-heading); outline: none; }

/* Assumptions */
.rfp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.rfp-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.rfp-field__l { color: var(--rfp-text); font-size: .875rem; font-weight: 600; line-height: 1.3; }
.rfp-field__in { position: relative; }
.rfp-field.is-money input { padding-right: 3.6rem; }
.rfp-field__cur { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--rfp-muted); font-size: .8125rem; letter-spacing: .04em; pointer-events: none; }
.rfp-field__h { color: var(--rfp-muted); font-size: .75rem; line-height: 1.35; }

/* Summary */
.rfp-sum { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 6.5rem); background: var(--rfp-ink); border-color: var(--rfp-border); box-shadow: 6px 6px 0 #000; }
.rfp-sum .rfp-h { margin-bottom: 1rem; }
.rfp-sum__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .35rem 0; }
.rfp-sum__k { color: var(--rfp-muted); font-size: .875rem; }
.rfp-sum__v { font-family: var(--rfp-num); color: var(--rfp-heading); font-size: 1.25rem; text-align: right; white-space: nowrap; }
.rfp-sum__row.is-big { flex-direction: column; align-items: flex-start; gap: .1rem; }
.rfp-sum__row.is-big .rfp-sum__k { color: var(--rfp-text); font-weight: 600; }
.rfp-sum__row.is-big .rfp-sum__v { font-size: 2.25rem; line-height: 1.05; color: var(--rfp-brand); text-align: left; white-space: normal; }
.rfp-sum__v.is-neg { color: #e0806a; }
.rfp-sum__v.is-muted { color: var(--rfp-muted) !important; font-family: inherit; font-size: 1rem !important; }
.rfp-sum__actions { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin-top: 1.25rem; }
.rfp-btn { display: inline-block; text-decoration: none; text-align: center; }
.rfp-sum .rfp-btn { width: 100%; }

/* Send */
.rfp-send { margin-top: 1.5rem; }
.rfp-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.rfp-ff { margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.rfp-ff.is-full { grid-column: 1 / -1; }
.rfp-ff label { font-size: .875rem; font-weight: 600; }
.rfp-opt { color: var(--rfp-muted); font-weight: 400; }
.rfp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.rfp-consent { display: flex; gap: .65rem; align-items: flex-start; margin: 1.25rem 0; font-size: .875rem; line-height: 1.45; }
.rfp-consent input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--rfp-brand); flex: none; }
.rfp-consent a { color: var(--rfp-brand-soft); }
.rfp-notice { margin: 1rem 0 0; padding: .85rem 1rem; border: 1px solid var(--rfp-border); border-radius: var(--rfp-r-sm); }
.rfp-notice.is-ok { border-color: var(--rfp-brand); color: var(--rfp-heading); }
.rfp-notice.is-error { border-color: #b4553f; color: var(--rfp-heading); }
.rfp-btn[disabled] { opacity: .7; cursor: progress; }

.rfp-mbar { display: none; }
@media (max-width: 1080px) {
  .rfp-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom, 0px)); background: var(--rfp-ink); border-top: 2px solid var(--rfp-brand); text-decoration: none; transform: translateY(110%); transition: transform .2s ease; }
  .rfp-mbar.is-on { transform: none; }
  .rfp-mbar__c { display: flex; flex-direction: column; min-width: 0; }
  .rfp-mbar__c + .rfp-mbar__c { text-align: right; }
  .rfp-mbar__k { color: var(--rfp-muted); font-size: .75rem; }
  .rfp-mbar__v { color: var(--rfp-brand); font-family: var(--rfp-num); font-size: 1.25rem; line-height: 1.1; white-space: nowrap; }
  .rfp-layout { grid-template-columns: 1fr; }
  .rfp-sum { position: static; }
  .rfp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .rfp-tabs { grid-template-columns: 1fr; }
  .rfp-tab { border-right: 0; border-bottom: 1px solid var(--rfp-border); padding: .85rem 1rem; }
  .rfp-tab:last-child { border-bottom: 0; }
  .rfp-tab__d { display: none; }
  .rfp-tab.is-active .rfp-tab__d { display: block; }
  .rfp-tab.is-active::before { top: 0; bottom: 0; right: auto; width: 3px; height: auto; }
  .rfp-card { padding: 1.1rem; }
  .rfp-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name x" "qty total"; row-gap: .6rem; column-gap: .75rem; }
  .rfp-item__name { grid-area: name; }
  .rfp-item__x { grid-area: x; }
  .rfp-qty { grid-area: qty; justify-self: start; }
  .rfp-item__total { grid-area: total; align-self: center; }
  .rfp-item__x { justify-self: end; }
  .rfp-grid, .rfp-fgrid { grid-template-columns: 1fr; }
  .rfp-sum { box-shadow: 4px 4px 0 #000; }
}
@media (prefers-reduced-motion: reduce) { .rfp-tab, .rfp-mbar { transition: none; } }

@media print {
  .rfp { color: #000; }
  .rfp-tabs .rfp-tab:not(.is-active), .rfp-send, .rfp-mbar, .rfp-add, .rfp-row-actions, .rfp-sum__actions, .rfp-item__x, .rfp-qty__b { display: none !important; }
  .rfp-card, .rfp-sum { background: #fff !important; border-color: #999 !important; box-shadow: none !important; position: static; }
  .rfp-layout { grid-template-columns: 1fr; }
  .rfp *, .rfp-sum__row.is-big .rfp-sum__v { color: #000 !important; }
  .rfp input { border: 0 !important; background: none !important; }
}
