/* Shared guided-setup modal layout — cabinet, door, index, room-designer */

#doorStyleModal .modal-content,
#doorStyleModal .modal-dialog {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
  max-height: min(92dvh, calc(100dvh - 16px));
}

#doorStyleModal .tab-container {
  flex-shrink: 0;
}

#doorStyleModal .modal-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
}

#doorStyleModal .tab-content {
  flex: 1 1 auto;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
}

#doorStyleModal .tab-content.active {
  display: flex !important;
  flex-direction: column;
}

#doorStyleModal:has(.guided-step-content) .modal-tabs,
#doorStyleModal:has(.guided-step-content) > .modal-content > .tab-container {
  display: none !important;
}

#doorStyleModal:has(.guided-step-content) > .modal-content > h2 {
  display: none !important;
}

#doorStyleModal:has(.guided-step-content) .modal-header {
  padding: 6px 10px;
  gap: 6px;
  flex-shrink: 0;
}

#doorStyleModal:has(.guided-step-content) #doorStyleModalTitle {
  font-size: 13px !important;
}

#doorStyleModal:has(.guided-step-content) > .modal-content {
  position: relative;
}

#doorStyleModal .guided-modal-close {
  display: inline-flex !important;
  position: static !important;
  top: auto !important;
  right: auto !important;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 4px;
  min-width: 86px;
  height: 36px;
  margin-left: auto !important;
  padding: 0 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  border-radius: 999px !important;
  background: #0f5f9e !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  box-shadow: 0 8px 18px rgba(15, 95, 158, 0.24) !important;
  cursor: pointer !important;
  opacity: 1 !important;
  text-decoration: none !important;
  z-index: 2;
}

#doorStyleModal .guided-modal-close:hover {
  background: #084b82 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

body.theme-light #doorStyleModal .guided-modal-close,
body.theme-light #doorStyleModal .modal-header .guided-modal-close {
  background: #0f5f9e !important;
  color: #fff !important;
  border-color: #0f5f9e !important;
  box-shadow: 0 8px 18px rgba(15, 95, 158, 0.2) !important;
}

body.theme-dark #doorStyleModal .guided-modal-close,
body.theme-dark #doorStyleModal .modal-header .guided-modal-close {
  color: #fff !important;
}

#doorStyleModal .tab-content:not(.active) {
  display: none;
}

/* ===== Base guided-setup parity (room designer reference) — all pages ===== */
#doorStyleModal .guided-step-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

#doorStyleModal .guided-step-header {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 1rem;
}

#doorStyleModal .guided-step-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #38bdf8 !important;
}

#doorStyleModal .guided-step-subtitle {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #cbd5e1 !important;
}

#doorStyleModal .guided-step-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 8px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

#doorStyleModal .guided-navigation {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0 6px;
  border-top: 1px solid var(--theme-border-panel, #334155);
  background: var(--theme-bg-panel, #1e293b);
}

#doorStyleModal .guided-navigation .step-progress {
  font-size: 12px;
  white-space: nowrap;
  color: #cbd5e1;
}

#doorStyleModal .guided-nav-button {
  appearance: none;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  background: linear-gradient(135deg, #1a5a99, #2563eb);
  color: #fff !important;
}

#doorStyleModal .guided-nav-button.secondary {
  background: transparent !important;
  border: 1px solid #364b63 !important;
  color: #94a3b8 !important;
}

#doorStyleModal .guided-nav-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

#doorStyleModal .category-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px !important;
  margin: 12px 0 8px !important;
}

#doorStyleModal .category-option {
  background: #243142 !important;
  border: 2px solid #364b63 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  min-height: 120px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

#doorStyleModal .category-option h4 {
  margin: 0 0 6px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #38bdf8 !important;
}

#doorStyleModal .category-option p {
  margin: 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
  color: #cbd5e1 !important;
}

#doorStyleModal .door-style-options,
#doorStyleModal .drawer-options,
#doorStyleModal .case-material-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 12px !important;
  margin: 12px 0 8px !important;
}

#doorStyleModal .hardware-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)) !important;
  gap: 12px !important;
  margin: 12px 0 8px !important;
}

