/* ==========================================
   ПУЛЕНЕПРОБИВАЕМЫЕ СТИЛИ КОМПОНЕНТА
========================================== */
:root {
  --hc-bg: #f4f6f3;
  --hc-surface: #ffffff;
  --hc-surface-2: #f9faf8;
  --hc-surface-offset: #eef1eb;
  --hc-divider: #dde3d8;
  --hc-border: #d1d9cc;
  --hc-text: #1e2a1a;
  --hc-text-muted: #6b7a64;
  --hc-text-faint: #a8b5a0;
  --hc-primary: #26B663;
  --hc-primary-hover: #1b5e20;
  --hc-primary-light: #e8f5e9;
  --hc-primary-mid: #c8e6c9;
  --hc-success: #388e3c;
  --hc-error: #c62828;
  --hc-shadow-sm: 0 1px 3px rgba(30,42,26,0.07);
  --hc-shadow-lg: 0 12px 32px rgba(30,42,26,0.12);
}

.hc-wrap { font-family: 'Inter', 'Arial', sans-serif !important; font-size: 18px !important; color: var(--hc-text) !important; background: transparent !important; line-height: 1.5 !important; }
.hc-wrap *, .hc-wrap *::before, .hc-wrap *::after { box-sizing: border-box !important; }
.hc-wrap img, .hc-wrap svg { display: block !important; max-width: 100% !important; }

.hc-wrap button { cursor: pointer; font-family: inherit; outline: none; }

/* Универсальный класс для скрытия блоков */
.hc-hidden { display: none !important; }

/* Каркас */
.hc-main { max-width: 1100px !important; margin: 0 auto !important; background: var(--hc-bg) !important; border-radius: 20px !important; box-shadow: var(--hc-shadow-lg) !important; border: 1px solid var(--hc-divider) !important; display: flex !important; flex-direction: column !important; position: relative; overflow: visible !important; scroll-margin-top: 20px; }
.hc-header { background: var(--hc-surface) !important; padding: 20px 30px !important; border-bottom: 1px solid var(--hc-divider) !important; text-align: center !important; border-radius: 20px 20px 0 0 !important; }
.hc-logo-text { font-weight: 800 !important; font-size: 24px !important; color: var(--hc-primary) !important; }

