/* Клубный сервис — стили в едином ключе с ks-auto.ru (#353433, #E23737) */

:root {
  --autoservice-primary: #353433;
  --autoservice-accent: #E23737;
  --autoservice-accent-hover: #c42e2e;
  --autoservice-muted: #888;
  --autoservice-text: #AAA6A1;
  --autoservice-border: #e0e0e0;
}

/* ---------- Общие блоки ---------- */

.autoservice-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  font-size: 18px;
  line-height: 1.5;
}

.autoservice-title {
  font-size: 2.35rem;
  margin: 0 0 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.autoservice-lead,
.autoservice-contact {
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.autoservice-contact a {
  color: var(--autoservice-accent);
}

.autoservice-intro {
  margin-bottom: 2rem;
}

.autoservice-branches h2,
.autoservice-services h2 {
  font-size: 1.78rem;
  margin: 0 0 1rem;
}

/* Подписи без Bootstrap: my-requests и др. */
.autoservice-page .text-muted {
  color: var(--autoservice-muted);
  font-size: 1rem;
}

/* h2 с тем же классом, что у summary в дереве цен — только вне <details> */
.autoservice-page h2.autoservice-section-title {
  font-size: 1.62rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--autoservice-primary);
  line-height: 1.3;
}

/* --- Выбор филиала на главной --- */
.autoservice-branch-hint {
  margin: 0 0 0.75rem;
  font-size: 1.06rem;
  color: var(--autoservice-muted);
}
.autoservice-branch-card-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.75rem;
}
.autoservice-branch-radio-in-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  padding: 0.25rem 0;
  box-sizing: border-box;
}
.autoservice-branch-radio-in-card input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0; margin: 0;
}
.autoservice-branch-radio-circle {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--autoservice-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.autoservice-branch-radio-circle::after {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: transparent;
}
.autoservice-branch-radio-in-card input:checked + .autoservice-branch-radio-circle {
  border-color: var(--autoservice-accent);
}
.autoservice-branch-radio-in-card input:checked + .autoservice-branch-radio-circle::after {
  background: var(--autoservice-accent);
}
.autoservice-branch-radio-label { font-weight: 500; }
.autoservice-branch-services-wrap {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--autoservice-border);
}
.autoservice-branch-selected {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.autoservice-branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.autoservice-branch-card {
  border: 1px solid var(--autoservice-border);
  border-radius: 12px;
  padding: 1.7rem;
  background: #fafafa;
}

.autoservice-branch-card h3 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.autoservice-branch-card .autoservice-btn {
  font-size: 1.12rem;
  min-height: 54px;
}

.branch-address,
.branch-phones {
  margin: 0 0 0.5rem;
  font-size: 1.14rem;
}

.branch-phones {
  font-size: 1.16rem;
  font-weight: 500;
}

.branch-phones a {
  color: var(--autoservice-accent);
}

/* ---------- Кнопки ---------- */

.autoservice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  min-height: 52px;
  box-sizing: border-box;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1.12rem;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  line-height: 1.35;
  letter-spacing: 0;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: auto;
  transition: background 0.2s, color 0.2s;
}

.autoservice-btn:focus-visible,
.autoservice-page .link_btn:focus-visible,
.autoservice-page .link_btn__dark:focus-visible,
.autoservice-page .link_btn__light:focus-visible {
  outline: 2px solid var(--autoservice-accent);
  outline-offset: 2px;
}

.autoservice-btn-primary {
  background: var(--autoservice-accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
}

.autoservice-btn-primary:hover {
  background: var(--autoservice-accent-hover);
  color: #fff;
}

.autoservice-btn-primary:disabled {
  background: #d08888;
  cursor: not-allowed;
}

.autoservice-btn-secondary {
  background: var(--autoservice-primary);
  color: #fff;
}

.autoservice-btn-secondary:hover {
  background: #4a4846;
  color: #fff;
}

.autoservice-btn-outline {
  border: 1px solid var(--autoservice-accent);
  color: var(--autoservice-accent);
  background: transparent;
}

.autoservice-btn-outline:hover {
  background: rgba(226, 55, 55, 0.08);
  color: var(--autoservice-accent);
}

/* Стиль ks-auto.ru link_btn */
.autoservice-page .link_btn,
.autoservice-page .link_btn__dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1rem;
  background-color: var(--autoservice-primary);
  color: #fff;
  border: none;
  cursor: pointer;
}
.autoservice-page .link_btn:hover,
.autoservice-page .link_btn__dark:hover { background-color: #4a4846; color: #fff; }
.autoservice-page .link_btn__light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
  background-color: transparent;
  color: var(--autoservice-primary);
  border: 1px solid var(--autoservice-primary);
}
.autoservice-page .link_btn__light:hover {
  background-color: rgba(53, 52, 51, 0.06);
}

