body {
  background-color: #fcfcfc;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.mt0 {
  margin-top: 0;
}

/* Основные стили */
.create-card-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  color: #5F5F5F;

  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 20px;
}

/* Блок загрузки фото */
.photo-upload-section {
  display: flex;
  min-width: 800px;
  gap: 15px;
  margin-bottom: 30px;
  align-items: center;
  flex-wrap: wrap;
}

.photos-container {
  display: flex;
  gap: 10px;
}

.photo-preview {
  width: 240px;
  height: 290px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #dfdfdf;
}

.upload-circle {
  width: 240px;
  height: 290px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-circle:hover {
    opacity: 0.4;
}

/* Форма */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.form-group {
  flex: 1;
}

#first-F-G {
    margin: 1.5rem 0;
    
}

.three-columns {
  display: flex;
  justify-content: center;
  gap: 50px;
  display: flex;
  gap: 20px;
}

.column {
  max-width: 350px;
  padding: 10px;
}

#Product-Price {
  margin-top: 1.5rem;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
  font-weight: 500;
  margin-top: 15px;
}

textarea {
  min-height: 210px;
  resize: vertical;
}

.div-btn-save {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 70px;
}

.submit-btn {
  
  background: #ffffff;
  color: #FF9412;
  border: none;
  padding: 12px 48px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: #FF9412;
  color: #ffffff;
}


input, select, textarea {
  width: 324px;
  padding: 10px 15px;  
  outline: none;
  box-shadow: none;
  box-shadow: 0 3px 5px 0 rgba(136, 136, 136, 0.08);
  background-color: #fff;
  border: none;
  border-radius: 20px;
  

  font-size: 16px;
}

input:focus, select:focus, textarea:focus {
  background-color: #fff;
  border: none;
}


select {
  width: 100%;
  border-radius: 30px;
  background-color: white;

  /* color:#676767; */

  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

input:-webkit-autofill {
  background-color: #fff !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #000 !important;
}

/* Placeholder-опция (серый цвет) */
select option[disabled] {
  color: #F8A873;
}


/* Когда select ещё не выбран (значение пустое) */
select:invalid {
  color: #F8A873; 
}

#carFuel:invalid {
  color: #F8A873;
}

select::placeholder {
  color: #F8A873;
}

::placeholder {
  color: #F8A873;
}

.type-toggle {
  margin-top: 15px;
  display: flex;
  justify-content: space-between; /* кнопки по краям */
  max-width: 354px;               /* фиксированная ширина */
  width: 100%;
  flex-direction: column;
  gap: 10px; /* расстояние между блоками */
}

.toggle-btn {
  padding: 7px 15px;
  border: 2px solid #F8A873;
  background-color: #FAF7F5;
  color: #F8A873;
  border-radius: 40px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-weight: 600;

}


.btns {
  display: flex;
  gap: 10px; /* отступы между кнопками */
  flex-wrap: nowrap;
  justify-content: space-between; /* равномерно распределить по ширине */
}

.rent-btns {
  display: flex;
  gap: 14px;
  justify-content: left; /* 2 кнопки в ряд с равным расстоянием */
}

.toggle-btn.active {
  background-color: #ffffff;
  border: 2px solid #FF9412;
  color: #FF9412;
}

.toggle-btn:hover {
  border: 2px solid #FF9412;
  color: #FF9412;
}


.hidden-file-input {
  display: none;
}

.photo-upload-wrapper {
  min-width: 780px;
}
.custom-file-label {
  display: inline-block;
  padding: 8px 12px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #555;
  margin-top: 12px;
  text-align: center;
  transition: 0.2s;
}

.custom-file-label:hover {
  background-color: #f3f3f3;
}
.photo-preview-wrapper {
  position: relative;
  display: inline-block;
  margin-right: 10px;
}

.delete-photo-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 10;
}

/**/
.photo-upload-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.photos-container {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.photo-preview-wrapper {
  position: relative;
  width: 240px;
  height: 290px;
}

.photo-preview-wrapper img.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.delete-photo-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 2;
}

.upload-placeholder {
  width: 240px;
  height: 290px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background-color: transparent;
  transition: all 0.2s;
}

.upload-placeholder:hover {
  opacity: 0.3;
}

.upload-placeholder img {
  width: 148px;
  height: 148px;
  pointer-events: none;
}

.hidden-file-input {
  display: none;
}


