/* =========================================================
   Cookie-баннер согласия для hmrn.ru (стейдж, шаблон simai.sovet).
   Подключаемый файл, не инлайн. Аддитивный слой.
   Необходимые cookie работают всегда, аналитические - только по согласию.
   Баннер слева снизу, чтобы не перекрывать переключатель концепций справа.
   ========================================================= */

.hm-cc, .hm-cc * { box-sizing: border-box; }

.hm-cc-banner{
  position: fixed; left: 20px; bottom: 20px; z-index: 99990;
  width: 460px; max-width: calc(100vw - 40px);
  background: #ffffff; color: #1c2330;
  border: 1px solid #d9dee8; border-radius: 14px;
  box-shadow: 0 12px 40px rgba(13, 36, 64, 0.22);
  padding: 18px 20px 16px; font: 400 14px/1.5 Arial, Helvetica, sans-serif;
}
.hm-cc-banner h2{ margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #0d2440; }
.hm-cc-banner p{ margin: 0 0 14px; color: #39435a; }
.hm-cc-banner a{ color: #1f5fae; text-decoration: underline; }
.hm-cc-actions{ display: flex; flex-wrap: wrap; gap: 8px; }

.hm-cc-btn{
  font: 600 13px/1 Arial, Helvetica, sans-serif; cursor: pointer;
  border-radius: 9px; padding: 11px 16px; border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.hm-cc-btn-primary{ background: #0d2440; color: #fff; }
.hm-cc-btn-primary:hover{ background: #16335c; }
.hm-cc-btn-secondary{ background: #eef1f6; color: #1c2330; }
.hm-cc-btn-secondary:hover{ background: #e2e7f0; }
.hm-cc-btn-ghost{ background: transparent; color: #1c2330; border-color: #c7cedb; }
.hm-cc-btn-ghost:hover{ background: #f2f4f8; }
.hm-cc-btn:focus-visible{ outline: 3px solid #ffbf47; outline-offset: 2px; }

.hm-cc-overlay{
  position: fixed; inset: 0; z-index: 99995; display: none;
  background: rgba(10, 20, 40, 0.55); padding: 20px;
  align-items: center; justify-content: center;
}
.hm-cc-overlay.is-open{ display: flex; }
.hm-cc-modal{
  width: 560px; max-width: 100%; max-height: 90vh; overflow: auto;
  background: #fff; color: #1c2330; border-radius: 16px; padding: 24px 24px 20px;
  font: 400 14px/1.55 Arial, Helvetica, sans-serif;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.hm-cc-modal h2{ margin: 0 0 6px; font-size: 19px; color: #0d2440; }
.hm-cc-intro{ margin: 0 0 18px; color: #39435a; }
.hm-cc-cat{
  border: 1px solid #e1e6ef; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px;
}
.hm-cc-cat-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hm-cc-cat-title{ font-weight: 700; color: #0d2440; }
.hm-cc-cat-desc{ margin: 8px 0 0; color: #4a5468; font-size: 13px; }
.hm-cc-fixed{ font-size: 12px; font-weight: 700; color: #1f7a3d; white-space: nowrap; }

.hm-cc-switch{ position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.hm-cc-switch input{ position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hm-cc-slider{ position: absolute; inset: 0; background: #c7cedb; border-radius: 999px; transition: background .15s; }
.hm-cc-slider::before{ content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.hm-cc-switch input:checked + .hm-cc-slider{ background: #1f7a3d; }
.hm-cc-switch input:checked + .hm-cc-slider::before{ transform: translateX(20px); }
.hm-cc-switch input:focus-visible + .hm-cc-slider{ outline: 3px solid #ffbf47; outline-offset: 2px; }
.hm-cc-modal-actions{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.hm-cc-reopen{
  position: fixed; left: 20px; bottom: 20px; z-index: 99980;
  display: none; align-items: center; gap: 7px;
  background: #0d2440; color: #fff; border: none; cursor: pointer;
  border-radius: 999px; padding: 9px 14px; font: 600 12px/1 Arial, Helvetica, sans-serif;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); opacity: 0.92;
}
.hm-cc-reopen:hover{ opacity: 1; }
.hm-cc-reopen.is-on{ display: inline-flex; }
.hm-cc-reopen:focus-visible{ outline: 3px solid #ffbf47; outline-offset: 2px; }

@media (max-width: 600px){
  .hm-cc-banner{ left: 12px; right: 12px; bottom: 12px; width: auto; }
  .hm-cc-reopen{ left: 12px; bottom: 12px; }
}
@media print{ .hm-cc-banner, .hm-cc-overlay, .hm-cc-reopen{ display: none !important; } }