/* Шаги */
.hc-stepper { display: flex !important; align-items: center !important; background: var(--hc-surface) !important; padding: 16px 30px !important; border-bottom: 1px solid var(--hc-divider) !important; width: 100% !important; }
.hc-step-item { display: flex !important; align-items: center !important; gap: 12px !important; }
.hc-step-circle { width: 32px !important; height: 32px !important; border-radius: 50% !important; display: flex !important; align-items: center !important; justify-content: center !important; font-weight: bold !important; border: 2px solid var(--hc-border) !important; color: var(--hc-text-muted) !important; background: var(--hc-surface) !important; flex-shrink: 0 !important; }
.hc-step-circle.active { background: var(--hc-primary) !important; color: #fff !important; border-color: var(--hc-primary) !important; box-shadow: 0 0 0 4px var(--hc-primary-light) !important; }
.hc-step-circle.done { background: var(--hc-primary-mid) !important; color: var(--hc-primary) !important; border-color: var(--hc-primary-mid) !important; }
.hc-step-label { font-weight: 600 !important; font-size: 18px !important; color: var(--hc-text-muted) !important; white-space: nowrap !important; }
.hc-step-label.active { color: var(--hc-primary) !important; }
.hc-step-connector { flex: 1 !important; height: 2px !important; background: var(--hc-divider) !important; margin: 0 16px !important; min-width: 20px !important; }
.hc-step-connector.done { background: var(--hc-primary-mid) !important; }

/* Контентная часть */
.hc-step-panel:not(.active) { display: none !important; }
.hc-step-panel.active { display: block !important; padding: 30px !important; background: var(--hc-bg) !important; border-radius: 0 0 20px 20px; overflow: visible !important; }

.hc-card { background: var(--hc-surface) !important; border-radius: 12px !important; border: 1px solid var(--hc-divider) !important; margin-bottom: 20px !important; overflow: visible !important; width: 100% !important; }
.hc-card-header { padding: 16px 24px !important; border-bottom: 1px solid var(--hc-divider) !important; font-weight: 700 !important; background: var(--hc-surface-2) !important; display: flex !important; align-items: center !important; gap: 10px !important; border-radius: 12px 12px 0 0 !important; }
.hc-card-body { padding: 24px !important; width: 100% !important; }

/* Сетка */
.hc-grid-2 { display: grid !important; grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; width: 100% !important; }
.hc-grid-3 { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 20px !important; width: 100% !important; }
.hc-col-2 { grid-column: span 2 !important; }

/* Формы */
.hc-form-group { display: flex !important; flex-direction: column !important; gap: 8px !important; margin-bottom: 0 !important; width: 100% !important; position: relative !important; }
.hc-form-label { font-size: 16px !important; font-weight: 600 !important; color: var(--hc-text) !important; margin: 0 !important; padding: 0 !important; display: block !important; }

/* БРОНЕБОЙНЫЙ ВОЗВРАТ SELECT */
.hc-wrap .ik_select, .hc-wrap .bx_filter_select_block, .hc-wrap .common_select { display: block !important; position: relative !important; width: 100% !important; height: auto !important; overflow: visible !important; padding: 0 !important; border: none !important; background: transparent !important; }
.hc-wrap .ik_select_link, .hc-wrap .ik_select_dropdown, .hc-wrap .common_select-link { display: none !important; width: 0 !important; height: 0 !important; opacity: 0 !important; position: absolute !important; }

.hc-wrap select.hc-form-select, .hc-wrap input.hc-form-input { display: block !important; width: 100% !important; height: 48px !important; padding: 0 16px !important; margin: 0 !important; border: 1.5px solid var(--hc-border) !important; border-radius: 8px !important; background-color: var(--hc-surface) !important; color: var(--hc-text) !important; font-size: 16px !important; box-shadow: none !important; outline: none !important; }
.hc-wrap select.hc-form-select { position: relative !important; left: 0 !important; top: 0 !important; visibility: visible !important; opacity: 1 !important; z-index: 10 !important; cursor: pointer !important; -webkit-appearance: auto !important; -moz-appearance: auto !important; appearance: auto !important; }
.hc-wrap select.hc-form-select:not(:disabled):focus, .hc-wrap input.hc-form-input:not(:disabled):not([readonly]):focus { border-color: var(--hc-primary) !important; box-shadow: 0 0 0 3px var(--hc-primary-light) !important; }
.hc-wrap select.hc-form-select:disabled, .hc-wrap input.hc-form-input:disabled, .hc-wrap input.hc-form-input[readonly] { background-color: var(--hc-surface-offset) !important; border-color: transparent !important; cursor: not-allowed !important; opacity: 1 !important; }

/* Чекбоксы */
.hc-checkbox-label { display: flex !important; align-items: center !important; gap: 8px !important; cursor: pointer !important; font-size: 14px !important; color: var(--hc-text) !important; user-select: none; }
.hc-checkbox-label input[type="checkbox"] { width: 18px !important; height: 18px !important; cursor: pointer !important; accent-color: var(--hc-primary) !important; margin: 0 !important; }

/* Вкладки */
.hc-tabs { display: flex !important; width: 100% !important; background: var(--hc-surface-offset) !important; padding: 4px !important; border-radius: 10px !important; gap: 4px !important; }
.hc-tab-btn { flex: 1 !important; display: block !important; padding: 12px 8px !important; font-size: 18px !important; font-weight: 600 !important; color: var(--hc-text-muted) !important; border-radius: 8px !important; text-align: center !important; transition: 0.2s !important; background: transparent !important; border: none !important; cursor: pointer !important; }
.hc-tab-btn.active { background: var(--hc-surface) !important; color: var(--hc-primary) !important; box-shadow: var(--hc-shadow-sm) !important; }

/* Кнопки */
.hc-btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; padding: 14px 24px !important; font-size: 15px !important; font-weight: 600 !important; border-radius: 8px !important; transition: 0.2s !important; text-decoration: none !important; border: 1.5px solid transparent !important; cursor: pointer !important; }
.hc-btn-primary { background-color: var(--hc-primary) !important; color: #fff !important; border-color: var(--hc-primary) !important; }
.hc-btn-primary:hover { background-color: var(--hc-primary-hover) !important; border-color: var(--hc-primary-hover) !important; }
.hc-btn-secondary { background-color: var(--hc-surface) !important; color: var(--hc-text) !important; border-color: var(--hc-border) !important; }
.hc-btn-add { background-color: var(--hc-primary-light) !important; color: var(--hc-primary) !important; border: 1.5px solid var(--hc-primary-mid) !important; width: 100% !important; height: 52px !important; margin-top: 20px !important; display: flex !important; visibility: visible !important; opacity: 1 !important; }
.hc-btn-add:hover { background-color: var(--hc-primary-mid) !important; }

.hc-input-wrap { position: relative !important; display: block !important; width: 100% !important; }
.hc-input-unit { position: absolute !important; right: 16px !important; top: 50% !important; transform: translateY(-50%) !important; font-size: 16px !important; color: var(--hc-text-muted) !important; font-weight: 600 !important; pointer-events: none !important; }
.hc-input-wrap input { padding-right: 50px !important; }

/* Таблица */
.hc-table-wrap { overflow-x: auto !important; width: 100% !important; display: block !important; }
.hc-table { width: 100% !important; border-collapse: collapse !important; min-width: 600px !important; }
.hc-table th { padding: 12px 16px !important; background: var(--hc-surface-offset) !important; font-size: 13px !important; text-transform: uppercase !important; color: var(--hc-text-muted) !important; text-align: left !important; }
.hc-table td { padding: 16px !important; border-bottom: 1px solid var(--hc-divider) !important; font-size: 16px !important; vertical-align: middle !important; }

/* Транспорт */
.hc-transport-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important; gap: 12px !important; width: 100% !important; }
.hc-transport-card { border: 2px solid var(--hc-border) !important; border-radius: 12px !important; padding: 16px !important; text-align: center !important; cursor: pointer !important; background: var(--hc-surface) !important; display: flex !important; flex-direction: column !important; justify-content: space-between !important; height: 100% !important; }
.hc-transport-card.selected { border-color: var(--hc-primary) !important; background: var(--hc-primary-light) !important; box-shadow: 0 0 0 4px var(--hc-surface), 0 0 0 6px var(--hc-primary-light) !important; }

