/* Configurator Page Styles - Light Theme */

/* Override dark theme for entire configurator page */
body.dark-theme:has(.configurator-main) {
  background-color: #efefef;
}

/* Layout */
.configurator-main {
  font-family: 'Inter', system-ui, sans-serif;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  box-sizing: border-box;
  background-color: #efefef;
  min-height: 100vh;
}
@media (min-width: 640px) {
  .configurator-main { padding: 3rem 1.5rem; padding-top: 120px; }
}

.config-header { margin-bottom: 2.5rem; }
.config-title {
  font-family: 'PT Sans', sans-serif;
  font-size: 32px;
  line-height: 119%;
  font-weight: 700;
  letter-spacing: -0.44px;
  margin-bottom: 0.5rem;
  color: #111111;
}
@media (min-width: 640px) {
  .config-title { font-size: 44px; }
}
.config-subtitle { color: #6b7280; margin: 0; }
.config-hero-image {
  width: 100%;
  height: auto;
  margin-top: 2rem;
  border-radius: 1rem;
}

/* Main Grid Layout */
.config-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .config-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
  }
}

/* Options Container */
.config-options > *:not(:first-child) { margin-top: 1.5rem; }

/* Sidebar */
.config-sidebar {
  position: sticky;
  top: 100px;
  background-color: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e5e5e5;
  padding: 1.5rem;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.config-sidebar h2 {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.75rem;
  margin: 0 0 1rem 0;
  color: #111111;
}

/* Summary List */
.config-summary { margin-bottom: 1.5rem; }
.config-summary > *:not(:first-child) { margin-top: 0.75rem; }
.config-summary-empty { color: #6b7280; font-size: 0.875rem; margin: 0; }
.config-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 0.875rem;
}
.config-summary-label {
  color: #6b7280;
  font-size: 0.75rem;
}
.config-summary-value {
  font-weight: 500;
  color: #111111;
  word-wrap: break-word;
}
.config-summary-contact {
  color: #3b82f6;
}

/* Total Section */
.config-total-section {
  border-top: 1px solid #e5e5e5;
  padding-top: 1rem;
  margin-bottom: 1.5rem;
}
.config-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.config-total-label { color: #111111; font-weight: 600; }
.config-total-price {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111111;
}
.config-note {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.5rem 0 0 0;
}

/* Current Config Total */
.config-current-total {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.config-current-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111111;
}

/* Add to Quote Button */
.config-add-btn {
  width: 100%;
  background-color: transparent;
  color: #3b82f6;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid #3b82f6;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
}
.config-add-btn:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

/* Saved Configurations Section */
.config-saved-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}
.config-saved-section h3 {
  font-weight: 600;
  font-size: 0.875rem;
  color: #111111;
  margin: 0 0 0.75rem 0;
}
.config-saved-list {
  min-height: 40px;
}
.config-saved-empty {
  color: #9ca3af;
  font-size: 0.875rem;
  margin: 0;
}
.config-saved-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e5e5;
}
.config-saved-item:last-child {
  border-bottom: none;
}
.config-saved-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.config-saved-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.config-saved-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: #111111;
}
.config-saved-price {
  font-size: 0.75rem;
  color: #6b7280;
}
.config-saved-subitems {
  margin: 0.5rem 0 0 0;
  padding: 0 0 0 1rem;
  list-style: none;
}
.config-saved-subitem {
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.125rem 0;
  position: relative;
}
.config-saved-subitem::before {
  content: '•';
  position: absolute;
  left: -0.75rem;
  color: #9ca3af;
}
.config-saved-subitem-contact {
  color: #3b82f6;
}
.config-remove-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.config-remove-btn:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Quote Button */
.config-quote-btn {
  width: 100%;
  background-color: #111111;
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
}
.config-quote-btn:hover:not(:disabled) { background-color: #333333; }
.config-quote-btn:disabled {
  background-color: #e5e5e5;
  color: #9ca3af;
  cursor: not-allowed;
}
.config-quote-btn svg { width: 1.25rem; height: 1.25rem; }

/* Reset Button */
.config-reset-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.config-reset-btn:hover { color: #111111; }

/* Section Cards */
.config-section {
  background-color: #ffffff;
  border-radius: 1rem;
  border: 1px solid #e5e5e5;
  padding: 1.25rem;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
@media (min-width: 640px) {
  .config-section { padding: 1.5rem; }
}

.config-section-header { margin-bottom: 1rem; }
.config-section-title {
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #111111;
  margin: 0;
}
.config-required-badge {
  font-size: 0.75rem;
  font-weight: 400;
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}
.config-section-subtitle {
  color: #6b7280;
  font-size: 0.875rem;
  margin: 0.25rem 0 0 0;
}

/* Options Grid */
.config-options-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .config-options-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Option Cards */
.option-card {
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  background-color: #ffffff;
}
.option-card:hover:not(.disabled) { border-color: #3b82f6; }
.option-card.selected { border-color: #3b82f6; background-color: rgba(59, 130, 246, 0.05); }
.option-card.disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

.option-card-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}
.option-card-content > div {
  min-width: 0;
  flex: 1;
}
.option-name { font-weight: 500; color: #111111; margin: 0; word-wrap: break-word; }
.option-description { font-size: 0.75rem; color: #6b7280; margin: 0.25rem 0 0 0; line-height: 1.4; word-wrap: break-word; }
.option-price {
  font-size: 0.875rem;
  white-space: nowrap;
  font-weight: 500;
}
.option-price-included { color: #22c55e; }
.option-price-contact { color: #3b82f6; }
.option-price-normal { color: #6b7280; }

/* Quote Popup */
.config-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  display: none;
}
.config-popup.active { display: flex; }

.config-popup-wrapper {
  background-color: #ffffff;
  border-radius: 16px;
  flex-flow: row;
  width: 90%;
  max-width: 900px;
  max-height: 95vh;
  padding: 40px;
  display: flex;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}
.config-popup-left {
  flex: 1;
  padding-right: 30px;
  border-right: 1px solid #e5e5e5;
  overflow-y: auto;
  max-height: calc(95vh - 80px);
}
.config-popup-right {
  flex: 1;
  padding-left: 30px;
  display: flex;
  flex-direction: column;
}
.config-popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}
.config-popup-close:hover { opacity: 1; }
.config-popup h2 {
  font-family: 'PT Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 20px 0;
  color: #111;
}
.config-popup-desc { color: #666; font-size: 14px; margin: 0 0 24px 0; }

.config-list-item {
  padding: 12px 0;
  border-bottom: 1px solid #e5e5e5;
}
.config-list-item:last-child { border-bottom: none; }
.config-list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.config-list-label { color: #888; font-size: 12px; margin-bottom: 2px; }
.config-list-value { color: #111; font-size: 14px; font-weight: 500; }
.config-list-contact { color: #3b82f6; }
.config-list-price { color: #666; font-size: 14px; white-space: nowrap; }
.config-list-subitems {
  margin: 8px 0 0 0;
  padding: 0 0 0 16px;
  list-style: none;
}
.config-list-subitem { color: #666; font-size: 13px; padding: 2px 0; position: relative; }
.config-list-subitem::before { content: '•'; position: absolute; left: -12px; color: #999; }

.config-popup-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
  margin-top: 8px;
  margin-bottom: 8px;
}
.config-popup-total {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.config-popup-total-label { color: #666; font-size: 14px; }
.config-popup-total-value { color: #111; font-size: 24px; font-weight: 700; }
.config-submit-btn {
  background-color: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
  margin-top: 20px;
  width: 100%;
}
.config-submit-btn:hover { background-color: #333; }
.config-submit-btn:disabled { background-color: #ccc; color: #666; cursor: not-allowed; }
.config-popup-success, .config-popup-error {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  width: 100%;
}
.config-popup-success img, .config-popup-error img { width: 64px; height: 64px; margin-bottom: 24px; }
.config-popup-success h2, .config-popup-error h2 { margin-bottom: 12px; }
.config-popup-success .config-submit-btn { margin-top: 24px; }
.config-popup-error .config-submit-btn { background-color: #ef4444; margin-top: 24px; }
.config-popup-error .config-submit-btn:hover { background-color: #dc2626; }

@media (max-width: 768px) {
  .config-popup-wrapper { flex-direction: column; padding: 24px; max-height: 95vh; overflow-y: auto; }
  .config-popup-left { padding-right: 0; border-right: none; border-bottom: 1px solid #e5e5e5; padding-bottom: 20px; margin-bottom: 20px; max-height: none; }
  .config-popup-right { padding-left: 0; }
}