#doorStyleModal .door-style-tile,
#doorStyleModal .drawer-tile,
#doorStyleModal .case-material-tile,
#doorStyleModal #door-styles-tab .door-style-tile {
  --guided-image-width: 42%;
  position: relative !important;
  display: block !important;
  min-height: 180px !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  border-radius: 10px !important;
  border: 1px solid #364b63 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

#doorStyleModal .drawer-tile {
  --guided-image-width: 50%;
}

#doorStyleModal .door-tile-image,
#doorStyleModal .drawer-tile-image,
#doorStyleModal .case-material-tile-image,
#doorStyleModal #door-styles-tab .door-style-tile .door-tile-image {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: var(--guided-image-width) !important;
  min-width: 140px !important;
  min-height: 180px !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #111827 !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  z-index: 0;
}

#doorStyleModal .drawer-tile-image {
  background: #0f172a !important;
  padding: 10px !important;
  box-sizing: border-box;
}

#doorStyleModal .door-tile-image img,
#doorStyleModal .drawer-tile-image img,
#doorStyleModal .case-material-tile-image img,
#doorStyleModal #door-styles-tab .door-style-tile .door-tile-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

#doorStyleModal .drawer-tile-image img {
  object-fit: contain !important;
}

#doorStyleModal .door-tile-content,
#doorStyleModal .drawer-tile-content,
#doorStyleModal .case-material-tile-content,
#doorStyleModal #door-styles-tab .door-style-tile .door-tile-content {
  position: relative !important;
  z-index: 1 !important;
  margin-left: var(--guided-image-width) !important;
  width: calc(100% - var(--guided-image-width)) !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 12px 14px 40px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}

#doorStyleModal .door-tile-title,
#doorStyleModal .drawer-tile-title,
#doorStyleModal .case-material-tile-title {
  margin: 0 0 8px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #38bdf8 !important;
}

#doorStyleModal .door-tile-description,
#doorStyleModal .drawer-tile-description,
#doorStyleModal .case-material-tile-description {
  margin: 0 !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  color: #cbd5e1 !important;
  overflow-wrap: anywhere;
}

#doorStyleModal .door-tile-overlay,
#doorStyleModal .drawer-tile-overlay,
#doorStyleModal .case-material-tile-overlay,
#doorStyleModal .hardware-tile-overlay {
  position: absolute !important;
  right: 10px !important;
  bottom: 10px !important;
  z-index: 2 !important;
}

#doorStyleModal .hardware-tile {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  min-height: 160px !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  border-radius: 10px !important;
  border: 2px solid #364b63 !important;
  cursor: pointer;
}

#doorStyleModal .hardware-tile-image {
  position: relative !important;
  width: 160px !important;
  min-width: 160px !important;
  height: auto !important;
  min-height: 160px !important;
  background: #1e2936 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}

#doorStyleModal .hardware-tile-content {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding: 0.75rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

#doorStyleModal .hardware-tile-title {
  margin: 0 0 0.25rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #38bdf8 !important;
}

#doorStyleModal .hardware-price {
  margin: 0.25rem 0 0.15rem !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
}

#doorStyleModal .tile-details-btn {
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: #0ea5e9 !important;
  color: #fff !important;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

#doorStyleModal .yn-options {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px !important;
  margin: 12px 0 8px !important;
}

#doorStyleModal .yn-options .yn-tile {
  min-height: 110px !important;
  padding: 12px !important;
  border-radius: 10px !important;
  border: 2px solid #364b63 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

#doorStyleModal .yn-options .yn-title {
  margin: 0 0 6px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
}

#doorStyleModal .yn-options .yn-desc {
  margin: 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.45 !important;
  color: #94a3b8 !important;
}

#doorStyleModal .door-style-tile.selected,
#doorStyleModal .drawer-tile.selected,
#doorStyleModal .case-material-tile.selected,
#doorStyleModal .hardware-tile.selected,
#doorStyleModal .category-option.selected,
#doorStyleModal .yn-options .yn-tile.selected {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
  outline: none !important;
}