#info-text {
  color: #F8A873;
  margin-top: 0;
  font-size: 12px;
}


/* Основные стили для новой структуры */
.first-row {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.photo-section {
  min-width: 760px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-content: flex-start;
}

.title-price-section {
  flex: 1;
  height: 312px;
  min-width: 250px;
  position: sticky;
  display: flex;
  top: 20px;
}

/* когда включаем hide-middle на гриде #3CL — прячем вторую колонку и делаем 2 колонки */
#3CL.hide-middle .column:nth-child(2) { display: none; }
#3CL.hide-middle { grid-template-columns: 1fr 1fr; }

/* стандарт */
.three-columns .column {
  max-width: 350px;
}

/* когда центральной колонки нет */
.three-columns.wide-columns .column {
  max-width: 500px;
}

.all-form-group {
    margin: auto 0;
    min-width: 325px;
}

.photos-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}


/* Остальные стили остаются без изменений */

.column {
  flex: 1;
}

/* Стилизация Селектов */

/* Стилизация контейнера опций (в браузерах не всегда применимо) */
option {
  padding: 8px 10px;
  border-radius: 20px;
  font-size: 16px;
  background-color: #fff;
  border: none;
  color: #333;
}







/* Ряд чипсов */
.city-chips-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  min-height: 40px;
}

/* Обычный чип города */
.city-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff5ef;
  font-size: 14px;
  line-height: 1;
  /* border: 1px solid #e5e7eb; */
  white-space: nowrap;
  color: #FF9412
}

/* Чип удаления внутри города (крестик) */
.city-chip .chip-remove {
  display: inline-flex;
  margin-left: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.city-chip .chip-remove:hover {
 color: red;
}

/* Последний чип — "Редактировать" (пока просто прямоугольник-заглушка) */
.city-chip.edit {
  background: #fff5ef;       /* заглушка цвета */
  border: 1px dashed #FF9412;
  cursor: pointer;
  color: #FF9412;
  transition: all 0.2s;
}
.city-chip.edit:hover {
  border: 1px solid #FF9412;
  background: #FF9412;       /* заглушка цвета */
  color: #ffffff;
}

/* Модальное окно поверх всего (перекрывает панель/хедер) */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.5) !important;
  z-index: 1000 !important;
}

#no-cities {
  color: #C6C6C6;
}

#citySearch {
  width: 479px;
  flex-grow: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
}

#citySearch::placeholder {
  color: #C6C6C6;
}









/* выбранные в модалке — чипсы (уже есть классы ниже) */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 12px; border-radius:10px; max-width: none;
  background:#fff5ef; color:#FF9412; border:1px solid #FFE1CE;
  font-size:14px; line-height:1; max-height: 14px; white-space: nowrap;
}
.chip--selected { 
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 12px; border-radius:10px; max-width: none;
  background:#fff5ef; color:#FF9412; border:1px solid #FFE1CE;
  font-size:14px; line-height:1; max-height: 14px; white-space: nowrap;
}
.chip__remove { display: inline-flex; cursor: pointer; border-radius: 4px; color: #FF9412; transition: all 0.2s;}
.chip__remove:hover { color: red;}

/* доступные — вертикальные блоки */
#cityOptionsContainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.city-option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  /* border: 1.5px solid #e5e7eb; */
  border-radius: 10px;
  transition: all .2s;
  background: #f5f5f5;
  margin-bottom: 4px;
}

.city-option-name { font-size: 14px; }

.city-option-item {
  cursor: pointer;
}

.city-option-item:hover {
  /* border: 1.5px solid #FFE1CE; */
  color: #FF9412;
  background: #FFF4E6;
}

/* затемнение модалки — перекрытие всего и закрытие по клику */
.modal-overlay { position: fixed !important; inset: 0 !important; background: rgba(0,0,0,0.5) !important; z-index: 1000 !important; }






