/* Переменные для неоморфизма */
:root {
  --background: #E8E8F3; /* Светлый фон */
  --foreground: #333333; /* Основной цвет текста */
  --primary: #EB911C; /* Основной акцентный цвет */
  --primary-foreground: #FFFFFF; /* Цвет текста на акцентном фоне */
  --muted: #B0B0B0; /* Приглушенный цвет */
  --muted-foreground: #666666; /* Приглушенный цвет текста */
  --border: #D1D1D6; /* Цвет границы */
  --shadow-dark: rgba(0, 0, 0, 0.1); /* Темная тень */
  --shadow-light: rgba(255, 255, 255, 0.7); /* Светлая тень */
  --inset-shadow-dark: rgba(0, 0, 0, 0.15); /* Темная внутренняя тень */
  --inset-shadow-light: rgba(255, 255, 255, 0.5); /* Светлая внутренняя тень */
  --radius: 8px; /* Скругление углов */
  --ring: #EB911C; /* Цвет обводки при фокусе */
  --popover: #FFFFFF; /* Цвет всплывающих окон */
  --popover-foreground: #333333; /* Цвет текста во всплывающих окнах */
  --accent: rgba(232, 232, 243, 0.8); /* Полупрозрачный акцент */
}

/* Темная тема */
.dark {
  --background: #1E1E2F;
  --foreground: #E8E8F3;
  --primary: #EB911C;
  --primary-foreground: #FFFFFF;
  --muted: #666666;
  --muted-foreground: #FFFFFF;
  --border: #3A3A4A;
  --shadow-dark: rgba(0, 0, 0, 0.3);
  --shadow-light: rgba(255, 255, 255, 0.1);
  --inset-shadow-dark: rgba(0, 0, 0, 0.4);
  --inset-shadow-light: rgba(255, 255, 255, 0.2);
  --popover: #2A2A3B;
  --popover-foreground: #E8E8F3;
  --accent: rgba(30, 30, 47, 0.8);
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--border);
}


body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

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

