/* ═══════════════════════════════════════════════════════════════════════════
   WOOTD Modal Configurator Styles
   All rules scoped under #wootd-* to prevent conflicts with theme
═══════════════════════════════════════════════════════════════════════════ */

/* ── Google Font ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── CSS Variables ───────────────────────────────────────────────────────── */
:root {
  --wootd-primary: #1e3a5f;
  --wootd-primary-lt: #2c5282;
  --wootd-accent: #3b82f6;
  --wootd-accent-lt: #dbeafe;
  --wootd-success: #16a34a;
  --wootd-error: #dc2626;
  --wootd-warning: #d97706;
  --wootd-bg: #ffffff;
  --wootd-surface: #f8fafc;
  --wootd-border: #e2e8f0;
  --wootd-text: #1a202c;
  --wootd-text-muted: #64748b;
  --wootd-radius: 10px;
  --wootd-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  --wootd-transition: 0.25s ease;
}

/* ── Hide default WooCommerce qty + add-to-cart when personalizer is active ── */
body.wootd-has-personalizer form.cart,
body.wootd-has-personalizer .cart-quantity,
body.wootd-has-personalizer .woocommerce-Price-amount+.single_add_to_cart_button {
  display: none !important;
}

/* ── Personalize Button on Product Page — HIDDEN (configurator is inline) ── */
.wootd-personalize-wrapper {
  display: none !important;
}

/* ── Modal Overlay ────────────────────────────────────────────────────────── */
#wootd-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.72);
  z-index: 999998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#wootd-modal-overlay.wootd-open {
  display: flex;
  opacity: 1;
}

/* ── Modal Container ─────────────────────────────────────────────────────── */
#wootd-modal-container {
  background: var(--wootd-bg);
  border-radius: var(--wootd-radius);
  box-shadow: var(--wootd-shadow);
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  transform: scale(0.94) translateY(10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#wootd-modal-overlay.wootd-open #wootd-modal-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ── Modal Header ─────────────────────────────────────────────────────────── */
#wootd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 18px;
  background: linear-gradient(135deg, var(--wootd-primary) 0%, var(--wootd-primary-lt) 100%);
  color: #fff;
  flex-shrink: 0;
}

.wootd-header-content h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  border: none;
  padding: 0;
}

.wootd-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

#wootd-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--wootd-transition);
  flex-shrink: 0;
}

#wootd-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ── Product Context Bar ──────────────────────────────────────────────────── */
#wootd-context-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 28px;
  background: var(--wootd-surface);
  border-bottom: 1px solid var(--wootd-border);
  flex-shrink: 0;
}

.wootd-context-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--wootd-border);
  border-radius: 8px;
  min-width: 0;
  flex: 1;
}

.wootd-context-tile img {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.wootd-context-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wootd-context-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--wootd-text-muted);
  margin-bottom: 2px;
}

.wootd-context-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--wootd-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wootd-context-sep {
  color: var(--wootd-text-muted);
  font-size: 20px;
  padding: 0 8px;
  flex-shrink: 0;
}

/* ── Modal Body (Scrollable) ──────────────────────────────────────────────── */
#wootd-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--wootd-border) transparent;
}

#wootd-modal-body::-webkit-scrollbar {
  width: 6px;
}

#wootd-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

#wootd-modal-body::-webkit-scrollbar-thumb {
  background: var(--wootd-border);
  border-radius: 4px;
}

/* ── Form Sections ───────────────────────────────────────────────────────── */
.wootd-section {
  background: var(--wootd-bg);
  border: 1px solid var(--wootd-border);
  border-radius: var(--wootd-radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  transition: box-shadow var(--wootd-transition);
}

.wootd-section:hover {
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.07);
}

.wootd-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--wootd-border);
}

.wootd-section-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.wootd-section-header h3 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 700;
  color: var(--wootd-primary);
  border: none;
  padding: 0;
}

.wootd-section-header p {
  margin: 0;
  font-size: 13px;
  color: var(--wootd-text-muted);
}

