@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@600;700;800&display=swap");

.rs-cabin-builder {
  --rs-bg: #fbfaf7;
  --rs-ink: #050816;
  --rs-muted: #526482;
  --rs-border: #dedbd4;
  --rs-gold: #e6bf35;
  --rs-soft-gold: #f8efd7;
  --rs-preview: #efe4d1;
  --rs-error: #9a243a;
  color: var(--rs-ink);
  background: var(--rs-bg);
  font-family: "DM Sans", system-ui, sans-serif;
  min-height: 100vh;
}

.rs-cabin-builder *,
.rs-cabin-builder *::before,
.rs-cabin-builder *::after {
  box-sizing: border-box;
}

.rs-cb-container {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
}

.rs-cb-hero,
.rs-cb-kicker {
  display: none;
}

.rs-cb-app {
  padding: 10px 0 58px;
}

.rs-cb-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 44px;
}

.rs-cb-steps button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: #fffefa;
  color: #20375b;
  box-shadow: 0 8px 22px rgba(14, 19, 30, 0.035);
  font:
    500 14px/1 "DM Sans",
    system-ui,
    sans-serif;
}

.rs-cb-steps button:hover {
  background: #fffefa;
  color: #20375b;
}

.rs-cb-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid #64748b;
  border-radius: 50%;
  color: #20375b;
  font-size: 13px;
  font-weight: 800;
}

.rs-cb-steps button.is-active {
  background: var(--rs-gold);
  color: #000;
}

.rs-cb-steps button.is-active span {
  border-color: #000;
  color: #000;
}

.rs-cb-steps button.is-done {
  background: var(--rs-soft-gold);
  color: #000;
}

.rs-cb-steps button.is-done span {
  border-color: transparent;
  color: #000;
}

.rs-cb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 42px;
  align-items: start;
}

.rs-cb-panel {
  min-height: 560px;
}

.rs-cb-step-body h2,
.rs-cb-summary h3,
.rs-cb-modal-card h2 {
  margin: 0 0 25px;
  color: var(--rs-ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.rs-cb-options {
  display: grid;
  gap: 16px;
}

.rs-cb-size-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rs-cb-wood-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rs-cb-two-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rs-cb-option {
  width: 100%;
  border: 2px solid var(--rs-border);
  border-radius: 10px;
  background: transparent;
  color: var(--rs-ink);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.rs-cb-option:hover {
  border-color: #cfc9bd;
  background: transparent;
}

.rs-cb-option.is-active {
  border-color: var(--rs-gold);
  background: #fbf5e5;
}

.rs-cb-option strong {
  display: block;
  color: var(--rs-ink);
  font-weight: 800;
  letter-spacing: 0;
}

.rs-cb-option small {
  display: block;
  margin-top: 7px;
  color: var(--rs-muted);
  font-size: 14px;
  font-weight: 500;
}

.rs-cb-size-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  padding: 20px;
  text-align: center;
}

.rs-cb-size-option strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

.rs-cb-wood-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 22px 14px;
  text-align: center;
}

.rs-cb-swatch {
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(5, 8, 22, 0.16);
}

.rs-cb-flat-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 100px;
  padding: 24px;
  text-align: left;
}

.rs-cb-flat-option strong {
  font-size: 17px;
}

.rs-cb-actions,
.rs-cb-summary-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rs-cb-actions {
  justify-content: space-between;
  margin-top: 32px;
}

.rs-cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--rs-ink);
  font:
    700 14px/1.2 "DM Sans",
    system-ui,
    sans-serif;
  text-decoration: none;
}

.rs-cb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rs-cb-btn-gold {
  background: var(--rs-gold);
  border-color: var(--rs-gold);
}

.rs-cb-btn-gold:focus,
.rs-cb-btn-gold:active {
  background: var(--rs-gold);
  border-color: var(--rs-gold);
  color: #000;
}

.rs-cb-btn-gold:hover {
  background-color: hsl(46 70% 57% / 0.8) !important;
  color: #000 !important;
}

.rs-cb-btn-outline:not(:disabled) {
  background: transparent;
  border-color: var(--rs-border);
}

.rs-cb-btn-outline:not(:disabled):hover {
  background-color: hsl(348 72% 35%) !important;
  border-color: var(--rs-border);
  color: #fff !important;
}

.rs-cb-modal-close:hover {
  background-color: hsl(348 72% 35%) !important;
  border-color: var(--rs-border);
  color: #fff !important;
}