.text-primary {
  color: var(--primary);
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

/* Layout */
.min-h-screen {
  min-height: 100vh;
}

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.max-w-5xl {
  max-width: 64rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.ml-1 {
  margin-left: 0.25rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-4 {
  padding: 1rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-2 {
  padding: 0.5rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.pr-10 {
  padding-right: 2.5rem;
}

.space-y-6 > * + * {
  margin-top: 1.5rem;
}

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

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

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

.space-x-4 > * + * {
  margin-left: 1rem;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-2 {
  gap: 0.5rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.w-full {
  width: 100%;
}

.w-5 {
  width: 1.25rem;
}

.w-4 {
  width: 1rem;
}

.h-5 {
  height: 1.25rem;
}

.h-4 {
  height: 1rem;
}

.inline-block {
  display: inline-block;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.top-1\/2 {
  top: 50%;
}

.right-3 {
  right: 0.75rem;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.z-10 {
  z-index: 10;
}

.z-50 {
  z-index: 50;
}

.transform {
  transform: translateY(-50%);
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-lg {
  border-radius: var(--radius);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.hidden {
  display: none;
}

.cursor-pointer {
  cursor: pointer;
}

.cursor-help {
  cursor: help;
}

.neomorphic-card {
  background-color: var(--background);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: var(--radius);
  text-align: center;
}

.neomorphic-card:hover {
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.neomorphic-card.selected {
  background-color: var(--background);
  box-shadow: inset 3px 3px 6px var(--inset-shadow-dark), inset -3px -3px 6px var(--inset-shadow-light);
  border: 2px solid var(--primary);
}

.neomorphic-button {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.neomorphic-button:hover {
  background-color: var(--primary);
  opacity: 0.9;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.neomorphic-button:active {
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.2), inset -3px -3px 6px rgba(255, 255, 255, 0.1);
}

.button-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  cursor: pointer;
}

.button-outline:hover {
  background-color: var(--accent);
}

.neomorphic-input,
.neomorphic-select {
  background-color: var(--background);
  box-shadow: inset 3px 3px 6px var(--inset-shadow-dark), inset -3px -3px 6px var(--inset-shadow-light);
  border: none;
  padding: 0.5rem 1rem; /* Уменьшенный padding для соответствия min-height */
  border-radius: 8px; /* Более квадратные углы */
  width: 100%;
  color: var(--muted-foreground); /* Новый цвет текста */
  min-height: 30px !important; /* Гарантированная минимальная высота */
  line-height: 1.5; /* Улучшает выравнивание текста */
  font-size: 1rem;
  appearance: none; /* Отключает стандартные стили */
  -webkit-appearance: none; /* Поддержка Chrome/Safari */
  -moz-appearance: none; /* Поддержка Firefox */
  
}

/* Кастомная стрелка для <select> */
.neomorphic-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
}

.dark .neomorphic-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23FFFFFF' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

/* Состояние при фокусе */
.neomorphic-input:focus,
.neomorphic-select:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  box-shadow: inset 2px 2px 4px var(--inset-shadow-dark), inset -2px -2px 4px var(--inset-shadow-light);
}

.neomorphic-tab {
  background-color: var(--background);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  transition: all 0.3s ease;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  color: var(--foreground);
  font-size: 0.875rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}



/* Увеличиваем расстояние между кнопками вкладок */
.tabs-list {
  gap: 1rem; /* Или любое другое значение (0.5rem, 1rem, 2rem) */
  position: static; /* Убираем sticky или fixed, возвращаем в поток */
}

.neomorphic-tab.active {
  background-color: var(--background);
  box-shadow: inset 3px 3px 6px var(--inset-shadow-dark), inset -3px -3px 6px var(--inset-shadow-light);
  color: var(--primary);
}

.neomorphic-radio,
.neomorphic-checkbox {
  appearance: none;
  background-color: var(--background);
  box-shadow: inset 2px 2px 4px var(--inset-shadow-dark), inset -2px -2px 4px var(--inset-shadow-light);
  border: none;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem; /* Квадратная форма, как у .neomorphic-checkbox */
  cursor: pointer;
  position: relative;
}

.radio-group label {
  color: var(--muted-foreground); /* Новый цвет текста */
}

.additional-services-title {
  color: #0066cc; /* Синий цвет, измените на любой другой, например #ff5733 для оранжевого */
}

.neomorphic-checkbox {
  border-radius: 0.25rem;
}

.neomorphic-radio:checked::after,
.neomorphic-checkbox:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.75rem; /* Чуть больше, как у чекбокса */
  height: 0.75rem;
  background-color: var(--primary);
  border-radius: 0.125rem; /* Квадратный индикатор, как у чекбокса */
}

.neomorphic-checkbox:checked::after {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.125rem;
}

.neomorphic-notice {
  color: #EB911C;
  box-shadow: inset 2px 2px 4px var(--inset-shadow-dark), inset -2px -2px 4px var(--inset-shadow-light);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 3.5rem;
  height: 1.75rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background);
  box-shadow: inset 2px 2px 4px var(--inset-shadow-dark), inset -2px -2px 4px var(--inset-shadow-light);
  transition: .4s;
  border-radius: 1.75rem;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.25rem;
  width: 1.25rem;
  left: 0.25rem;
  bottom: 0.25rem;
  background-color: var(--muted);
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider:before {
  transform: translateX(1.75rem);
  background-color: var(--primary);
}

/* Tabs */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Контейнер для содержимого карточки */
.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between; /* Распределяет пространство равномерно */
  height: 100%; /* Занимает всю высоту карточки */
}

/* Изображение */
.service-card-image {
  margin-bottom: 0.5rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--muted-foreground); /* Новый цвет текста */
}

.service-card-price {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Контейнер для цены и количества */
.service-card-price-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Цена прижимается к верху контейнера */
  min-height: 4rem; /* Фиксированная высота контейнера */
  width: 100%; /* Полная ширина для равномерного выравнивания */
}

.quantity-control {
  display: flex;
  align-items: center;
  margin-top: auto;
}

.quantity-button {
  background: none;
  border: none;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--foreground);
}

.quantity-value {
  min-width: 1.25rem;
  text-align: center;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-container {
  background-color: var(--background);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: fixed;
  max-width: 32rem; /* Увеличено до 50rem (около 800px) */
  width: 90%; /* Адаптивная ширина по умолчанию */
  left: 50%;
  transform: translateX(-50%);
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modal-container {
  max-height: calc(100vh - 300px); /* Сохраняем максимальную высоту */
  overflow-y: auto; /* чтобы контент скроллился внутри окна */
  padding-top: 0; /* Убираем верхний отступ */
}

/* Существующие стили для .modal-header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  background-color: var(--background); /* Фон темы */
  z-index: 10; /* Выше содержимого */
  border-bottom: 1px solid var(--border); /* Тонкая граница */
  height: 3rem; /* Фиксированная высота заголовка */
  font-size: 1rem; /* Компактный шрифт */
  box-shadow: none; /* Плоский эффект */
}

.modal-title {
  margin: 0;
  font-size: 1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted-foreground);
}

@media (max-width: 400px) {
  .modal-container {
    width: calc(100% - 1rem);
    padding: 1rem;
    min-width: 18rem; /* Минимальная ширина для маленьких экранов */
  }
}

@media (min-width: 400px) and (max-width: 640px) {
  .modal-container {
    width: 90%;
    max-width: none;
    min-width: 20rem; /* Стабильная минимальная ширина */
  }
}

@media (max-width: 640px) {
  .modal-container {
    width: 95%; /* Увеличено с 90% до 95% */
    max-width: none;
    padding: 1rem;
  }
}

.separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

/* Responsive */
@media (min-width: 640px) {
  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sm\:max-w-md {
    max-width: 32rem;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .md\:justify-end {
    justify-content: flex-end;
  }
  .md\:p-8 {
    padding: 2rem;
  }
  .md\:text-4xl {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .lg\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Добавим стили для блока "Ваш заказ" */
.order-summary-panel {
  background-color: rgba(232, 232, 243, 0.8); /* Полупрозрачный фон */
  backdrop-filter: blur(5px);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.dark .order-summary-panel {
  background-color: rgba(30, 30, 47, 0.8); /* Темный полупрозрачный фон для темной темы */
}

/* Стили для тултипов */
.tooltip {
  position: relative;
  display: inline-block;
  z-index: 99999999;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--popover);
  color: var(--popover-foreground);
  text-align: center;
  border-radius: var(--radius);
  padding: 0.5rem;
  position: absolute;
  z-index: 99999999;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  font-size: 0.75rem;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  z-index: 99999999;
}

/* Стили для всплывающих подсказок по клику */
.info-tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  z-index: 99999999;
}

.info-tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--background); /* Используем #D1D1D6 вместо #FFFFFF */
  color: var(--muted-foreground);
  text-align: center;
  border-radius: var(--radius);
  padding: 0.5rem;
  position: absolute;
  z-index: 99999999;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
  font-size: 0.75rem;
}

.info-tooltip.active .tooltip-text {
  visibility: visible;
  opacity: 1;
  z-index: 99999999;
}

.bottom-panel-content {
  background-color: var(--background);
  border-radius: var(--radius);
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
  width: 84%; /* Полная ширина */
  box-sizing: border-box;
  margin: 0 auto; /* Убираем внешние отступы, если они не нужны */
}

.bottom-panel-content .grid > div:last-child {
	padding-right: 1.5rem; /* Такой же отступ, как у первого блока слева */
}

.service-card-image img {
  width: 60px; /* Новый размер ширины (например, уменьшено с 100px до 60px) */
  height: 60px; /* Новый размер высоты */
  object-fit: contain; /* Сохраняет пропорции изображения */
}

/* Для низкого разрешения (до 640px) */
@media (max-width: 640px) {
  .tabs-list {
    grid-template-columns: 1fr; /* Одна колонка, каждая кнопка на новой строке */
    gap: 0.5rem;
    padding: 0.25rem;
  }

  .neomorphic-tab {
    padding: 0.5rem; /* Компактные отступы */
    min-height: 2.5rem; /* Меньшая высота для мобильных */
    width: 100%;
  }
}
.service-card-title {
  white-space: pre-wrap; /* Поддержка переносов строк */
  line-height: 1.3; /* Стандартный интервал для основного текста */
}

@media (max-width: 640px) {
  .order-summary-panel {
    background-color: rgba(232, 232, 243, 0.8);
    backdrop-filter: blur(5px);
    border-radius: var(--radius);
    padding: 0.3rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: auto;
  }

  .order-summary-panel > *:not(.order-total):not(.order-submit-button) {
    display: none;
  }

  .order-total {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
  }

  .order-submit-button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
  }
}