#doorStyleModal .door-style-tile:hover,
#doorStyleModal .drawer-tile:hover,
#doorStyleModal .case-material-tile:hover,
#doorStyleModal .hardware-tile:hover,
#doorStyleModal .category-option:hover,
#doorStyleModal .yn-options .yn-tile:hover {
  border-color: #1a5a99 !important;
  background: #2d3748 !important;
  transform: translateY(-2px);
}

body.theme-light #doorStyleModal .category-option:hover,
body.theme-light #doorStyleModal .door-style-tile:hover,
body.theme-light #doorStyleModal .drawer-tile:hover,
body.theme-light #doorStyleModal .case-material-tile:hover,
body.theme-light #doorStyleModal .hardware-tile:hover,
body.theme-light #doorStyleModal .yn-options .yn-tile:hover {
  background: #f8fafc !important;
  border-color: #0f5f9e !important;
}

body.theme-light #doorStyleModal .guided-step-content,
body.theme-light #doorStyleModal .guided-step-body,
body.theme-light #doorStyleModal .guided-navigation {
  background: #ffffff !important;
  color: var(--theme-fg-primary, #222) !important;
}

body.theme-light #doorStyleModal .guided-step-title {
  color: #0f5f9e !important;
}

body.theme-light #doorStyleModal .guided-step-subtitle,
body.theme-light #doorStyleModal .guided-navigation .step-progress {
  color: var(--theme-fg-muted, #666) !important;
}

body.theme-light #doorStyleModal .guided-nav-button.secondary {
  border-color: var(--theme-border-button, #d1d5db) !important;
  color: var(--theme-fg-muted, #666) !important;
}

/* Beat inline-extracted.css door-styles-tab legacy row + 200px image layout */
#doorStyleModal #door-styles-tab .door-style-options.cat-prefinished-slab .door-style-tile,
#doorStyleModal #door-styles-tab .door-style-options.cat-stain-grade .door-style-tile {
  display: block !important;
  flex-direction: unset !important;
  height: auto !important;
}

#doorStyleModal #door-styles-tab .door-style-options.cat-prefinished-slab .door-style-tile .door-tile-image,
#doorStyleModal #door-styles-tab .door-style-options.cat-stain-grade .door-style-tile .door-tile-image {
  position: absolute !important;
  width: var(--guided-image-width, 42%) !important;
  min-width: 140px !important;
  height: 100% !important;
  padding: 0 !important;
  background: #111827 !important;
}

#doorStyleModal #door-styles-tab .door-style-options.cat-prefinished-slab .door-style-tile .door-tile-image img,
#doorStyleModal #door-styles-tab .door-style-options.cat-stain-grade .door-style-tile .door-tile-image img {
  object-fit: cover !important;
}

#doorStyleModal #door-styles-tab .door-style-tile .door-tile-content {
  flex: unset !important;
  margin-left: var(--guided-image-width, 42%) !important;
  width: calc(100% - var(--guided-image-width, 42%)) !important;
  justify-content: flex-start !important;
}

/* Guided card palette — match room designer on every page */
#doorStyleModal .category-option,
#doorStyleModal .door-style-tile,
#doorStyleModal .drawer-tile,
#doorStyleModal .case-material-tile,
#doorStyleModal .hardware-tile,
#doorStyleModal .yn-options .yn-tile {
  background: #243142 !important;
  border-color: #364b63 !important;
}

#doorStyleModal .category-option h4,
#doorStyleModal .door-tile-title,
#doorStyleModal .drawer-tile-title,
#doorStyleModal .case-material-tile-title,
#doorStyleModal .hardware-tile-title,
#doorStyleModal .yn-options .yn-title {
  color: #38bdf8 !important;
}

#doorStyleModal .category-option p,
#doorStyleModal .door-tile-description,
#doorStyleModal .drawer-tile-description,
#doorStyleModal .case-material-tile-description,
#doorStyleModal .hardware-price,
#doorStyleModal .yn-options .yn-desc {
  color: #cbd5e1 !important;
}

#doorStyleModal .door-tile-image,
#doorStyleModal .drawer-tile-image,
#doorStyleModal .case-material-tile-image,
#doorStyleModal .hardware-tile-image {
  background: #111827 !important;
}