.rent-section {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.rent-title {
  font-weight: 500;
}

.rent-toggle {
  display: flex;
  gap: 10px;
}

.rent-pill input {
  display: none; /* прячем нативный радиобаттон */
}

.rent-pill span {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  font-size: 14px;
  border: 2px solid #C6C6C6;
  background-color: #FAF7F5;
  color: #C6C6C6;
  border-radius: 40px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

/* hover = как у .toggle-btn:hover */
.rent-pill:hover span {
  border-color: #FF9412;
  color: #FF9412;
}

/* checked = как у .toggle-btn.active */
.rent-pill input:checked + span {
  background-color: #ffffff;
  border-color: #FF9412;
  color: #FF9412;
}

.rent-pill {
  margin-top: 0;
}


.textarea-with-counter {
  position: relative;
}

.textarea-with-counter textarea {
  width: 100%;
  box-sizing: border-box;
  padding-right: 54px; /* место под счётчик */
}

.char-counter {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 12px;
  color: #8A8A8A;
  background: #FFF;
  padding: 2px 6px;
  border-radius: 12px;
  border: 1px solid #EAEAEA;
}

/* когда блок причины продажи скрываем – счётчик тоже исчезает */
#reasonWrapper[style*="display: none"] .char-counter {
  display: none;
}



/* Общий контейнер блока доставки */
.delivery-section {
  margin-top: 20px;
  font-size: 14px;
  color: #333;
}


.radio-row {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 35px;
}

.radio-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
  height: 30px;
  transition: all .2s;
}

.radio-row label:hover {
  color: #FF9412;
}

.radio-row input[type="radio"] {
  appearance: none; /* убираем дефолтный стиль */
  padding: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #C6C6C6;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0;
  margin-right: 6px;
}

.radio-row input[type="radio"]:hover {
  border: 2px solid #FF9412;
}

.radio-row input[type="radio"]:checked {
  background-color: #FF9412;
  border: 2px solid #FF9412;
  box-shadow: 0 0 0 3px rgba(255, 148, 18, 0.3);
}
/* Кнопка "Добавить города доставки" — в строке с "Есть" */
#openDeliveryPicker.btn-secondary {
  background: #fff;
  border: 1px dashed #FF9412;
  color: #FF9412;
  padding: 7px 18px;
  border-radius: 16px;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
  font-weight: 500;
  white-space: nowrap;
}

#openDeliveryPicker.btn-secondary:hover {
  background: #FF9412;
  color: #fff;
}

/* Чипсы — отдельной строкой ниже */
#deliveryControls {
  margin-top: 10px;
}

#deliveryChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}




#openDeliveryPicker {
  display: none;
}

#deliveryControls { margin-top: 10px; }

.modal-overlay {
  display: none;                 /* базовое состояние */
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.5) !important;
  z-index: 9999 !important;      /* поверх шапки/фиксированных блоков */
  align-items: center;           /* центрирование содержимого */
  justify-content: center;
}

/* когда в JS ставим style.display = 'flex' — точно показать */
.modal-overlay[style*="display: flex"] {
  display: flex !important;
}

/* сам «белый» контейнер модалки */
.edit-links-modal {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  max-width: 520px;
  width: 92%;
}

#deliveryFilterSearch {
  border: 1px solid #c6c6c6d6;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  padding: 8px 15px 9px 15px;
  border-radius: 999;
  font-size: 16px;
}

#deliveryAllBtn {
  background: #fff;
  border: 1px dashed #C6C6C6;
  color: #C6C6C6;
  padding: 8px 18px 9px 18px;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
  font-weight: 500;
  white-space: nowrap;
}

#deliveryAllBtn:hover {
  background: #C6C6C6;
  color: #fff;
}

.remove-chip {
  cursor: pointer;
  transition: all .2s;
}
.remove-chip:hover {
  color: red;
}

/* Сетка выбора типа */
.type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 20px;
  padding: 16px 0 24px;
}

@media (max-width: 980px) {
  .type-grid { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
}
@media (max-width: 620px) {
  .type-grid { grid-template-columns: 1fr; }
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 3px 5px 0 rgba(136, 136, 136, 0.08);
  padding: 24px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ffffff;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  color: #333;
}

.type-card:hover {
  transform: translateY(0px);
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  border-color: #FF9412;
}

.type-card svg { color: #FF9412; }

#typeJob img {
  width: 38px;
}

.type-title {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  margin-top: 0.7rem;
  line-height: 1.2;
}

.type-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  margin-top: 5px;
  font-size: 20px;
  color: #000000;
}

/* Скрываем старую полоску маленьких кнопок, если она есть */
.type-toggle { display: none; }

/* Кнопка-ссылка "назад" */

.btn-get-another-type {
  display: flex;
  justify-content: center;
}
.btn-link {
  background: none;
  border: none;
  color: #C6C6C6;
  padding: 0;
  padding-top: 8px;
  font-size: 14px;
  cursor: pointer;
}
.btn-link:hover { text-decoration: underline; }