.wootd-optional {
  font-weight: 400;
  color: var(--wootd-text-muted);
  font-size: 13px;
}

/* ── Form Elements ───────────────────────────────────────────────────────── */
.wootd-form-row {
  margin-bottom: 14px;
}

.wootd-form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wootd-form-col {
  display: flex;
  flex-direction: column;
}

.wootd-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wootd-text);
  margin-bottom: 6px;
}

.wootd-required {
  color: var(--wootd-error);
  margin-left: 2px;
}

.wootd-select,
.wootd-input,
.wootd-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--wootd-border);
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--wootd-text);
  background: #fff;
  transition: border-color var(--wootd-transition), box-shadow var(--wootd-transition);
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.wootd-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.wootd-select:focus,
.wootd-input:focus,
.wootd-textarea:focus {
  outline: none;
  border-color: var(--wootd-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.wootd-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Stall Cards ─────────────────────────────────────────────────────────── */
#wootd-stall-cards {
  margin-top: 4px;
}

.wootd-stall-card {
  background: var(--wootd-surface);
  border: 1.5px solid var(--wootd-border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-top: 12px;
  transition: border-color var(--wootd-transition), box-shadow var(--wootd-transition);
  animation: wootd-slide-in 0.2s ease forwards;
}

@keyframes wootd-slide-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wootd-stall-card:hover {
  border-color: var(--wootd-accent);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.12);
}

.wootd-stall-card-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--wootd-primary);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wootd-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wootd-stall-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--wootd-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.wootd-stall-card .wootd-form-row--split {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

/* ADA badge on 60" option */
.wootd-ada-badge {
  display: inline-block;
  background: var(--wootd-accent-lt);
  color: var(--wootd-accent);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Color Chart ─────────────────────────────────────────────────────────── */
.wootd-color-chart {
  margin-top: 20px;
  background: var(--wootd-surface);
  border: 1px solid var(--wootd-border);
  border-radius: 12px;
  padding: 24px 0 0;
  /* No horizontal padding to allow full width image */
  overflow: hidden;
}

.wootd-color-chart-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--wootd-text-muted);
  margin: 0 24px 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
}

#wootd-color-chart-img {
  width: 100%;
  max-height: 600px;
  /* Increased to avoid squashing tall charts */
  object-fit: cover;
  /* Fill the width completely */
  display: block;
}

.wootd-color-note {
  margin: 16px 24px;
  font-size: 11px;
  color: var(--wootd-warning);
  font-style: italic;
  line-height: 1.4;
}

/* ── Price Summary Bar ───────────────────────────────────────────────────── */
#wootd-price-summary {
  flex-shrink: 0;
  background: #ffffff;
  color: #000000;
  padding: 18px 28px;
}

.wootd-price-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 6px 24px;
  margin-bottom: 16px;
  font-size: 13px;
}

.wootd-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.8);
}

.wootd-price-row.hidden {
  display: none;
}

.wootd-price-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  margin-top: 8px;
  grid-column: 1 / -1;
}

.wootd-price-total-row .wootd-price-label {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.wootd-total-amount {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

/* ── Modal Footer Actions ─────────────────────────────────────────────────── */
.wootd-modal-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.wootd-btn-secondary {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.85);
  padding: 11px 22px;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--wootd-transition);
}

.wootd-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.wootd-btn-primary {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--wootd-transition);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wootd-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.5);
  background: linear-gradient(135deg, #15803d, #166534);
}

.wootd-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner animation */
.wootd-spinner svg {
  animation: wootd-spin 0.9s linear infinite;
}

@keyframes wootd-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ── Error / Success Toast ───────────────────────────────────────────────── */
#wootd-toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999999;
  min-width: 280px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: none;
  align-items: center;
  gap: 10px;
  animation: wootd-toast-in 0.3s ease;
}

#wootd-toast.wootd-toast-error {
  background: #dc2626;
  display: flex;
}