body.theme-light #doorStyleModal .category-option,
body.theme-light #doorStyleModal .door-style-tile,
body.theme-light #doorStyleModal .drawer-tile,
body.theme-light #doorStyleModal .case-material-tile,
body.theme-light #doorStyleModal .hardware-tile,
body.theme-light #doorStyleModal .yn-options .yn-tile {
  background: #ffffff !important;
  border-color: var(--theme-border-panel, #d8dee4) !important;
}

body.theme-light #doorStyleModal .category-option h4,
body.theme-light #doorStyleModal .door-tile-title,
body.theme-light #doorStyleModal .drawer-tile-title,
body.theme-light #doorStyleModal .case-material-tile-title,
body.theme-light #doorStyleModal .hardware-tile-title,
body.theme-light #doorStyleModal .yn-options .yn-title {
  color: #0f5f9e !important;
}

body.theme-light #doorStyleModal .category-option p,
body.theme-light #doorStyleModal .door-tile-description,
body.theme-light #doorStyleModal .drawer-tile-description,
body.theme-light #doorStyleModal .case-material-tile-description,
body.theme-light #doorStyleModal .hardware-price,
body.theme-light #doorStyleModal .yn-options .yn-desc {
  color: var(--theme-fg-primary, #222) !important;
}

body.theme-light #doorStyleModal .door-tile-image,
body.theme-light #doorStyleModal .drawer-tile-image,
body.theme-light #doorStyleModal .case-material-tile-image,
body.theme-light #doorStyleModal .hardware-tile-image {
  background: #f1f5f9 !important;
}

