/*
  MijnBouwProject Brand Override
  Exact match with www.mijnbouwproject.nl design system.

  Colors:
    Navy:   #041959 (text, headings, dark backgrounds)
    Orange: #fc6b03 (PRIMARY accent, focus, buttons, CTAs, selections)
    Green:  #01b900 (success, price)

  Typography:
    Body: Barlow 400/500/600/700
    Headings: Barlow 700

  Button spec (from Webflow):
    padding: 1rem 2rem
    font-size: 1.125rem (18px)
    font-weight: 500
    border-radius: 0.5rem (8px)
    transition: background-color .2s cubic-bezier(.215,.61,.355,1), transform .2s
    hover: scale(0.97) + darker orange
*/

/* ========== CSS VARIABLES ========== */

:root {
  /* Primary → Orange (accent/interactive color) */
  --primary: #fc6b03;
  --primary-hover: #c75402;
  --primary-light: #fff3e6;

  /* Accent → Green (success) */
  --accent: #01b900;
  --accent-light: #e6ffe6;

  /* Warning stays orange-ish */
  --warning: #fc6b03;
  --warning-light: #fff3e6;

  /* Text → Navy */
  --text-primary: #041959;
  --text-secondary: #454a5c;
  --text-muted: #9ca2b4;

  /* Borders & surfaces */
  --border: #e6e6ed;
  --border-light: #f3f3f5;
  --surface: #ffffff;
  --surface-secondary: #f5f5f7;
  --background: #f3f3f5;

  /* Override legacy aliases to orange accent */
  --cfg-accent: #fc6b03;
  --cfg-accent-hover: #c75402;
  --cfg-accent-light: #fff3e6;
}

/* ========== FONTS ========== */

body,
input,
button,
select,
textarea {
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 1rem;
  line-height: 1.75rem;
}

h1, h2, h3, h4, h5, h6,
.cfg-header h1,
.preselect-title,
.preselect-option-title,
.cfg-section-title,
.tb-size-title,
.cfg-cat-label {
  font-family: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 700;
  color: #041959;
}

/* ========== HEADER — Logo + brand bar ========== */

.cfg-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e6e6ed !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr 1px 1fr !important;
  align-items: center !important;
  height: 70px !important;
  position: relative !important;
}

.cfg-header-logo {
  height: 32px;
  width: auto;
  justify-self: center;
}

/* Vertical separator line in center */
.cfg-header-divider {
  width: 1px;
  height: 32px;
  background: #e6e6ed;
  justify-self: center;
}

.cfg-header span {
  color: #9ca2b4 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  border-left: none !important;
  padding-left: 0 !important;
  margin-bottom: 0 !important;
  justify-self: center !important;
}

/* ========== GLOBAL BUTTON STYLE ========== */

/* Only override colors, keep original sizing */
.btn-primary,
.btn.btn-primary {
  background: #fc6b03 !important;
  border-color: #fc6b03 !important;
  color: #fff !important;
  border-radius: 0.5rem !important;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  background: #c75402 !important;
  border-color: #c75402 !important;
}

/* Preselect button colors (sizing is below near preselect-step) */
.preselect-btn.is-primary {
  background: #fc6b03 !important;
  border: 2px solid #fc6b03 !important;
  color: #fff !important;
}

.preselect-btn.is-primary:hover {
  background: #c75402 !important;
  border-color: #c75402 !important;
  transform: scale(0.97) !important;
}

.preselect-btn.is-primary:disabled {
  background: #e6e6ed !important;
  border-color: #e6e6ed !important;
  color: #9ca2b4 !important;
  transform: none !important;
}

.preselect-btn.is-secondary {
  background: #fff !important;
  border: 2px solid #e6e6ed !important;
  color: #041959 !important;
}

.preselect-btn.is-secondary:hover {
  border-color: #041959 !important;
  transform: scale(0.97) !important;
}

/* Quote/popup confirm buttons */
.quote-preview-btn.is-primary,
.dimension-popup-btn.confirm,
.quote-total-popup-btn.confirm {
  background: #fc6b03 !important;
  border-color: #fc6b03 !important;
  color: #fff !important;
  border-radius: 0.5rem !important;
}

.quote-preview-btn.is-primary:hover,
.dimension-popup-btn.confirm:hover,
.quote-total-popup-btn.confirm:hover {
  background: #c75402 !important;
  border-color: #c75402 !important;
}

.header-actions {
  justify-content: flex-end !important;
  padding-right: 56px !important;
}

/* "Offerte bekijken" button */
#offer-send {
  background: #fc6b03 !important;
  border: none !important;
  color: #fff !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Barlow', sans-serif !important;
  border-radius: 0.5rem !important;
  white-space: nowrap;
}