/* Подсказки Яндекса поверх всего */
.ymaps-2-1-suggest { z-index: 9999999 !important; border-radius: 8px !important; overflow: hidden !important; box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important; border: 1px solid var(--hc-border) !important; }

.hc-toast { position: fixed !important; bottom: 30px !important; right: 30px !important; background: var(--hc-text) !important; color: #fff !important; padding: 16px 24px !important; border-radius: 8px !important; font-weight: 600 !important; transform: translateY(100px) !important; opacity: 0 !important; transition: 0.3s !important; z-index: 9999999 !important; box-shadow: var(--hc-shadow-lg) !important; }
.hc-toast.show { transform: translateY(0) !important; opacity: 1 !important; }

@media (max-width: 768px) {
  .hc-grid-3, .hc-grid-2 { grid-template-columns: 1fr !important; }
  .hc-col-2 { grid-column: span 1 !important; }
  .hc-step-label { display: none !important; }
  .hc-step-panel.active { padding: 16px !important; }
}
body .ymaps-2-1-suggest { 
    z-index: 9999999 !important; 
    border-radius: 8px !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important; 
    border: 1px solid var(--hc-border) !important; 
}
.hc-transport-card {
  position: relative; /* убедитесь что это есть */
}

.hc-recommended-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hc-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
/* ==========================================
   НОВЫЕ КЛАССЫ ДЛЯ ДЕСКТОПА (замена инлайн-стилей)
========================================== */
.hc-auto-recalc-box {
  background: var(--hc-surface-offset) !important;
  border-radius: 8px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  padding: 8px 16px !important;
  font-size: 20px !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.hc-price-input {
  color: green !important;
  font-weight: 700 !important;
  font-size: 22px !important;
}

.hc-price-unit {
  font-weight: 700 !important;
  color: green !important;
  font-size: 22px !important;
}

/* ==========================================
   ИСПРАВЛЕНИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
========================================== */
@media (max-width: 768px) {
  .hc-grid-3, .hc-grid-2 { grid-template-columns: 1fr !important; }
  .hc-col-2 { grid-column: span 1 !important; }
  .hc-step-label { display: none !important; }
  .hc-step-panel.active { padding: 16px !important; }

  /* 1. Центрируем шаги и не даем им распирать экран */
  .hc-stepper { padding: 12px 16px !important; }
  .hc-step-connector { margin: 0 8px !important; min-width: 10px !important; }

  /* 2. Сжимаем табы (штуки/кубы), чтобы они стояли в ряд */
  .hc-tabs { display: flex !important; flex-wrap: nowrap !important; }
  .hc-tab-btn { 
    font-size: 13px !important; 
    padding: 10px 4px !important; 
    line-height: 1.2 !important; 
    white-space: normal !important;
  }

  /* 3. Уменьшаем шрифт и отступы в плашке автопересчета */
  .hc-auto-recalc-box { 
    font-size: 15px !important; 
    gap: 8px !important; 
    padding: 10px !important; 
    justify-content: center !important; 
  }

  /* 4. Уменьшаем огромные ценники, чтобы они влезали в инпуты */
  .hc-price-input { font-size: 16px !important; }
  .hc-price-unit { font-size: 16px !important; }
  
  /* Отодвигаем текст, чтобы он не залезал под символ ₽ */
  .hc-input-wrap input.hc-price-input { padding-right: 50px !important; }
}