#wootd-toast.wootd-toast-success {
  background: #16a34a;
  display: flex;
}

@keyframes wootd-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Field Validation & State Highlights ─────────────────────────────────── */
.wootd-select.wootd-invalid,
.wootd-input.wootd-invalid {
  border-color: var(--wootd-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.wootd-select.wootd-valid,
.wootd-input.wootd-valid {
  border-color: var(--wootd-success);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.wootd-field-error {
  color: var(--wootd-error);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* ── Sticky Footer (Conversion Booster) ─────────────────────────────────── */
#wootd-sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--wootd-border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
  z-index: 99999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

#wootd-sticky-footer.wootd-show {
  transform: translateY(0);
}

.wootd-sticky-info {
  display: flex;
  flex-direction: column;
}

.wootd-sticky-label {
  font-size: 11px;
  color: var(--wootd-text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.wootd-sticky-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--wootd-primary);
}

.wootd-sticky-btn {
  background: var(--wootd-success);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  #wootd-sticky-footer {
    padding: 10px 16px;
  }
  .wootd-sticky-price {
    font-size: 18px;
  }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  #wootd-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  #wootd-modal-container {
    max-height: 96vh;
    border-radius: 14px 14px 0 0;
    max-width: 100%;
  }

  #wootd-modal-header {
    padding: 18px 20px 16px;
  }

  .wootd-header-content h2 {
    font-size: 19px;
  }

  #wootd-context-bar {
    flex-direction: row;
    padding: 10px 14px;
    gap: 4px;
    overflow-x: auto;
  }

  .wootd-context-tile {
    padding: 6px 10px;
  }

  .wootd-context-tile img {
    width: 38px;
    height: 30px;
  }

  .wootd-context-sep {
    padding: 0 4px;
    font-size: 16px;
  }

  #wootd-modal-body {
    padding: 16px 16px;
  }

  .wootd-form-row--split {
    grid-template-columns: 1fr;
  }

  .wootd-stall-card .wootd-form-row--split {
    grid-template-columns: 1fr;
  }

  #wootd-price-summary {
    padding: 14px 16px;
  }

  .wootd-price-breakdown {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .wootd-modal-actions {
    flex-direction: column;
  }

  .wootd-btn-secondary,
  .wootd-btn-primary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #wootd-context-bar .wootd-context-sep {
    display: none;
  }

  #wootd-context-bar .wootd-context-tile+.wootd-context-tile {
    margin-left: 6px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WOOTD INLINE CONFIGURATOR — Full page-section styles
   Scoped under #wootd-inline-configurator  to prevent theme conflicts
═══════════════════════════════════════════════════════════════════════════ */

/* ── Section wrapper ─────────────────────────────────────────────────────── */

/* Outer container rendered by WooCommerce after_single_product hook — full page width.
   We constrain it here so it sits within the standard content column. */
.wootd-inline-wrap {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

#wootd-inline-configurator {
  font-family: 'Inter', sans-serif;
  margin: 32px 0 64px;
  scroll-margin-top: 80px;
  border-radius: 16px;
  /* overflow: visible — do NOT use hidden here; it breaks WooCommerce's column layout */
  overflow: visible;
  box-shadow: 0 4px 24px rgba(30, 58, 95, 0.10), 0 1px 4px rgba(30, 58, 95, 0.06);
  border: 1px solid var(--wootd-border);
  transition: box-shadow 0.4s ease;
  background: #fff;
}

/* Highlight pulse when scrolled to via button */
#wootd-inline-configurator.wootd-highlight-pulse {
  box-shadow: 0 0 0 3px var(--wootd-accent), 0 0 0 10px rgba(59, 130, 246, 0.2);
  animation: wootd-pulse-fade 1.4s ease forwards;
}

@keyframes wootd-pulse-fade {
  0% {
    box-shadow: 0 0 0 3px var(--wootd-accent), 0 0 0 14px rgba(59, 130, 246, 0.22);
  }

  100% {
    box-shadow: 0 4px 24px rgba(30, 58, 95, 0.10);
  }
}