#backToTypeChooser {margin-bottom: 6px;}


.quota-banner {
  font-size: 14px;
  font-weight: 300;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3px;
}

.quota-banner .sub-badge {
  margin-right: 5px;
}

.quota-banner b {
  margin-left: 2px;
  margin-right: 2px;
}

#quotaCountdown {margin-left: 5px;}

#pageLoader {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff; z-index: 9999;
  transition: opacity .2s ease;
}
#pageLoader .spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid #dddddd00; border-top-color: #FF9412;
  animation: spin 0.8s linear infinite;
}
.photo-preview-wrapper {
  position: relative;
}

.delete-photo-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.cover-photo-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  padding: 2px;
  border: none;
  background: rgba(255,255,255,0.88);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cover-photo-btn[aria-pressed="true"] {
  cursor: default;
  background: rgba(255, 231, 204, 0.94); /* легкий оттенок под «оранжевую» */
}

.cover-photo-btn:hover:not([aria-pressed="true"]) {
  background: rgba(255,255,255,1);
}
/* Кнопка «главное фото» (рядом с крестиком) */
.photo-main-btn {
  position: absolute;
  top: 6px;
  right: 38px;         /* левее крестика */
  width: 22px;
  height: 22px;
  cursor: pointer;
  z-index: 2;
  opacity: 0.95;
  transition: opacity .15s ease, transform .1s ease;
}

.photo-main-btn[aria-pressed="true"] {
  cursor: default;     /* активная, на первом фото – не кликается */
}

.photo-main-btn:hover:not([aria-pressed="true"]) {
  opacity: 1;
  transform: translateY(-1px);
}
@keyframes spin { to { transform: rotate(360deg); } }

:root{
  --accent: #FF9412;
  --accent-soft: #fffbf8;
  --accent-border: #FFE1CE;
  --white: #fff;
  --muted: #C6C6C6;
  --muted-2: #7A7A7A;
}