#offer-send:hover {
  background: #c75402 !important;
  transform: scale(0.97) !important;
}

/* ========== PRESELECT SCREEN ========== */

.preselect {
  background: #ffffff !important;
  backdrop-filter: none !important;
}

.preselect-card {
  border-radius: 1rem !important;
  border: none !important;
  box-shadow: 0 8px 40px rgba(4, 25, 89, 0.12) !important;
  width: 720px !important;
  max-width: 95vw !important;
  padding: 32px !important;
  min-height: 420px !important;
}

.preselect-header {
  text-align: center !important;
  padding: 0 0 24px !important;
}

/* Logo in preselect */
.preselect-header::before {
  content: '';
  display: block;
  width: 180px;
  height: 45px;
  background: url('./assets/logo-mijnbouwproject.svg') no-repeat center/contain;
  margin: 0 auto 20px !important;
}

.preselect-title {
  color: #041959 !important;
  font-size: 1.375rem !important;
  font-family: 'Barlow', sans-serif !important;
}

.preselect-sub {
  color: #7b7e87 !important;
  font-family: 'Barlow', sans-serif !important;
  font-size: 14px !important;
}

.preselect-h2 {
  font-family: 'Barlow', sans-serif !important;
  color: #041959 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

.preselect-option {
  border-radius: 0.75rem !important;
  border: 2px solid #e6e6ed !important;
  transition: all .2s ease !important;
  padding: 16px !important;
}

.preselect-option:hover {
  border-color: #fc6b03 !important;
  background: #fff9f5 !important;
}

.preselect-option:has(input:checked) {
  border-color: #fc6b03 !important;
  background: #fff3e6 !important;
  box-shadow: 0 0 0 3px rgba(252, 107, 3, 0.15) !important;
}

.preselect-option-title {
  font-family: 'Barlow', sans-serif !important;
  font-weight: 600 !important;
  color: #041959 !important;
}

.preselect-option:has(input:checked) .preselect-option-title {
  color: #fc6b03 !important;
}

.preselect-option-meta {
  font-family: 'Barlow', sans-serif !important;
  color: #7b7e87 !important;
}

.preselect-visual {
  background: #f5f5f7 !important;
  border: 1px solid #e6e6ed !important;
  border-radius: 0.5rem !important;
}

.preselect-option:has(input:checked) .preselect-visual {
  background: #fff3e6 !important;
  border-color: #fc6b03 !important;
}

.preselect-svg {
  stroke: #041959 !important;
}

.preselect-option:has(input:checked) .preselect-svg {
  stroke: #fc6b03 !important;
}

.preselect-actions {
  padding-top: 20px !important;
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
}

/* Single screen: no fixed height needed */
.preselect-step {
  display: block !important;
}

/* Both grids: same layout, fill available space */
.preselect-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  flex: 1 !important;
  align-content: start !important;
}