.rs-cb-btn-outline:disabled {
  background: transparent;
  border-color: var(--rs-border);
  color: var(--rs-muted) !important;
  cursor: default !important;
}

.rs-cb-icon {
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
  position: relative;
  transform: translateY(-1px);
}

.rs-cb-icon::before {
  content: "";
  position: absolute;
  left: -5px;
  top: -7px;
  width: 11px;
  height: 2px;
  background: currentColor;
  transform: rotate(75deg);
  transform-origin: right center;
}

.rs-cb-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: -7px;
  height: 4px;
  background:
    radial-gradient(circle, currentColor 0 2px, transparent 2px) left center /
      6px 4px no-repeat,
    radial-gradient(circle, currentColor 0 2px, transparent 2px) right center /
      6px 4px no-repeat;
}

.rs-cb-summary {
  position: sticky;
  top: 28px;
  padding: 25px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 18px 48px rgba(13, 18, 28, 0.08);
}

.rs-cb-summary h3 {
  margin-bottom: 18px;
  font-size: 23px;
}

.rs-cb-summary-lines {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rs-border);
}

.rs-cb-summary-lines div,
.rs-cb-review div,
.rs-cb-total,
.rs-cb-review-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.rs-cb-summary-lines span,
.rs-cb-review span {
  color: var(--rs-muted);
  font-size: 14px;
}