/* ── Inline Section Header ───────────────────────────────────────────────── */
.wootd-inline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 36px;
  background: linear-gradient(135deg, #0f2944 0%, #1e3a5f 55%, #2c5282 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

/* Decorative background rings */
.wootd-inline-header::before,
.wootd-inline-header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.07;
  pointer-events: none;
}

.wootd-inline-header::before {
  width: 260px;
  height: 260px;
  background: #fff;
  top: -90px;
  right: 60px;
}

.wootd-inline-header::after {
  width: 160px;
  height: 160px;
  background: #fff;
  top: 30px;
  right: 220px;
}

.wootd-inline-header-content {
  position: relative;
  z-index: 1;
}

.wootd-inline-title {
  margin: 0 0 6px !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #fff !important;
  border: none !important;
  padding: 0 !important;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.wootd-inline-subtitle {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.wootd-inline-badge {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background: rgba(59, 130, 246, 0.22);
  border: 1.5px solid rgba(147, 197, 253, 0.5);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 24px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

/* ── Custom Radio Button Groups ───────────────────────────────────────────── */
.wootd-radio-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.wootd-radio-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1.5px solid var(--wootd-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--wootd-transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.wootd-radio-option:hover {
  border-color: var(--wootd-accent);
  background: #f0f7ff;
}

.wootd-radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.wootd-radio-option:has(input:checked) {
  border-color: var(--wootd-accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wootd-radio-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--wootd-text);
}

.wootd-radio-option:has(input:checked) .wootd-radio-text {
  color: #1e3a5f;
  font-weight: 600;
}

/* ── Context Bar (inline version) ────────────────────────────────────────── */
.wootd-inline-context-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 36px;
  background: #f0f5ff;
  border-bottom: 1px solid #dce8fc;
}

.wootd-inline-context-bar .wootd-context-tile {
  background: #fff;
  border: 1px solid #d1e2fa;
  box-shadow: 0 1px 4px rgba(30, 58, 95, 0.06);
  padding: 10px 18px;
}

.wootd-inline-context-bar .wootd-context-tile img {
  width: 72px;
  height: 52px;
  border-radius: 6px;
}

.wootd-inline-context-bar .wootd-context-value {
  font-size: 14px;
}

.wootd-inline-context-bar .wootd-context-sep {
  color: #94a3b8;
}

/* ── Two-Column Body ─────────────────────────────────────────────────────── */
.wootd-inline-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  align-items: start;
  background: #f8fafc;
}

/* Left column: form sections */
.wootd-inline-form-col {
  min-width: 0;
  padding: 28px 28px 32px;
}

/* Right column: sticky price panel */
.wootd-inline-price-col {
  position: sticky;
  top: 80px;
  padding: 28px;
  /* background and min-height removed — they caused a huge blank navy block */
  align-self: start;
}

/* Improve section cards in left column */
.wootd-inline-form-col .wootd-section {
  background: #fff;
  border: 1px solid #e4ecf8;
  border-left: 4px solid var(--wootd-accent);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(30, 58, 95, 0.06);
  margin-bottom: 16px;
}

.wootd-inline-form-col .wootd-section:hover {
  border-left-color: #2c5282;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.10);
}

.wootd-inline-form-col .wootd-section-header {
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #edf2fb;
}

.wootd-inline-form-col .wootd-section-header h3 {
  font-size: 15px;
  color: #1e3a5f;
  font-weight: 700;
}

/* ── Price Panel ─────────────────────────────────────────────────────────── */
.wootd-inline-price-panel {
  background: #1e3a5f;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.30);
  padding: 24px 22px;
}

.wootd-inline-price-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 14px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: none;
}

.wootd-inline-price-icon {
  font-size: 18px;
}

/* ── Price Summary (inside panel) ─────────────────────────────────────────── */
.wootd-inline-price-summary {
  padding: 0;
  margin-top: 18px;
}

/* Override modal flex-direction for inline panel */
.wootd-inline-price-summary .wootd-price-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}