/* All cards: exact same fixed height, text-only layout */
.preselect-option {
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  grid-template-columns: 1fr !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.preselect-visual {
  display: none !important;
}

.preselect-label {
  text-align: center !important;
}

/* Step 2: same height, centered text */
.preselect-step[data-step="2"] .preselect-option {
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  grid-template-columns: 1fr !important;
  padding: 20px !important;
}

.preselect-step[data-step="2"] .preselect-option-title {
  font-size: 16px !important;
}

.preselect-step[data-step="2"] .preselect-option-meta {
  font-size: 13px !important;
}

/* Both steps: same button row position */
.preselect-actions {
  padding-top: 24px !important;
  display: flex !important;
  gap: 12px !important;
  justify-content: center !important;
}

/* All preselect buttons: exact same size */
.preselect-btn {
  font-family: 'Barlow', sans-serif !important;
  border-radius: 0.5rem !important;
  padding: 12px 32px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  min-width: 160px !important;
  height: 48px !important;
  transition: all .2s cubic-bezier(.215,.61,.355,1) !important;
}

/* ========== TABS (Buitenzijde / Binnenzijde) ========== */

.cfg-tabs {
  background: #f5f5f7 !important;
  border-radius: 0.5rem !important;
  padding: 3px !important;
  gap: 0 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(4, 25, 89, 0.12) !important;
  overflow: hidden !important;
}

.cfg-tab {
  border: none !important;
  padding: 5px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  font-family: 'Barlow', sans-serif !important;
  background: transparent !important;
  color: #454a5c !important;
  transition: all 0.2s ease !important;
  border-radius: 0.375rem !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

.cfg-tab.is-active {
  color: #fff !important;
  background: #fc6b03 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(252, 107, 3, 0.3) !important;
}

.cfg-tab:hover:not(.is-active) {
  color: #041959 !important;
  background: #fff !important;
}

.cfg-section-tabs {
  background: #f5f5f7 !important;
  border-radius: 0.5rem !important;
  padding: 3px !important;
  gap: 0 !important;
  border: none !important;
  flex-direction: row !important;
  box-shadow: 0 2px 8px rgba(4, 25, 89, 0.12) !important;
  overflow: hidden !important;
}

.cfg-section-tabs[style*="flex"] {
  display: flex !important;
}

.cfg-section-tab {
  border: none !important;
  padding: 5px 16px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  font-family: 'Barlow', sans-serif !important;
  background: transparent !important;
  color: #454a5c !important;
  transition: all 0.2s ease !important;
  border-radius: 0.375rem !important;
  text-align: center !important;
  line-height: 1.4 !important;
  flex: 1 !important;
  justify-content: center !important;
}

.cfg-section-tab.is-active {
  background: #fc6b03 !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(252, 107, 3, 0.3) !important;
}

.cfg-section-tab:hover:not(.is-active) {
  background: #fff !important;
  color: #041959 !important;
}

.cfg-section-title {
  color: #041959 !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  font-family: 'Barlow', sans-serif !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== CONFIGURATOR LIST / GROUPS ========== */

.cfg-group-header {
  border-radius: 0.5rem !important;
  transition: all .15s ease !important;
}

.cfg-group-header:hover {
  background: #f5f5f7 !important;
}

/* Green check for selected items */
.cfg-check {
  color: #01b900 !important;
  font-weight: 700;
}

/* Active/selected swatch — ORANGE focus ring */
.cfg-swatch.is-active,
.cfg-icon-btn.is-active,
.cfg-select-option.is-active {
  border-color: #fc6b03 !important;
  box-shadow: 0 0 0 3px rgba(252, 107, 3, 0.25) !important;
}

/* Category labels */
.cfg-cat-label {
  color: #041959 !important;
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
}

/* ========== DIMENSION INPUTS ========== */

.tb-size-grid {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.tb-size-box {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 12px !important;
  border-radius: 0.5rem !important;
  background: #f5f5f7 !important;
}

.tb-input {
  border-radius: 0.375rem !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  font-family: 'Barlow', sans-serif !important;
  transition: all .2s ease !important;
  width: 80px !important;
  text-align: center !important;
  padding: 6px 8px !important;
}

.tb-input:focus {
  border-color: #fc6b03 !important;
  box-shadow: 0 0 0 3px rgba(252, 107, 3, 0.15) !important;
  outline: none !important;
}

.tb-label {
  color: #041959 !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin-bottom: 0 !important;
}

.tb-size-title {
  color: #041959 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Barlow', sans-serif !important;
  margin-bottom: 4px !important;
}

.tb-metrics-row {
  margin-top: 6px !important;
}

.tb-metric-value {
  color: #041959 !important;
  font-weight: 700 !important;
  font-family: 'Barlow', sans-serif !important;
}

/* ========== VIEWER HEADER ========== */

.cfg-viewer-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e6e6ed !important;
  height: 70px !important;
  padding: 0 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  position: relative !important;
}

/* ========== TOPBAR PRICE PREVIEW ========== */

.topbar-price-preview {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  position: absolute !important;
  left: 45% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}
@media (max-width: 768px) {
  .topbar-price-preview {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    justify-content: center !important;
  }
}

.topbar-price-label {
  font-size: 12px;
  font-weight: 500;
  color: #9ca2b4;
  font-family: 'Barlow', sans-serif;
  white-space: nowrap;
}

.topbar-price-value {
  font-size: 22px;
  font-weight: 700;
  color: #01b900;
  font-family: 'Barlow', sans-serif;
  line-height: 1;
  white-space: nowrap;
}

/* Hide removed elements */
.toggle-buttons-container,
.furniture-toggle,
.foundation-toggle,
.ar-fab,
.perf-indicator,
.info {
  display: none !important;
}

/* Hide sidebar footer */
.sidebar-footer {
  display: none !important;
}

/* ========== PRICE DISPLAY ========== */

#cfg-price,
.cfg-price,
.offer-price,
#offer-price {
  color: #01b900 !important;
  font-weight: 700 !important;
}

/* ========== SIDEBAR FOOTER ========== */

.sidebar-footer {
  background: #041959 !important;
  border-top: 2px solid #fc6b03 !important;
}

.user-name {
  color: #ffffff !important;
}

.user-role {
  color: rgba(255, 255, 255, 0.6) !important;
}

.user-avatar {
  background: #fc6b03 !important;
  color: #fff !important;
  border-radius: 0.5rem !important;
  font-weight: 600 !important;
}

/* ========== TOGGLE BUTTONS (3D viewer) ========== */

.furniture-toggle,
.foundation-toggle {
  border-radius: 0.5rem !important;
  font-weight: 500 !important;
  transition: all .2s ease !important;
}

.furniture-toggle.is-active {
  background: #fff3e6 !important;
  color: #fc6b03 !important;
  border-color: #fc6b03 !important;
}

.foundation-toggle.is-active {
  background: #fff3e6 !important;
  color: #c75402 !important;
  border-color: #fc6b03 !important;
}

/* ========== VIEW TOGGLE (Voorzijde/Achterzijde) ========== */

.view-toggle-container {
  background: #f5f5f7 !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 2px 8px rgba(4, 25, 89, 0.12) !important;
  overflow: hidden !important;
  border: none !important;
  padding: 3px !important;
}

.view-toggle-btn {
  border-radius: 0.375rem !important;
  font-weight: 500 !important;
  font-family: 'Barlow', sans-serif !important;
  font-size: 13px !important;
  padding: 5px 16px !important;
  border: none !important;
  background: transparent !important;
  color: #454a5c !important;
  transition: all .2s ease !important;
  line-height: 1.4 !important;
}

.view-toggle-btn.is-active {
  background: #fc6b03 !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(252, 107, 3, 0.3) !important;
}

.view-toggle-btn:hover:not(.is-active) {
  background: #fff !important;
  color: #041959 !important;
}

/* ========== SCROLLBAR ========== */

.cfg-list::-webkit-scrollbar-thumb {
  background: #fc6b03 !important;
  border-radius: 4px;
}

.cfg-list::-webkit-scrollbar-thumb:hover {
  background: #c75402 !important;
}

/* ========== LOADING SPINNER ========== */

.spinner {
  border-color: rgba(4, 25, 89, 0.12) !important;
  border-top-color: #fc6b03 !important;
}

/* ========== POWERED BY ========== */

.powered-by-axiops,
.powered-by-axiops a {
  color: #222 !important;
}

/* ========== QUOTE PREVIEW ========== */

.quote-total-display {
  color: #01b900 !important;
}

.quote-total-clickable {
  border-color: #01b900 !important;
  border-radius: 0.5rem !important;
}

.quote-category-subtotal {
  color: #fc6b03 !important;
  font-weight: 600 !important;
}

/* ========== INFO BOX ========== */

.info {
  background: rgba(4, 25, 89, 0.88) !important;
  border-radius: 0.5rem !important;
  backdrop-filter: blur(12px) !important;
}

/* ========== AR BUTTON ========== */

.ar-fab {
  background: #fc6b03 !important;
  color: #fff !important;
  border-radius: 0.5rem !important;
  font-weight: 500 !important;
}

.ar-fab:hover {
  background: #c75402 !important;
  transform: scale(0.97) !important;
}

/* ========== QUOTE PREVIEW ========== */

.quote-preview-modal,
.quote-preview-modal *,
.quote-preview-paper,
.quote-preview-content,
.quote-preview-content * {
  font-family: 'Barlow', sans-serif !important;
}

/* ========== QUOTE PREVIEW — hide edit controls for lead users ========== */

.quote-bullet-actions,
.quote-bullet-edit-btn,
.quote-bullet-del-btn,
.quote-bullet-undo-btn,
.quote-bullet-add-row,
.quote-note-btn,
.quote-delete-btn,
.quote-th-actions,
.quote-total-edit-icon,
.quote-discount-sticker,
.quote-original-price {
  display: none !important;
}

/* Make price cells read-only (no click cursor) */
.quote-total-clickable {
  cursor: default !important;
  pointer-events: none !important;
}

/* ========== FOCUS STATES — ALL orange ========== */

*:focus-visible {
  outline: 2px solid #fc6b03 !important;
  outline-offset: 2px !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #fc6b03 !important;
  box-shadow: 0 0 0 3px rgba(252, 107, 3, 0.15) !important;
  outline: none !important;
}

/* ========== LINKS ========== */

a {
  color: #fc6b03;
  transition: color .2s ease;
}

a:hover {
  color: #c75402;
}

/* ========== COUNTER CONTROLS (spotjes etc.) ========== */

.cfg-counter-btn {
  border-radius: 0.375rem !important;
  font-weight: 600 !important;
  transition: all .15s ease !important;
}

.cfg-counter-btn:hover {
  background: #fc6b03 !important;
  color: #fff !important;
  border-color: #fc6b03 !important;
}

/* ========== SELECT DROPDOWNS ========== */

.cfg-select {
  border-radius: 0.5rem !important;
}

.cfg-select:focus {
  border-color: #fc6b03 !important;
  box-shadow: 0 0 0 3px rgba(252, 107, 3, 0.15) !important;
}