.autoservice-disclaimer {
  font-size: 1rem;
  color: #666;
  margin: -0.5rem 0 1rem;
}

/* ---------- Дерево разделов/категорий/услуг ---------- */

.autoservice-price-tree {
  margin-bottom: 1.5rem;
}

.autoservice-tree-section {
  margin-bottom: 0.5rem;
  border: 1px solid var(--autoservice-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.autoservice-tree-section[open] {
  border-color: var(--autoservice-accent);
}
.autoservice-tree-section > .autoservice-section-title {
  list-style: none;
  padding: 0.9rem 1.1rem;
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--autoservice-primary);
  background: #f8f8f8;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.35;
}
.autoservice-tree-section > .autoservice-section-title::-webkit-details-marker { display: none; }
.autoservice-tree-section > .autoservice-section-title::before { content: '▶'; margin-right: 0.55rem; font-size: 0.85rem; }
.autoservice-tree-section[open] > .autoservice-section-title::before { content: '▼'; }
.autoservice-tree-section > .autoservice-tree-category {
  margin: 0;
  border-top: 1px solid #eee;
}
.autoservice-tree-category { padding-left: 0; }
.autoservice-tree-category > .autoservice-category-title {
  list-style: none;
  padding: 0.72rem 1.1rem 0.72rem 1.55rem;
  margin: 0;
  font-size: 1.24rem;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  background: #fafafa;
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.35;
}
.autoservice-tree-category > .autoservice-category-title::-webkit-details-marker { display: none; }
.autoservice-tree-category > .autoservice-category-title::before { content: '▶'; margin-right: 0.52rem; font-size: 0.78rem; }
.autoservice-tree-category[open] > .autoservice-category-title::before { content: '▼'; }
.autoservice-tree-category .autoservice-service-list {
  padding-left: 2.2rem;
  padding-bottom: 0.65rem;
}

.autoservice-tree-category .autoservice-category-body {
  padding: 0 1.1rem 0.85rem 2.2rem;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

.autoservice-price-section { margin-bottom: 2rem; }

.autoservice-category { margin-bottom: 1.5rem; }

.autoservice-category-title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: #333;
}

.autoservice-service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.autoservice-service-item {
  padding: 0.68rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.autoservice-price-tree .autoservice-category-title,
.autoservice-price-tree .autoservice-service-item .service-name {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.35;
  color: #333;
}

.service-details { font-size: 1rem; }
.service-details summary {
  cursor: pointer;
  color: var(--autoservice-accent);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0;
  box-sizing: border-box;
}
.autoservice-tree-section > .autoservice-section-title:focus-visible,
.autoservice-tree-category > .autoservice-category-title:focus-visible,
.service-details summary:focus-visible {
  outline: 2px solid var(--autoservice-accent);
  outline-offset: -2px;
}
.service-description {
  margin-top: 0.5rem;
  padding: 0.5rem 0;
  color: #575757;
  line-height: 1.5;
  font-size: 1rem;
}

.autoservice-tree-section .autoservice-branch-section-cta {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  border-top: 1px solid #eee;
  background: #fff;
}

.autoservice-price-tree .autoservice-btn-primary,
.autoservice-tree-section .autoservice-branch-section-cta .autoservice-btn,
.autoservice-cta .autoservice-btn-primary {
  margin: 0 !important;
  min-height: 48px;
  padding: 12px 20px !important;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  border-radius: 6px;
  box-sizing: border-box;
}

.autoservice-cta {
  margin-top: 2.5rem;
  text-align: center;
  padding: 0 0.25rem;
}
.autoservice-cta .autoservice-btn-primary {
  display: inline-flex;
  padding: 12px 24px;
  font-size: 17px;
}

/* ---------- Страница филиала ---------- */

.autoservice-branch-header { margin-bottom: 1.5rem; }

.autoservice-branch-page .autoservice-branch-header .autoservice-title {
  font-size: 2rem;
  line-height: 1.2;
}
.autoservice-branch-page .autoservice-branch-short-desc,
.autoservice-branch-page .branch-address {
  font-size: 1.12rem;
  line-height: 1.5;
}
.autoservice-branch-page .branch-metro {
  font-size: 1.08rem;
  font-weight: 600;
}
.autoservice-branch-page .branch-phones {
  font-size: 1.2rem;
  font-weight: 600;
}
.autoservice-branch-page .branch-hours {
  font-size: 1.05rem;
  color: #555;
}
.autoservice-branch-page .autoservice-catalog-card__badge {
  font-size: 0.95rem;
  padding: 0.28rem 0.65rem;
}
.autoservice-branch-map { margin-bottom: 2rem; }
.autoservice-branch-map h2 { font-size: 1.2rem; margin: 0 0 0.75rem; }
.autoservice-map-wrap {
  position: relative;
  width: 100%; max-width: 800px;
  height: 0; padding-bottom: 56.25%;
  overflow: hidden; border-radius: 8px;
  border: 1px solid var(--autoservice-border);
}
.autoservice-map-wrap-full {
  height: 400px;
  padding-bottom: 0;
}
.autoservice-map-iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* --- Мини-карта в карточке филиала --- */
.branch-map-mini {
  width: 100%;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  margin: 0.75rem 0;
  border: 1px solid var(--autoservice-border);
  background: #f0f0f0;
}

.branch-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.autoservice-btn-branch-main {
  width: 100%;
  margin-top: 0.9rem;
  min-height: 58px !important;
  font-size: 1.22rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* --- Маркер карты --- */
.branch-map-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
}
.branch-map-marker-pin {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  background: var(--autoservice-accent, #E23737);
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.branch-map-marker-label {
  margin-top: 4px;
  background: #fff;
  color: var(--autoservice-primary, #353433);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================================
   Форма записи — Stepper
   ======================================================================== */

.booking-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0 0 2rem;
  padding: 0 0.5rem;
  user-select: none;
}
.booking-stepper .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.booking-stepper .step.done { cursor: pointer; }

.booking-stepper .step-num {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #e8edf3;
  color: #8898aa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  border: 2px solid transparent;
}
.booking-stepper .step.active .step-num {
  background: var(--autoservice-accent);
  color: #fff;
  border-color: var(--autoservice-accent);
  box-shadow: 0 0 0 4px rgba(226, 55, 55, 0.15);
}
.booking-stepper .step.done .step-num {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
}
.booking-stepper .step-text {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #8898aa;
  text-align: center;
  white-space: nowrap;
  line-height: 1.2;
}
.booking-stepper .step.active .step-text {
  color: var(--autoservice-accent);
  font-weight: 600;
}
.booking-stepper .step.done .step-text { color: #28a745; }
.booking-stepper .step-line {
  flex: 1 1 auto;
  height: 2px;
  background: #e8edf3;
  min-width: 16px; max-width: 80px;
  margin: 0 0.2rem;
  margin-top: 19px;
  transition: background 0.3s;
}
.booking-stepper .step-line.done { background: #28a745; }

/* ========================================================================
   Форма записи — панели и карточки
   ======================================================================== */

.booking-step-title {
  font-size: 1.2rem;
  margin: 0 0 1rem;
  font-weight: 600;
  color: var(--autoservice-primary);
}

.booking-step-subtitle {
  margin: -0.5rem 0 0.75rem;
  font-size: 1rem;
  color: var(--autoservice-muted);
}

.booking-panel {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Карточки выбора */
.booking-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.booking-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 2px solid var(--autoservice-border);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  min-height: 44px;
}
.booking-card:hover {
  border-color: #ccc;
  background: #fafafa;
}
.booking-card.selected {
  border-color: var(--autoservice-accent);
  background: rgba(226, 55, 55, 0.04);
  box-shadow: 0 0 0 3px rgba(226, 55, 55, 0.1);
}
.booking-card input[type="radio"],
.booking-card input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.2rem;
  width: 18px; height: 18px;
  accent-color: var(--autoservice-accent);
}
.booking-card-content { flex: 1; min-width: 0; }
.booking-card-title { display: block; font-size: 1rem; }
.booking-card-address { display: block; font-size: 0.85rem; color: #666; margin-top: 0.2rem; }
.booking-card-phones { display: block; font-size: 0.85rem; color: var(--autoservice-accent); margin-top: 0.15rem; }

/* Услуги в форме записи */
.booking-service-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.booking-service-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 44px;
}
.booking-service-item:hover {
  border-color: #c8d6e5;
  background: #fafbfc;
}
.booking-service-item.selected {
  border-color: var(--autoservice-accent);
  background: rgba(226, 55, 55, 0.04);
}
.booking-service-item input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.15rem;
  width: 18px; height: 18px;
  accent-color: var(--autoservice-accent);
}
.booking-service-item .service-info { flex: 1; min-width: 0; }
.booking-service-item .service-name { font-weight: 500; display: block; }
.booking-service-item .service-desc {
  display: block;
  font-size: 0.82rem;
  color: #777;
  margin-top: 0.15rem;
  line-height: 1.4;
}
.service-price-tag {
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
  align-self: center;
}
.service-price-tag.has-price { color: var(--autoservice-accent); }
.service-price-tag.no-price { color: #999; font-size: 0.82rem; font-weight: 400; }

.booking-service-list .service-price {
  color: var(--autoservice-accent);
  font-weight: 500;
}
.booking-service-list .service-price-null {
  color: #888;
  font-size: 0.9rem;
}

.booking-total-bar {
  position: sticky;
  top: 0;
  background: #fff5f5;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  z-index: 10;
}

/* ---------- Поля формы ---------- */

.booking-hint, .booking-total {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #555;
}

.booking-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.booking-option {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.booking-service-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  cursor: pointer;
}

.booking-fields-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.booking-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.booking-field { margin-bottom: 1rem; }
.booking-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  font-size: 1rem;
}
.field-required { color: var(--autoservice-accent); }

.booking-field input,
.booking-field select,
.booking-field textarea.booking-textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.booking-field input:focus,
.booking-field select:focus,
.booking-field textarea:focus {
  outline: none;
  border-color: var(--autoservice-accent);
  box-shadow: 0 0 0 3px rgba(226, 55, 55, 0.12);
}
.booking-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}
.booking-field input[type="file"] {
  padding: 0.55rem;
  min-height: 44px;
  font-size: 0.95rem;
}
.booking-field textarea.booking-textarea {
  max-width: 100%;
  min-height: 100px;
  resize: vertical;
}
.input-uppercase { text-transform: uppercase; }

/* ---------- Сводка, дисклеймер, ошибки ---------- */

.booking-summary {
  background: #f5f5f5;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border: 1px solid var(--autoservice-border);
}
.booking-summary h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--autoservice-primary);
}
.booking-summary p { margin: 0.3rem 0; font-size: 0.95rem; line-height: 1.5; }
.booking-summary p { font-size: 1rem; }

.booking-disclaimer-block {
  background: #fff8e6;
  border: 1px solid #e6d9b8;
  padding: 1rem 1.15rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #5c4a28;
}

.booking-error {
  background: #fff0f0;
  color: var(--autoservice-accent);
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ---------- Авторизация ---------- */

.booking-auth-required {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #f5f5f5;
  border-radius: 8px;
  border: 1px solid var(--autoservice-border);
}
.booking-auth-text { margin: 0 0 1rem; }
.booking-auth-actions { margin: 0; }

/* ---------- Навигация ---------- */

.booking-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eee;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.booking-nav-hint {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.35;
  flex: 1 1 280px;
}
.booking-nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-left: auto;
  flex-wrap: wrap;
}
.booking-btn-back,
.booking-btn-forward {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  margin: 0;
  min-height: 46px;
  min-width: 170px;
}

/* ========================================================================
   Страница «Спасибо»
   ======================================================================== */

.autoservice-page.autoservice-thank-you-page {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.autoservice-thank-you {
  text-align: center;
  padding: 2.3rem 1rem 2.5rem;
  box-sizing: border-box;
}
.autoservice-thank-you p {
  margin: 0.65rem 0;
  font-size: 1.12rem;
  line-height: 1.45;
}

.autoservice-thank-you .autoservice-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.autoservice-thank-you-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  max-width: 360px;
  margin: 1.35rem auto 0;
}

.autoservice-thank-you-actions .link_btn,
.autoservice-thank-you-actions .link_btn__dark,
.autoservice-thank-you-actions .link_btn__light {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  box-sizing: border-box;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: auto;
}

.autoservice-page .autoservice-thank-you-actions .link_btn__dark {
  background-color: var(--autoservice-accent, #E23737);
  color: #fff;
}

.autoservice-page .autoservice-thank-you-actions .link_btn__dark:hover {
  background-color: var(--autoservice-accent-hover, #c42e2e);
  color: #fff;
}

.autoservice-page .autoservice-thank-you-actions .link_btn__light {
  background-color: #fff;
  color: var(--autoservice-primary, #353433);
  border: 1px solid #d8d8d8;
}

.my-requests-list--clickable .my-request-item {
  padding: 0;
  border-bottom: 1px solid #eee;
}

.my-requests-list--clickable .my-request-item-link {
  display: block;
  padding: 0.85rem 0.25rem;
  text-decoration: none;
  color: inherit;
}

.my-requests-list--clickable .my-request-item-link:hover {
  background: #faf9f8;
}

.my-request-item-title {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.my-request-detail {
  max-width: 720px;
}

.my-request-detail-back {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.my-request-detail-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.my-request-detail-facts {
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.25rem;
  background: #f5f5f5;
  border: 1px solid var(--autoservice-border);
  border-radius: 10px;
}

.my-request-detail-row {
  display: flex;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #eee;
}

.my-request-detail-row:last-child {
  border-bottom: none;
}

.my-request-detail-row dt {
  flex: 0 0 140px;
  margin: 0;
  font-size: 0.95rem;
  color: var(--autoservice-muted);
}

.my-request-detail-row dd {
  margin: 0;
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.45;
}

.my-request-services-list {
  margin: 0;
  padding-left: 1.15rem;
}

.my-request-detail-cost {
  font-weight: 600;
  color: var(--autoservice-accent);
}

.my-request-chat-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--autoservice-border);
}

.my-request-chat-closed {
  padding: 0.75rem 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.45;
  color: #555;
}

.my-request-chat-section .dialog-send-actions .link_btn__dark {
  min-width: 160px;
}

.thank-you-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.thank-you-details {
  text-align: left;
  max-width: 500px;
  margin: 1.5rem auto;
}
.thank-you-id {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--autoservice-primary);
}
.thank-you-summary {
  background: #f5f5f5;
  border: 1px solid var(--autoservice-border);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.4rem 0;
  gap: 1rem;
}
.summary-row + .summary-row { border-top: 1px solid #eee; }
.summary-label { font-size: 1rem; color: var(--autoservice-muted); flex-shrink: 0; min-width: 110px; }
.summary-value { font-size: 1.1rem; text-align: right; word-break: break-word; }
.summary-cost { font-weight: 600; color: var(--autoservice-accent); }

/* ========================================================================
   Мои заявки / Чат
   ======================================================================== */

.autoservice-my-requests {
  font-size: 16px;
  max-width: 980px;
}
.autoservice-my-requests .autoservice-title {
  font-size: 2rem;
}
.autoservice-my-requests .my-requests-section { margin-bottom: 2rem; }

/* Встраивание в ЛК ks-auto.ru (/personal/autoservice/) */
.autoservice-my-requests--lk {
  max-width: none;
  font-size: 15px;
}
.autoservice-lk-embed-wrap .autoservice-my-requests-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.autoservice-lk-embed-wrap .autoservice-section-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.autoservice-lk-embed-wrap .my-request-car {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.15rem;
}
.autoservice-btn-new-request {
  min-height: 56px;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow: none;
}
.my-requests-list { list-style: none; padding: 0; margin: 0; }
.my-requests-list li { padding: 0.75rem 0; border-bottom: 1px solid #eee; }
.my-request-time { font-size: 0.9rem; color: #666; margin-top: 0.2rem; }
.my-request-time-confirmed { font-size: 0.9rem; color: #2c6b2f; margin-top: 0.2rem; font-weight: 500; }
.request-status {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  min-height: 28px;
  border: 1px solid transparent;
}
.request-status-new,
.request-status-awaiting_confirmation {
  background: #fff8e6;
  border-color: #f0d58b;
  color: #8b6b1a;
}
.request-status-confirmed {
  background: #e8f5e9;
  border-color: #9ed0a5;
  color: #2e6d31;
}
.request-status-in_progress {
  background: #e8f0fb;
  border-color: #9ab9e9;
  color: #2f5ea8;
}
.request-status-completed {
  background: #e8f5e9;
  border-color: #88c79a;
  color: #1f5f2a;
}
.request-status-cancelled {
  background: #f8eaea;
  border-color: #e2b3b3;
  color: #8a3f3f;
}
.autoservice-dialogs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  min-height: 260px;
  align-items: start;
}
.autoservice-dialogs-list {
  border: 1px solid var(--autoservice-border);
  border-radius: 8px;
  overflow: hidden;
}
.autoservice-dialogs-list .dialog-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.75rem 1rem;
  min-height: 44px;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  font-size: 1.02rem;
}
.autoservice-dialogs-list .dialog-item:last-child { border-bottom: none; }
.autoservice-dialogs-list .dialog-item:hover { background: #f5f5f5; }
.autoservice-dialogs-list .dialog-item.active { background: #fff8e6; border-left: 3px solid var(--autoservice-accent); }
.dialog-preview { display: block; font-size: 0.85rem; color: #666; margin-top: 0.25rem; }
.dialog-preview { font-size: 0.95rem; }
.autoservice-dialog-messages {
  border: 1px solid var(--autoservice-border);
  border-radius: 8px;
  padding: 1rem;
  min-height: 260px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
}
.autoservice-dialog-messages h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}
.autoservice-dialog-messages .dialog-messages-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}
.autoservice-dialog-messages .dialog-messages-list .dialog-message {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.75rem;
  border-radius: 8px;
  position: relative;
  box-sizing: border-box;
}
.dialog-message-user { background: #f0f4fa; }
.dialog-message-manager { background: #e8f5e9; }
.dialog-message-system { background: #fff8e6; }
.my-request-chat-section .dialog-messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  flex: none;
  min-height: 0;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0.2rem 0.5rem;
  margin: 0 0 0.25rem;
}
.my-request-chat-section .dialog-message {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.75rem;
  border-radius: 10px;
  position: relative;
  box-sizing: border-box;
  max-width: min(100%, 520px);
}
.my-request-chat-section .dialog-message-user {
  align-self: flex-end;
  margin-left: auto;
}
.my-request-chat-section .dialog-message-manager {
  align-self: flex-start;
  margin-right: auto;
}
.my-request-chat-section .dialog-message-system {
  align-self: stretch;
  max-width: 100%;
  width: 100%;
}
.dialog-message__meta,
.message-meta { font-size: 0.85rem; color: #666; display: block; margin-bottom: 0.35rem; line-height: 1.3; }
.dialog-message__body,
.message-body { margin: 0; word-break: break-word; line-height: 1.45; }
.dialog-message__body a.autoservice-chat-link,
.message-body a.autoservice-chat-link,
.autoservice-dialog-msg__body a.autoservice-chat-link {
  color: #1565c0;
  text-decoration: underline;
  word-break: break-all;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.dialog-message__body a.autoservice-chat-link:hover,
.message-body a.autoservice-chat-link:hover,
.autoservice-dialog-msg__body a.autoservice-chat-link:hover {
  color: #0d47a1;
}
.dialog-send-form {
  margin-top: 0.8rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}
.dialog-send-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  color: #555;
}
.dialog-send-form textarea.booking-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}
.dialog-send-actions {
  margin-top: 0.55rem;
  display: flex;
  justify-content: flex-end;
}

/* ========================================================================
   Адаптивная вёрстка
   ======================================================================== */

@media (max-width: 1200px) {
  .autoservice-page {
    max-width: 960px;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  .autoservice-branches-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .branch-map-mini {
    height: 200px;
  }
}

@media (max-width: 992px) {
  .autoservice-page {
    max-width: 760px;
    font-size: 17px;
  }
  .autoservice-title {
    font-size: 2.05rem;
  }
  .autoservice-branches-grid {
    grid-template-columns: 1fr;
  }
  .autoservice-branch-card {
    padding: 1.25rem;
  }
  .branch-card-actions {
    gap: 0.5rem;
  }
  .branch-card-actions .autoservice-btn {
    flex: 1 1 auto;
    width: auto;
    min-width: 180px;
  }
  .autoservice-btn-branch-main {
    min-height: 54px !important;
    font-size: 1.16rem !important;
  }
  .booking-stepper {
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }
  .booking-stepper .step {
    min-width: 110px;
  }
  .autoservice-dialogs-layout {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .autoservice-dialogs-list {
    max-height: 260px;
    overflow-y: auto;
  }
}

@media (max-width: 768px) {
  .autoservice-page { padding: 1rem 0.75rem 2rem; }
  .autoservice-title { font-size: 1.95rem; }
  .autoservice-my-requests {
    font-size: 15px;
  }
  .autoservice-my-requests .autoservice-title {
    font-size: 1.72rem;
  }
  .autoservice-branches-grid { grid-template-columns: 1fr; gap: 1rem; }
  .autoservice-branch-card { padding: 1rem; }
  .autoservice-tree-section > .autoservice-section-title,
  .autoservice-tree-category > .autoservice-category-title {
    padding: 0.65rem 1rem;
    -webkit-tap-highlight-color: transparent;
  }
  .autoservice-tree-section > .autoservice-section-title { font-size: 1.22rem; }
  .autoservice-tree-category > .autoservice-category-title { font-size: 1.1rem; }
  .autoservice-service-item .service-name { font-size: 1.05rem; }
  .autoservice-service-item { padding: 0.6rem 0; }
  .booking-options { gap: 0.5rem; }
  .booking-option { min-height: 44px; align-items: center; }
  .autoservice-btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
  }
  .autoservice-cta .autoservice-btn-primary { padding: 0.85rem 1.5rem; }
  .autoservice-dialogs-layout { grid-template-columns: 1fr; }
  .autoservice-btn-new-request {
    width: 100%;
    font-size: 1.1rem;
    min-height: 52px;
  }
  .my-requests-list li {
    padding: 0.75rem 0.35rem;
    border: 1px solid #ececec;
    border-radius: 10px;
    margin-bottom: 0.55rem;
    background: #fff;
  }
  .my-request-time,
  .my-request-time-confirmed {
    font-size: 0.95rem;
  }
  .request-status {
    font-size: 0.85rem;
    min-height: 30px;
  }
  .autoservice-dialogs-list .dialog-item {
    min-height: 54px;
    font-size: 1rem;
  }
  .dialog-preview {
    font-size: 0.9rem;
  }
  .autoservice-dialog-messages {
    max-height: none;
    min-height: 0;
  }
  .autoservice-dialog-messages .dialog-messages-list,
  .my-request-chat-section .dialog-messages-list {
    max-height: 44vh;
  }
  .dialog-send-actions {
    justify-content: stretch;
  }
  .dialog-send-actions .autoservice-btn {
    width: 100%;
  }
  .booking-fields-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .booking-cards { grid-template-columns: 1fr; }
  .booking-fields-row { flex-direction: column; gap: 0; }
  .booking-field input,
  .booking-field select,
  .booking-field textarea.booking-textarea {
    max-width: none;
    min-height: 44px;
    font-size: 16px;
  }
  .booking-field textarea.booking-textarea { min-height: 100px; }
  .booking-nav {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 0.75rem 1rem;
    margin: 0 -0.75rem;
    border-top: 1px solid var(--autoservice-border);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    z-index: 100;
    gap: 0.6rem;
  }
  .booking-nav-hint {
    flex: 1 1 100%;
    font-size: 0.88rem;
  }
  .booking-nav-actions {
    width: 100%;
    margin-left: 0;
    gap: 0.5rem;
  }
  .booking-btn-back,
  .booking-btn-forward {
    flex: 1;
    min-width: 0;
    text-align: center;
  }
  .autoservice-booking-page { padding-bottom: 5rem; }
}

@media (max-width: 480px) {
  .autoservice-title { font-size: 1.7rem; }
  .branch-map-mini { height: 140px; }
  .autoservice-map-wrap-full { height: 280px; }
  .booking-stepper .step-num { width: 32px; height: 32px; font-size: 0.8rem; }
  .booking-stepper .step-line { margin-top: 15px; min-width: 10px; }
  .booking-stepper .step-text { font-size: 0.72rem; }
  .booking-card { padding: 0.75rem; }
  .booking-service-item { padding: 0.6rem; }
  .summary-row { flex-direction: column; gap: 0.15rem; }
  .summary-value { text-align: left; }
  .thank-you-summary { padding: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .booking-panel {
    animation: none;
  }
}

@media (max-width: 360px) {
  .booking-stepper { padding: 0; }
  .booking-stepper .step-text { display: none; }
  .booking-stepper .step-line { margin-top: 16px; }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .autoservice-page { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); }
  .autoservice-cta { padding-bottom: env(safe-area-inset-bottom); }
}