.rs-cb-summary-lines strong,
.rs-cb-review strong {
  max-width: 60%;
  color: var(--rs-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.rs-cb-total {
  align-items: center;
  padding: 19px 0 23px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 27px;
  font-weight: 800;
}

.rs-cb-total strong {
  color: var(--rs-gold);
}

.rs-cb-mini-preview {
  --rs-cb-cabin-color: #d4a76a;
  --rs-cb-preview-bg: rgba(212, 167, 106, 0.2);
  --rs-cb-body-width: 92px;
  --rs-cb-body-height: 64px;
  --rs-cb-roof-width: 126px;
  --rs-cb-roof-height: 36px;
  --rs-cb-window-width: 30px;
  --rs-cb-window-height: 28px;
  --rs-cb-window-top: 50%;
  --rs-cb-border: 3px;
  --rs-cb-roof-top: calc((var(--rs-cb-roof-height) * -1) + 2px);
  --rs-cb-roof-angle: polygon(50% 0, 100% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 34px 24px;
  border-radius: 7px;
  background: var(--rs-cb-preview-bg);
  background-color: var(--rs-cb-preview-bg);
  overflow: hidden;
  transition:
    background-color 0.28s ease,
    background 0.28s ease;
}

.rs-cb-mini-preview.is-wood-natural-pine {
  --rs-cb-preview-bg: rgba(212, 167, 106, 0.2);
}

.rs-cb-mini-preview.is-wood-dark-oak {
  --rs-cb-preview-bg: rgba(92, 58, 30, 0.2);
}

.rs-cb-mini-preview.is-wood-slate-grey {
  --rs-cb-preview-bg: rgba(107, 123, 141, 0.2);
}

.rs-cb-mini-preview.is-wood-charcoal-black {
  --rs-cb-preview-bg: rgba(44, 44, 44, 0.2);
}

.rs-cb-mini-preview.is-size-4m-x-3m {
  --rs-cb-body-width: 120px;
  --rs-cb-body-height: 70px;
  --rs-cb-roof-width: 154px;
  --rs-cb-roof-height: 38px;
}

.rs-cb-mini-preview.is-size-4m-x-4m {
  --rs-cb-body-width: 130px;
  --rs-cb-body-height: 86px;
  --rs-cb-roof-width: 166px;
  --rs-cb-roof-height: 44px;
}

.rs-cb-mini-preview.is-size-5m-x-3m {
  --rs-cb-body-width: 154px;
  --rs-cb-body-height: 70px;
  --rs-cb-roof-width: 190px;
  --rs-cb-roof-height: 38px;
}

.rs-cb-mini-preview.is-size-5m-x-4m {
  --rs-cb-body-width: 166px;
  --rs-cb-body-height: 86px;
  --rs-cb-roof-width: 202px;
  --rs-cb-roof-height: 44px;
}

.rs-cb-mini-preview.is-size-6m-x-4m {
  --rs-cb-body-width: 184px;
  --rs-cb-body-height: 90px;
  --rs-cb-roof-width: 220px;
  --rs-cb-roof-height: 46px;
}

.rs-cb-mini-preview.is-glazing-double-glazed {
  --rs-cb-window-width: 58px;
  --rs-cb-window-height: 34px;
}

.rs-cb-mini-preview.is-glazing-full-length-glazing {
  --rs-cb-window-width: 76px;
  --rs-cb-window-height: 58px;
  --rs-cb-window-top: 52%;
}

.rs-cb-mini-preview.is-glazing-bi-fold-doors {
  --rs-cb-window-width: calc(var(--rs-cb-body-width) - 34px);
  --rs-cb-window-height: calc(var(--rs-cb-body-height) - 28px);
  --rs-cb-window-top: 52%;
}

.rs-cb-mini-preview.is-roof-pent {
  --rs-cb-roof-height: 34px;
  --rs-cb-roof-top: calc((var(--rs-cb-roof-height) * -1) + 2px);
  --rs-cb-roof-angle: polygon(0 46%, 100% 14%, 100% 100%, 0 100%);
}

.rs-cb-mini-preview.is-roof-flat {
  --rs-cb-roof-height: 22px;
  --rs-cb-roof-top: calc((var(--rs-cb-roof-height) * -1) + 2px);
  --rs-cb-roof-angle: polygon(0 42%, 100% 42%, 100% 100%, 0 100%);
}

.rs-cb-mini-preview.is-roof-tiled-effect {
  --rs-cb-roof-top: calc((var(--rs-cb-roof-height) * -1) + 2px);
  --rs-cb-roof-angle: polygon(50% 0, 100% 100%, 0 100%);
}

.rs-cb-cabin-shape {
  position: relative;
  width: var(--rs-cb-body-width);
  height: var(--rs-cb-body-height);
  margin-top: 48px;
  background: var(--rs-cb-cabin-color);
  border: var(--rs-cb-border) solid
    color-mix(in srgb, var(--rs-cb-cabin-color) 70%, #3f2a16);
  border-top: 0;
  border-radius: 6px;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  box-shadow: none;
  z-index: 1;
  transition:
    width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.28s ease,
    border-color 0.28s ease,
    transform 0.28s ease;
}

.rs-cb-cabin-shape::before {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--rs-cb-roof-top);
  width: var(--rs-cb-roof-width);
  height: var(--rs-cb-roof-height);
  transform: translateX(-50%);
  background: #9d9a96;
  clip-path: var(--rs-cb-roof-angle, polygon(50% 0, 100% 100%, 0 100%));
  z-index: 3;
  pointer-events: none;
  transition:
    width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    clip-path 0.32s ease,
    background 0.28s ease;
}

.rs-cb-mini-preview.is-roof-tiled-effect .rs-cb-cabin-shape::before {
  background: repeating-linear-gradient(180deg, #9d9a96 0 6px, #8d8985 6px 8px);
}

.rs-cb-cabin-shape::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--rs-cb-window-top);
  width: min(var(--rs-cb-window-width), calc(var(--rs-cb-body-width) - 30px));
  height: min(
    var(--rs-cb-window-height),
    calc(var(--rs-cb-body-height) - 24px)
  );
  margin-inline: auto;
  transform: translateY(-50%);
  border: 2px solid color-mix(in srgb, var(--rs-cb-cabin-color) 70%, #3f2a16);
  border-radius: 4px;
  background: linear-gradient(135deg, #aab4ad, #838a84);
  opacity: 0.82;
  z-index: 1;
  transition:
    width 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.28s ease,
    background 0.28s ease;
}

.rs-cb-preview-meta {
  max-width: 250px;
  margin-top: 18px;
  color: var(--rs-muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.rs-cb-mini-preview.is-size-3m-x-3m .rs-cb-cabin-shape,
.rs-cb-mini-preview.is-size-4m-x-3m .rs-cb-cabin-shape,
.rs-cb-mini-preview.is-size-4m-x-4m .rs-cb-cabin-shape,
.rs-cb-mini-preview.is-size-5m-x-3m .rs-cb-cabin-shape,
.rs-cb-mini-preview.is-size-5m-x-4m .rs-cb-cabin-shape,
.rs-cb-mini-preview.is-size-6m-x-4m .rs-cb-cabin-shape {
  animation: rs-cb-settle 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rs-cb-settle {
  0% {
    transform: scale(0.985);
  }
  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rs-cb-mini-preview,
  .rs-cb-cabin-shape,
  .rs-cb-cabin-shape::before,
  .rs-cb-cabin-shape::after,
  .rs-cb-preview-meta {
    animation: none !important;
    transition: none !important;
  }
}

.rs-cb-review {
  display: grid;
  gap: 19px;
  padding: 25px 24px 19px;
  background: rgba(255, 255, 255, 0.3);
}

.rs-cb-review div {
  align-items: center;
}

.rs-cb-review span,
.rs-cb-review strong {
  font-size: 16px;
}

.rs-cb-review-total {
  align-items: center;
  margin: 0 24px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--rs-border);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 27px;
  font-weight: 800;
}

.rs-cb-review-total strong {
  color: var(--rs-ink);
}

.rs-cb-summary-actions {
  margin-top: 22px;
}

.rs-cb-summary-actions .rs-cb-btn {
  flex: 1;
  min-height: 50px;
}

.rs-cb-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--rs-muted);
  font-size: 14px;
  line-height: 1.45;
}

.rs-cb-message.is-success {
  color: #19724d;
}

.rs-cb-message.is-error {
  color: var(--rs-error);
}

.rs-cb-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.rs-cb-modal.is-open {
  display: flex;
}

.rs-cb-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 22, 0.72);
}

.rs-cb-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 26px;
  border: 1px solid var(--rs-border);
  border-radius: 8px;
  background: #fff;
}

.rs-cb-modal-card p {
  margin: -12px 0 20px;
  color: var(--rs-muted);
  line-height: 1.55;
}

.rs-cb-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--rs-border);
  border-radius: 50%;
  background: #fff;
  color: var(--rs-ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 0;
}