@media (max-width: 900px) and (orientation: portrait) {
  #doorStyleModal.modal {
    z-index: 100010 !important;
    padding: 0;
    align-items: stretch;
  }

  #doorStyleModal .modal-dialog,
  #doorStyleModal .modal-content {
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0 !important;
    padding-left: 0;
    padding-right: 0;
  }

  #doorStyleModal .modal-body {
    padding: 0 8px 6px;
  }

  #doorStyleModal .tab-content {
    padding: 8px 4px 4px !important;
  }

  #doorStyleModal .guided-modal-close {
    min-width: 68px !important;
    height: 30px !important;
    font-size: 12px !important;
    padding: 0 10px !important;
  }

  #doorStyleModal .guided-step-header {
    margin-bottom: 6px;
    text-align: left;
  }

  #doorStyleModal .guided-step-title {
    font-size: 1rem !important;
    margin: 0 0 2px !important;
  }

  #doorStyleModal .guided-step-subtitle {
    font-size: 0.78rem;
    margin: 0;
    line-height: 1.35;
  }

  #doorStyleModal .guided-navigation {
    padding-top: 8px !important;
    padding-bottom: 4px !important;
    gap: 6px;
  }

  #doorStyleModal .guided-nav-button {
    padding: 5px 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
  }

  #doorStyleModal .modal .door-style-options,
  #doorStyleModal .modal .drawer-options,
  #doorStyleModal .modal .case-material-options,
  #doorStyleModal .modal .hardware-options,
  #doorStyleModal .modal .category-options {
    grid-template-columns: 1fr !important;
    gap: 8px;
    margin: 8px 0;
  }

  #doorStyleModal .modal .door-style-tile,
  #doorStyleModal .modal #door-styles-tab .door-style-tile,
  #doorStyleModal .modal .drawer-tile,
  #doorStyleModal .modal .case-material-tile,
  #doorStyleModal .modal .hardware-tile,
  #doorStyleModal .modal .cabinet-tile {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  #doorStyleModal .modal .door-tile-image,
  #doorStyleModal .modal #door-styles-tab .door-style-tile .door-tile-image,
  #doorStyleModal .modal .drawer-tile-image,
  #doorStyleModal .modal .case-material-tile-image,
  #doorStyleModal .modal .cabinet-tile-image {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 108px !important;
    min-height: 108px !important;
    max-height: 108px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  #doorStyleModal .modal .door-tile-image img,
  #doorStyleModal .modal #door-styles-tab .door-style-tile .door-tile-image img,
  #doorStyleModal .modal .drawer-tile-image img,
  #doorStyleModal .modal .case-material-tile-image img,
  #doorStyleModal .modal .cabinet-tile-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  #doorStyleModal .modal .drawer-tile-image img {
    object-fit: contain !important;
  }

  #doorStyleModal .modal .door-tile-content,
  #doorStyleModal .modal #door-styles-tab .door-style-tile .door-tile-content,
  #doorStyleModal .modal .drawer-tile-content,
  #doorStyleModal .modal .case-material-tile-content,
  #doorStyleModal .modal .cabinet-tile-content,
  #doorStyleModal .modal .hardware-tile-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    padding: 8px 10px 30px !important;
    box-sizing: border-box !important;
  }

  #doorStyleModal .modal .door-tile-title,
  #doorStyleModal .modal .drawer-tile-title,
  #doorStyleModal .modal .case-material-tile-title,
  #doorStyleModal .modal .cabinet-tile-title {
    font-size: 0.92rem;
    margin-bottom: 4px;
  }

  #doorStyleModal .modal .door-tile-description,
  #doorStyleModal .modal .drawer-tile-description,
  #doorStyleModal .modal .case-material-tile-description,
  #doorStyleModal .modal .cabinet-tile-description {
    font-size: 0.8rem;
    line-height: 1.4;
    display: block;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
  }

  #doorStyleModal .modal .hardware-tile {
    flex-direction: column !important;
  }

  #doorStyleModal .modal .hardware-tile-image {
    width: 100% !important;
    height: 96px !important;
    min-height: 96px !important;
    max-height: 96px !important;
  }

  #doorStyleModal .modal #door-styles-tab .door-style-options.cat-prefinished-slab .door-style-tile,
  #doorStyleModal .modal #door-styles-tab .door-style-options.cat-stain-grade .door-style-tile {
    height: auto !important;
  }

  #doorStyleModal .modal #door-styles-tab .door-style-options.cat-prefinished-slab .door-style-tile .door-tile-image,
  #doorStyleModal .modal #door-styles-tab .door-style-options.cat-stain-grade .door-style-tile .door-tile-image {
    height: 108px !important;
    min-height: 108px !important;
    max-height: 108px !important;
  }

  #doorStyleModal .yn-options {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  #doorStyleModal .yn-options .yn-tile {
    min-height: 84px;
    padding: 10px;
  }

  .guided-details-overlay.visible {
    padding: 10px;
    align-items: flex-end;
  }

  .guided-details-overlay .gdo-panel {
    max-height: 88dvh;
    border-radius: 12px 12px 0 0;
    padding: 12px;
  }

  .guided-details-overlay .gdo-main-image {
    max-height: 140px;
  }

  .guided-details-overlay .gdo-main-image img,
  .guided-details-overlay .gdo-media > img {
    height: 140px !important;
    object-fit: cover;
  }

  .guided-details-overlay .gdo-body {
    max-height: calc(88dvh - 40px);
  }
}