.wootd-inline-price-summary .wootd-price-row {
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wootd-inline-price-summary .wootd-price-row:last-child {
  border-bottom: none;
}

.wootd-inline-price-summary .wootd-price-total-row {
  grid-column: unset;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  margin-top: 12px;
  padding-top: 12px;
}

/* ── Total Block ─────────────────────────────────────────────────────────── */
.wootd-inline-total-block {
  text-align: center;
  padding: 22px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 18px;
}

.wootd-price-total-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.wootd-inline-total-amount {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
}

.wootd-inline-total-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 6px;
  line-height: 1.4;
}

/* ── CTA Button ──────────────────────────────────────────────────────────── */
.wootd-inline-actions {
  margin-top: 24px;
}

.wootd-inline-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 15px 20px !important;
  font-size: 15px !important;
  border-radius: 10px !important;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45) !important;
}

.wootd-inline-submit-btn:hover:not(:disabled) {
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.55) !important;
}

/* Quote PDF Secondary Button (inline context, light background) */
.wootd-quote-pdf-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 11px 18px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px !important;
  color: rgba(255, 255, 255, 0.8);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--wootd-transition);
}

.wootd-quote-pdf-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.wootd-quote-pdf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Trust Badges ─────────────────────────────────────────────────────────── */
.wootd-inline-trust-badges {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wootd-trust-badge {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

/* ── Responsive overrides for inline section ─────────────────────────────── */
@media (max-width: 1024px) {
  .wootd-inline-body {
    grid-template-columns: 1fr 300px;
  }
}

@media (max-width: 880px) {
  .wootd-inline-body {
    grid-template-columns: 1fr;
  }

  .wootd-inline-price-col {
    position: static;
    order: -1;
  }

  .wootd-inline-price-panel {
    border-radius: 0;
  }

  .wootd-inline-price-summary .wootd-price-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
  }

  .wootd-inline-total-amount {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  #wootd-inline-configurator {
    border-radius: 12px;
  }

  .wootd-inline-header {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .wootd-inline-header::before,
  .wootd-inline-header::after {
    display: none;
  }

  .wootd-inline-title {
    font-size: 21px !important;
  }

  .wootd-inline-context-bar {
    padding: 12px 20px;
    overflow-x: auto;
  }

  .wootd-inline-form-col {
    padding: 20px 16px 24px;
  }

  .wootd-inline-price-panel {
    padding: 22px 20px;
  }

  .wootd-inline-price-summary .wootd-price-breakdown {
    grid-template-columns: 1fr;
  }

  .wootd-inline-total-amount {
    font-size: 36px;
  }
}

/* ── Unit Visual Configuration Styles ───────────────────────────────────── */
.wootd-visual-viewport-container {
  background: var(--wootd-surface);
  border: 1.5px dashed var(--wootd-border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 18px;
  margin-bottom: 24px;
}

.wootd-visual-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--wootd-text-muted);
  margin-bottom: 16px;
  display: block;
}

.wootd-highlight-count {
  color: var(--wootd-accent);
  margin-left: 4px;
  font-size: 14px;
}

.wootd-units-viewport {
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--wootd-border) transparent;
}

.wootd-units-viewport::-webkit-scrollbar {
  height: 5px;
}

.wootd-units-viewport::-webkit-scrollbar-track {
  background: transparent;
}

.wootd-units-viewport::-webkit-scrollbar-thumb {
  background: var(--wootd-border);
  border-radius: 10px;
}

.wootd-units-display {
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  min-width: min-content;
}

.wootd-unit-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 65px;
  animation: wootd-fade-up 0.4s ease-out;
}

@keyframes wootd-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wootd-unit-number {
  font-size: 10px;
  font-weight: 700;
  color: var(--wootd-text-muted);
  margin-bottom: 8px;
}