/* hidden by default */
.mobile-header{ display:none; }
/* ===================== MOBILE HEADER (same as main-store) ===================== */
@media (max-width: 768px){
  .type-card .type-title {
    display: none;
  }
  #helpMeFab {
    display: none;
  }
  /* hide desktop header */
  .header, .top-header { display: none !important; }

  /* fixed mobile header */
  .mobile-header{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 50px;
    width: 100vw;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 0 12px;
    box-sizing: border-box;
    z-index: 4500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }

  .mobile-logo{
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.3px;
    color: var(--accent);
    text-decoration: none;
    line-height: 1;
  }

  .mobile-header__right{
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mh-btn{
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
    border: 1.5px solid var(--accent-border);
    background: var(--accent-soft);
    cursor: pointer;
    box-sizing: border-box;
    transition: .2s;
  }

  .mh-btn svg{
    width: 22px;
    height: 22px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
  }

  .mh-btn:active{ transform: scale(0.96); }
  .mh-btn--link{ text-decoration: none; }

  /* чтобы контент не прятался под фикс-хедером */
  body{ padding-top: 56px; }
}
/* ===================== CREATE-CARD MOBILE LAYOUT ===================== */
@media (max-width: 768px){

  /* 1) запрет горизонтальной прокрутки */
  html, body{
    overflow-x: hidden;
    width: 100%;
  }

  /* 2) контейнер страницы */
  .create-card-container{
    max-width: 100%;
    width: 100%;
    margin: 8px auto;
    padding: 0 12px;
    font-size: 16px;
    box-sizing: border-box;
  }

  /* 3) первая строка: фото + поля -> в колонку */
  .first-row{
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }

  /* убираем липкость и фикс. высоты у правого блока */
  .title-price-section{
    position: static;
    top: auto;
    height: auto;
    min-width: 0;
    width: 100%;
  }

  .all-form-group{
    min-width: 0;
    width: 100%;
  }

  /* 4) блок фото: убираем min-width, делаем 100% */
  .photo-upload-wrapper,
  .photo-upload-section,
  .photo-section{
    min-width: 0 !important;
    width: 100%;
  }

  .photos-container{
    width: 100%;
  }

  /* превью/кнопка добавления фото не должны расширять экран */
  .photo-preview-wrapper,
  .upload-placeholder{
    width: 100%;
    max-width: 100%;
    height: 240px;
    box-sizing: border-box;
  }

  .upload-placeholder img{
    width: 120px;
    height: 120px;
  }

  /* 5) three-columns -> одна колонка */
  .three-columns{
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
  }

  .three-columns .column,
  .column{
    max-width: none;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  /* 6) все поля формы на 100% */
  input, select, textarea{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* 7) поиск города в модалке (у тебя там 479px) */
  #citySearch{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* select: меньше шрифт и нормальный слой */
select{
  font-size: 14px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
}

/* options (в эмуляторе Chrome помогает, на реальном мобиле может игнорироваться) */
option{
  font-size: 14px;
  padding: 6px 10px;
}
.create-card-container,
.three-columns,
.column{
  overflow: visible;
}
.create-card-container{
  font-size: 16px;
}

/* заголовки/лейблы тоже уменьшаем */
label{
  font-size: 14px;
}
/* radio MUST stay round, not 100% width */
.radio-row input[type="radio"]{
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  min-height: 20px;
  flex: 0 0 20px;
}
/* 100% width only for text-like fields */
input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
select,
textarea{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.textarea-with-counter textarea{
  min-height: 105px; /* было 210 */
}
#deliveryFilterSearch {
  margin-top: 20px;
}


}
/* ===================== MOBILE: photos horizontal scroller (v3 - no wrap, real scroll) ===================== */
@media (max-width: 768px){

  /* высота ленты */
  :root{
    --mh-photo-h: 220px;
    --mh-photo-w: 150px;
    --mh-photo-gap: 12px;
    --mh-photo-radius: 14px;
  }

  /* внешний блок: одна строка, горизонтальный скролл */
  .photo-upload-wrapper{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;

    width: 100%;
    max-width: 100%;
    height: var(--mh-photo-h);

    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;

    gap: var(--mh-photo-gap);
    padding: 0 2px 8px;
    box-sizing: border-box;
  }

  /* контейнер фото: должен "расти" по контенту, а не занимать 100% */
  #photosContainer{
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch;

    height: var(--mh-photo-h);
    gap: var(--mh-photo-gap);

    width: max-content !important;     /* ключ: ширина = по контенту */
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }

  /* каждая карточка фото: фикс ширина, запрет сжатия */
  .photo-upload-wrapper .photo-preview-wrapper{
    position: relative;

    flex: 0 0 var(--mh-photo-w) !important;
    width: var(--mh-photo-w) !important;
    height: var(--mh-photo-h) !important;

    flex-shrink: 0 !important;
    box-sizing: border-box;

    border-radius: var(--mh-photo-radius);
    overflow: hidden;
  }

  .photo-upload-wrapper img.photo-preview{
    display: block;
    width: var(--mh-photo-w) !important;
    height: var(--mh-photo-h) !important;
    object-fit: cover;
    border-radius: var(--mh-photo-radius);
  }

  /* uploadTrigger = такая же карточка (это label) */
  .photo-upload-wrapper label#uploadTrigger.upload-placeholder{
    flex: 0 0 var(--mh-photo-w) !important;
    width: var(--mh-photo-w) !important;
    height: var(--mh-photo-h) !important;

    flex-shrink: 0 !important;
    box-sizing: border-box;

    border-radius: var(--mh-photo-radius);
    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
  }

  .photo-upload-wrapper label#uploadTrigger.upload-placeholder img{
    width: 96px;
    height: 96px;
  }

  /* когда фото нет — растянуть uploadTrigger на 100% (надежнее, чем :empty) */
  .photo-upload-wrapper:has(#photosContainer .photo-preview-wrapper) label#uploadTrigger.upload-placeholder{
    flex: 0 0 var(--mh-photo-w) !important;
    width: var(--mh-photo-w) !important;
  }

  .photo-upload-wrapper:not(:has(#photosContainer .photo-preview-wrapper)) label#uploadTrigger.upload-placeholder{
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  /* fallback на случай очень старого браузера без :has() */
  #photosContainer:empty + label#uploadTrigger.upload-placeholder{
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  /* === FIX: do not allow horizontal scroll when there are no photos === */

/* по умолчанию (нет фото) — никаких горизонтальных свайпов */
.photo-upload-wrapper{
  overflow-x: hidden !important;
  touch-action: pan-y; /* свайп только вверх/вниз */
  gap: 0;
}

/* если есть хотя бы 1 фото — включаем горизонтальный скролл */
.photo-upload-wrapper:has(#photosContainer .photo-preview-wrapper){
  overflow-x: auto !important;
  touch-action: pan-x pan-y;

}

}