.rs-cb-quote-form {
  display: grid;
  gap: 14px;
}

.rs-cb-quote-form label {
  display: grid;
  gap: 7px;
  color: var(--rs-ink);
  font-size: 14px;
  font-weight: 800;
}

.rs-cb-quote-form input,
.rs-cb-quote-form textarea {
  width: 100%;
  border: 1px solid var(--rs-border);
  border-radius: 8px;
  background: #fff;
  color: var(--rs-ink);
  font:
    500 15px/1.45 "DM Sans",
    system-ui,
    sans-serif;
  padding: 12px 13px;
}

.rs-cb-quote-form input:focus,
.rs-cb-quote-form textarea:focus,
.rs-cb-option:focus,
.rs-cb-btn:focus,
.rs-cb-steps button:focus {
  outline: none;
  outline-offset: 2px;
  border-color: rgba(230, 191, 53, 0.8);
}

.woocommerce .rs-cb-cart-title {
  display: block;
  color: #121a2a;
  font-weight: 800;
}

.woocommerce .rs-cb-cart-meta {
  color: #4f5664;
  font-weight: 600;
}

.woocommerce td.product-name dl.variation {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #e6dccb;
  border-radius: 8px;
  background: #fbf8f2;
}

.woocommerce td.product-name dl.variation dt,
.woocommerce td.product-name dl.variation dd {
  float: none;
  display: inline;
  margin: 0;
  padding: 0;
  color: #4f5664;
  font-size: 13px;
  line-height: 1.35;
}

.woocommerce td.product-name dl.variation dt {
  font-weight: 800;
  color: #121a2a;
}

[data-rs-add-cart] svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5px;
}

@media (max-width: 1120px) {
  .rs-cb-grid {
    grid-template-columns: 1fr;
  }

  .rs-cb-summary {
    position: static;
  }
}

@media (max-width: 760px) {
  .rs-cb-container {
    width: min(100% - 24px, 1380px);
  }

  .rs-cb-app {
    padding-top: 12px;
  }

  .rs-cb-steps {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin-bottom: 28px;
    padding-bottom: 5px;
  }

  .rs-cb-steps button {
    flex: 0 0 auto;
  }

  .rs-cb-size-grid,
  .rs-cb-wood-grid,
  .rs-cb-two-grid {
    grid-template-columns: 1fr;
  }

  .rs-cb-actions,
  .rs-cb-summary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rs-cb-actions .rs-cb-btn,
  .rs-cb-summary-actions .rs-cb-btn {
    width: 100%;
  }

  .rs-cb-summary {
    padding: 22px 18px;
  }

  .rs-cb-mini-preview {
    min-height: 260px;
  }
}