@media (max-width: 920px) and (orientation: landscape),
(max-height: 520px) and (orientation: landscape) {
  #doorStyleModal.modal {
    padding: 2px;
    align-items: stretch;
  }

  #doorStyleModal .modal-dialog,
  #doorStyleModal .modal-content {
    width: 100%;
    max-width: 100% !important;
    height: calc(100dvh - 4px);
    max-height: calc(100dvh - 4px);
    border-radius: 6px;
    margin: 0 !important;
  }

  #doorStyleModal:has(.guided-step-content) .modal-header {
    padding: 2px 6px !important;
    min-height: 0 !important;
    gap: 4px !important;
    border-bottom-width: 1px;
  }

  #doorStyleModal:has(.guided-step-content) #doorStyleModalTitle {
    font-size: 10px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  #doorStyleModal:has(.guided-step-content) .guided-modal-close {
    min-width: 52px !important;
    height: 22px !important;
    font-size: 10px !important;
    padding: 0 6px !important;
    box-shadow: none !important;
  }

  #doorStyleModal .modal-body {
    padding: 0 4px 2px;
  }

  #doorStyleModal .tab-content {
    padding: 2px 4px 0 !important;
  }

  #doorStyleModal .guided-step-header {
    margin-bottom: 2px !important;
    padding: 2px 4px 3px !important;
    gap: 0 !important;
    text-align: left;
    border-bottom: 1px solid var(--theme-border-panel, #334155);
  }

  #doorStyleModal .guided-step-title {
    font-size: 0.72rem !important;
    margin: 0 !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
  }

  #doorStyleModal .guided-step-subtitle {
    display: none !important;
  }

  #doorStyleModal .guided-navigation {
    margin-top: 0 !important;
    padding: 2px 4px 2px !important;
    gap: 3px !important;
    border-top-width: 1px;
  }

  #doorStyleModal .guided-navigation .step-progress {
    font-size: 9px;
    line-height: 1.1;
  }

  #doorStyleModal .guided-nav-button {
    padding: 2px 6px !important;
    font-size: 10px !important;
    min-height: 22px !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
  }

  #doorStyleModal .guided-step-body {
    padding-bottom: 2px !important;
    padding-right: 2px !important;
  }

  #doorStyleModal .door-style-options,
  #doorStyleModal .drawer-options,
  #doorStyleModal .case-material-options,
  #doorStyleModal .hardware-options {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 4px;
    margin: 2px 0 4px !important;
  }

  #doorStyleModal .door-style-tile,
  #doorStyleModal .drawer-tile,
  #doorStyleModal .case-material-tile,
  #doorStyleModal #door-styles-tab .door-style-tile {
    display: flex !important;
    flex-direction: row !important;
    min-height: 96px !important;
    max-height: 112px !important;
    overflow: hidden;
  }

  #doorStyleModal .door-tile-image,
  #doorStyleModal .drawer-tile-image,
  #doorStyleModal .case-material-tile-image,
  #doorStyleModal #door-styles-tab .door-style-tile .door-tile-image {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 38% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    height: 100% !important;
  }

  #doorStyleModal .door-tile-content,
  #doorStyleModal .drawer-tile-content,
  #doorStyleModal .case-material-tile-content,
  #doorStyleModal #door-styles-tab .door-style-tile .door-tile-content {
    margin-left: 38% !important;
    width: 62% !important;
    padding: 4px 24px 4px 6px !important;
  }

  #doorStyleModal .door-tile-overlay,
  #doorStyleModal .drawer-tile-overlay,
  #doorStyleModal .case-material-tile-overlay,
  #doorStyleModal .hardware-tile-overlay {
    right: 4px !important;
    bottom: 4px !important;
    top: auto !important;
    left: auto !important;
  }

  #doorStyleModal .tile-details-btn {
    font-size: 0 !important;
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22) !important;
    overflow: hidden !important;
  }

  #doorStyleModal .tile-details-btn::after {
    content: "+";
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
  }

  #doorStyleModal .hardware-tile-content {
    padding: 4px 24px 4px 6px !important;
  }

  #doorStyleModal .door-tile-title,
  #doorStyleModal .drawer-tile-title,
  #doorStyleModal .case-material-tile-title {
    font-size: 0.82rem;
    margin-bottom: 2px;
  }

  #doorStyleModal .door-tile-description,
  #doorStyleModal .drawer-tile-description,
  #doorStyleModal .case-material-tile-description {
    font-size: 0.72rem;
    line-height: 1.3;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #doorStyleModal .hardware-tile {
    min-height: 88px !important;
    max-height: 96px !important;
  }

  #doorStyleModal .hardware-tile-image {
    width: 110px !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  #doorStyleModal .hardware-tile-title {
    font-size: 0.82rem;
  }

  #doorStyleModal .hardware-price {
    font-size: 0.75rem;
  }

  #doorStyleModal .yn-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  #doorStyleModal .yn-options .yn-tile {
    min-height: 64px;
    padding: 8px;
  }

  #doorStyleModal .yn-options .yn-title {
    font-size: 0.85rem;
    margin-bottom: 2px;
  }

  #doorStyleModal .yn-options .yn-desc {
    font-size: 0.72rem;
  }
}
