:host {
  display: block;
}

/* Configurator Utility Classes */
/* Extracted from repeated Tailwind patterns in configurator-app.js */

/* ============================================================================
   BUTTON STYLES
   ============================================================================ */

/* Base card button style - used for selection buttons */
.btn-card {
  padding: 1.5rem;
  border-radius: 0.5rem;
  border-width: 2px;
  border-style: solid;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
  text-align: left;
}

.btn-card:hover {
  border-color: #942432;
  background-color: rgba(148, 36, 50, 0.05);
}

.btn-card-selected {
  border-color: #942432;
  background-color: rgba(148, 36, 50, 0.1);
}

.btn-card-default {
  border-color: #e5e7eb;
  background-color: #ffffff;
}

/* Center-aligned buttons */
.btn-card-center {
  padding: 1.5rem;
  border-radius: 0.5rem;
  border-width: 2px;
  border-style: solid;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
  text-align: center;
}

.btn-card-center:hover {
  border-color: #942432;
  background-color: rgba(148, 36, 50, 0.05);
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */

.section-title {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: #6b7280;
  margin-bottom: 2rem;
}

/* ============================================================================
   CARD CONTAINERS
   ============================================================================ */

.card-container {
  background-color: #ffffff;
  border-radius: 0.75rem;
  border-width: 1px;
  border-style: solid;
  border-color: #e5e7eb;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-header {
  background-color: #f3f4f6;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: #e5e7eb;
}

.card-body {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* ============================================================================
   LABELS & VALUES (Summary/Display)
   ============================================================================ */

.label-small {
  font-size: 0.75rem;
  line-height: 1rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.value-text {
  color: #1f2937;
  font-weight: 500;
}

.value-subtext {
  font-size: 0.75rem;
  line-height: 1rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* ============================================================================
   CHECKBOX CARDS
   ============================================================================ */

.checkbox-card {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 0.5rem;
  border-width: 2px;
  border-style: solid;
  border-color: #e5e7eb;
  background-color: #ffffff;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
  cursor: pointer;
  gap: 0.75rem;
}

.checkbox-card:hover {
  border-color: #942432;
  background-color: rgba(148, 36, 50, 0.05);
}

.checkbox-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f9fafb;
}

.checkbox-card input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

/* ============================================================================
   LAYOUT UTILITIES
   ============================================================================ */

.button-group-2col {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .button-group-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.button-group-3col {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .button-group-3col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.button-group-single {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================================
   UNIT TOGGLE
   ============================================================================ */

.unit-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: 0.875rem !important;
  line-height: 1.25rem !important;
  user-select: none !important;
}

.unit-toggle .unit-toggle-active,
.unit-toggle span.unit-toggle-active {
  color: #1f2937 !important;
  font-weight: 600 !important;
  cursor: default !important;
}

.unit-toggle .unit-toggle-inactive,
.unit-toggle span.unit-toggle-inactive {
  color: #9ca3af !important;
  cursor: pointer !important;
  transition: color 0.2s !important;
}

.unit-toggle .unit-toggle-inactive:hover,
.unit-toggle span.unit-toggle-inactive:hover {
  color: #942432 !important;
}

.unit-toggle .unit-toggle-separator,
.unit-toggle span.unit-toggle-separator {
  color: #d1d5db !important;
}

/* ============================================================================
   PRICE TAG
   ============================================================================ */

.price-tag {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.25rem;
  flex-shrink: 0;
}

.price-tag-large {
  color: #942432;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ============================================================================
   BADGE
   ============================================================================ */

.badge {
  font-size: 0.75rem;
  line-height: 1rem;
  background-color: rgba(148, 36, 50, 0.1);
  color: #942432;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  border-radius: 0.25rem;
}

/* ============================================================================
   ICON CONTAINERS
   ============================================================================ */

.icon-container {
  margin-bottom: 1.5rem;
}

.icon-container svg,
.icon-container > * {
  color: #942432;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================================
   TEXT UTILITIES
   ============================================================================ */

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-description {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #6b7280;
}

.text-title-large {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.text-title-medium {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.text-emphasis-green {
  color: #942432;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.text-emphasis-gray {
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ============================================================================
   SPACING UTILITIES
   ============================================================================ */

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

/* ============================================================================
   INFO BOX (Warning/Info messages)
   ============================================================================ */

.info-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  border-width: 1px;
  border-style: solid;
  border-color: #e5e7eb;
}

.info-box-warning {
  background-color: #fef3c7;
  border-color: #fbbf24;
}

.info-box p {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #4b5563;
}

.info-box-warning p {
  color: #92400e;
}

/* ============================================================================
   RESPONSIVE CONTAINERS
   ============================================================================ */

.container-narrow {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.container-medium {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.container-wide {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================================
   ADDITIONAL TEXT UTILITIES
   ============================================================================ */

.text-medium {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #1f2937;
}

.text-subtext {
  font-size: 0.75rem;
  line-height: 1rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.text-small-gray {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #6b7280;
}

.text-small-muted {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #9ca3af;
}

.text-semibold-inline {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-left: 1rem;
}

.text-grin-label {
  font-size: 0.75rem;
  line-height: 1rem;
  color: #942432;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.text-heading-grin {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 700;
  color: #942432;
}

/* ============================================================================
   LAYOUT UTILITIES
   ============================================================================ */

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.flex-left {
  flex: 1;
  text-align: left;
}

/* ============================================================================
   ICON UTILITIES
   ============================================================================ */

.icon-grin {
  color: #942432;
  margin-left: auto;
  margin-right: auto;
}

.icon-grin-spaced {
  color: #942432;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
}

/* ============================================================================
   ADDITIONAL LAYOUT UTILITIES
   ============================================================================ */

.flex-between-center {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: #e5e7eb;
}

.list-item-row-lg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: #e5e7eb;
}

/* ============================================================================
   ADDITIONAL TEXT UTILITIES
   ============================================================================ */

.text-xs-gray {
  font-size: 0.75rem;
  line-height: 1rem;
  color: #6b7280;
}

.text-title-medium-spaced {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.text-title-bold {
  color: #1f2937;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.text-description-spaced {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* ============================================================================
   BUTTON STYLES (Extended)
   ============================================================================ */

.btn-back {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background-color: #e5e7eb;
  color: #374151;
  border-radius: 0.5rem;
  font-weight: 500;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-back:hover {
  background-color: #d1d5db;
}

.btn-primary {
  margin-top: 2rem;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background-color: #942432;
  color: #ffffff;
  border-radius: 0.5rem;
  font-weight: 500;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.btn-primary:hover {
  background-color: #7a1d29;
}

.btn-primary:disabled {
  background-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 1;
}

.btn-primary:disabled:hover {
  background-color: #e5e7eb;
}

/* ============================================================================
   CONTAINER UTILITIES (Extended)
   ============================================================================ */

.container-large {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.container-large-spaced {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

/* ============================================================================
   FORM INPUT UTILITIES
   ============================================================================ */

.checkbox-base {
  margin-top: 0.25rem;
  margin-right: 1rem;
  height: 1rem;
  width: 1rem;
  color: #2563eb;
  border-radius: 0.25rem;
  border-color: #d1d5db;
  cursor: pointer;
}

.checkbox-base:focus {
  --tw-ring-color: #3b82f6;
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

/* ============================================================================
   UNSELECTED CARD BUTTON
   ============================================================================ */

.btn-card-unselected {
  padding: 1.5rem;
  border-radius: 0.5rem;
  border-width: 2px;
  border-style: solid;
  border-color: #e5e7eb;
  background-color: #ffffff;
  text-align: left;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
}

.btn-card-unselected:hover {
  border-color: #942432;
  background-color: rgba(148, 36, 50, 0.05);
}

/* ============================================================================
   RADIO BUTTON UTILITIES
   ============================================================================ */

.radio-grin {
  margin-top: 0.25rem;
  height: 1.25rem;
  width: 1.25rem;
  color: #942432;
  border-color: #d1d5db;
  border-radius: 0.25rem;
}

.radio-grin:focus {
  --tw-ring-color: #942432;
}

.radio-grin-spaced {
  height: 1.25rem;
  width: 1.25rem;
  color: #942432;
  border-color: #d1d5db;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.radio-grin-spaced:focus {
  --tw-ring-color: #942432;
}

/* ============================================================================
   LINK UTILITIES
   ============================================================================ */

.link-muted {
  color: #6b7280;
  transition-property: color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.link-muted:hover {
  color: #1f2937;
}

/* ============================================================================
   MODAL/CARD CONTAINERS
   ============================================================================ */

.modal-container {
  background-color: #ffffff;
  border-radius: 0.75rem;
  border-width: 2px;
  border-style: solid;
  border-color: #e5e7eb;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

/* ============================================================================
   RADIO BUTTON STYLES
   ============================================================================ */

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.radio-option:hover {
  border-color: #942432;
  background-color: #fef2f2;
}

.radio-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.radio-input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.radio-input:checked {
  accent-color: #942432;
}

.checkbox-input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
}

/* Product Thumbnails */
.product-thumbnail {
  border-radius: 6px;
  padding: 4px;
  flex-shrink: 0;
}

/* Thumbnail in radio-option context */
.radio-option .product-thumbnail {
  width: 60px;
  height: 60px;
  margin-right: 12px;
}

/* Thumbnail in list-item-row-lg context */
.list-item-row-lg .product-thumbnail {
  width: 50px;
  height: 50px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .radio-option .product-thumbnail {
    width: 50px;
    height: 50px;
  }
}