.wootd-stall-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Base stall color slightly darker than surface for contrast */
.wootd-stall-svg .st0 {
  fill: #f0f4f9;
  stroke: #cbd5e1;
  stroke-width: 0.5px;
}

/* Blue highlight for interactive parts */
.wootd-stall-svg .st1 {
  fill: var(--wootd-accent);
}

/* ── Visual Door Selection Grid ─────────────────────────────────────────── */
.wootd-door-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .wootd-door-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wootd-door-radio-option {
  padding: 16px 14px;
  align-items: flex-start; /* Keep radio button at the top */
}

.wootd-door-radio-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.wootd-door-radio-content img {
  width: 100%;
  max-width: 160px; /* Big size */
  height: auto;
  opacity: 0.9;
  transition: opacity 0.12s, transform 0.12s;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.04));
  border-radius: 4px;
}

.wootd-door-radio-option input[type="radio"]:checked ~ .wootd-door-radio-content img {
  opacity: 1;
  transform: scale(1.04);
}

.wootd-door-radio-content .wootd-radio-text {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--wootd-text);
}

.wootd-door-radio-option input[type="radio"]:checked ~ .wootd-door-radio-content .wootd-radio-text {
  color: var(--wootd-primary);
  font-weight: 700;
}

/* ── Urinal Screen Visual Layout ─────────────────────────────────────────── */
.wootd-urinal-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 24px;
}

.wootd-urinal-visual {
  width: 100%;
}

.wootd-urinal-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--wootd-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: block;
}

.wootd-urinal-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Shipping Image - preserve natural 3:1 ratio to avoid cropping important text/diagrams */
.wootd-shipping-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--wootd-border);
  background: #f8fafc;
  /* Subtle background for transparency or contain fitting */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: block;
}

@media (max-width: 640px) {
  .wootd-urinal-config-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WOOTD 2D FLOOR PLAN SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.wootd-floorplan-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin: 0 28px 24px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.07);
  animation: wootd-fade-up 0.5s ease-out;
}

/* Header bar */
.wootd-floorplan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f0f4fb 0%, #e8edf7 100%);
  border-bottom: 1px solid #d1d9e8;
  flex-wrap: wrap;
}

.wootd-floorplan-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wootd-floorplan-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--wootd-accent);
  border-radius: 8px;
  color: #fff;
  flex-shrink: 0;
}

.wootd-floorplan-header-left strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1e3a5f;
  line-height: 1.3;
}

.wootd-floorplan-subtitle {
  font-size: 12px;
  color: #64748b;
  display: block;
  margin-top: 1px;
}

/* Badges */
.wootd-floorplan-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wootd-fp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wootd-fp-badge--type {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

/* Canvas wrapper */
.wootd-floorplan-canvas-wrap {
  padding: 24px 20px 16px;
  background: #f8fafc;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.wootd-floorplan-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 350px; 
  object-fit: contain;
  border-radius: 6px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(148, 163, 184, 0.2);
}

/* Legend bar */
.wootd-floorplan-legend {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  border-top: 1px solid #e9ecf4;
  background: #f8fafc;
  flex-wrap: wrap;
}

.wootd-fp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.wootd-fp-legend-item::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.wootd-fp-legend--wall::before {
  background: #1e3a5f;
}

.wootd-fp-legend--panel::before {
  background: #4a7fa5;
}

.wootd-fp-legend--door::before {
  background: #3b82f6;
}

.wootd-fp-legend--ada::before {
  background: rgba(59, 130, 246, 0.2);
  border: 1.5px solid #3b82f6;
}

/* Responsive */
@media (max-width: 880px) {
  .wootd-floorplan-section {
    margin: 0 0 20px;
    border-radius: 0;
  }
}

@media (max-width: 640px) {
  .wootd-floorplan-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .wootd-floorplan-canvas-wrap {
    padding: 16px 12px 10px;
  }

  .wootd-floorplan-legend {
    gap: 12px;
    padding: 8px 12px;
  }
}