/* Brook Drive — окно согласия на cookies (includes/consent.php, assets/js/consent.js).
   Плашка внизу слева (на телефоне — шторка снизу) + окно настроек на <dialog>. Логические свойства — для RTL (ar).
   z-index 99980 — ниже окон Reserve / Call back (99990). */
.bdc { --bdc-ink: #231F20; --bdc-ink2: #3a3435; --bdc-red: #E32320; --bdc-line: #E5E1E1; --bdc-mut: #6B6466; --bdc-text: #4a4446; --bdc-tint: #F6F4F4;
  font-family: "Archivo", "Proxima Nova", Arial, sans-serif; color: var(--bdc-ink); -webkit-font-smoothing: antialiased; }
.bdc *, .bdc *::before, .bdc *::after { box-sizing: border-box; }
.bdc :focus-visible { outline: 2px solid var(--bdc-red); outline-offset: 2px; }

/* --- плашка --- */
.bdc-bar { position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 99980; width: min(440px, calc(100vw - 40px));
  padding: 22px 22px 18px; background: #fff; border: 1px solid var(--bdc-line); border-radius: 18px;
  box-shadow: 0 20px 50px -14px rgba(26, 23, 24, .30), 0 2px 6px rgba(26, 23, 24, .06); }
.bdc-bar[hidden] { display: none; }
.bdc-bar.is-in { animation: bdc-in .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bdc-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.bdc-bar__title { margin: 0 0 8px; font-size: 17px; font-weight: 650; line-height: 1.3; }
.bdc-bar__text { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; color: var(--bdc-text); }
.bdc-bar__text a, .bdc-dlg__intro a { color: var(--bdc-ink); text-decoration: underline; text-underline-offset: 2px; }
.bdc-bar__text a:hover, .bdc-dlg__intro a:hover { color: var(--bdc-red); }

/* --- кнопки: одного размера; «Принять» — чёрная, «Отклонить» — контурная, но так же заметная --- */
.bdc-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bdc-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 16px; margin: 0;
  border: 1px solid var(--bdc-ink); border-radius: 12px; background: var(--bdc-ink); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.15; text-align: center; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s; }
.bdc-btn:hover { background: var(--bdc-ink2); border-color: var(--bdc-ink2); }
.bdc-btn--ghost { background: #fff; color: var(--bdc-ink); border-color: #CFC9C9; }
.bdc-btn--ghost:hover { background: #fff; border-color: var(--bdc-ink); }
.bdc-btn--ok { background: var(--bdc-ink); border-color: var(--bdc-ink); color: #fff; }
.bdc-btn--ok:hover { background: var(--bdc-ink2); border-color: var(--bdc-ink2); }
.bdc-more { appearance: none; display: inline-block; margin: 14px 0 0; padding: 2px 0; border: 0; background: none;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--bdc-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bdc-more:hover { color: var(--bdc-red); }

/* --- окно настроек --- */
.bdc-dlg { width: min(640px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 780px); margin: auto; padding: 0;
  border: 0; border-radius: 20px; background: #fff; color: var(--bdc-ink); overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.bdc-dlg[open] { display: flex; flex-direction: column; }
.bdc-dlg::backdrop { background: rgba(18, 16, 17, .62); }
.bdc-dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; padding-inline: 24px 20px; border-bottom: 1px solid var(--bdc-line); }
.bdc-dlg__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; }
.bdc-x { flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--bdc-line); border-radius: 50%;
  background: #fff; color: var(--bdc-ink); cursor: pointer; transition: border-color .15s; }
.bdc-x:hover { border-color: var(--bdc-ink); }
.bdc-x svg { width: 16px; height: 16px; }
.bdc-dlg__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 8px; }
.bdc-dlg__intro { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: var(--bdc-text); }

.bdc-cat { margin: 0 0 12px; padding: 16px 18px; border: 1px solid var(--bdc-line); border-radius: 14px; }
.bdc-cat__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.bdc-cat__name { display: block; margin: 0 0 4px; font-size: 16px; font-weight: 650; line-height: 1.3; cursor: pointer; }
.bdc-cat__desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--bdc-mut); }
.bdc-always { flex: none; margin-top: 1px; padding: 5px 10px; border-radius: 999px; background: var(--bdc-tint); font-size: 13px; font-weight: 600; color: var(--bdc-ink); white-space: nowrap; }

/* переключатель */
.bdc-sw { flex: none; position: relative; width: 48px; height: 28px; margin: 0; appearance: none; -webkit-appearance: none;
  border-radius: 999px; background: #CFC9C9; cursor: pointer; transition: background-color .18s; }
.bdc-sw::before { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: inset-inline-start .18s; }
.bdc-sw:checked { background: var(--bdc-ink); }
.bdc-sw:checked::before { inset-inline-start: 23px; }

/* список cookies */
.bdc-cat details { margin-top: 12px; }
.bdc-cat summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--bdc-ink); cursor: pointer; }
.bdc-cat summary::-webkit-details-marker { display: none; }
.bdc-cat summary::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform .15s; }
.bdc-cat details[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.bdc-cat summary:hover { color: var(--bdc-red); }
.bdc-tbl { width: 100%; margin: 10px 0 2px; border-collapse: collapse; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.bdc-tbl th, .bdc-tbl td { padding-block: 8px; padding-inline: 0 10px; border-top: 1px solid var(--bdc-line); text-align: start; vertical-align: top; }
.bdc-tbl th { padding-top: 0; border-top: 0; font-weight: 600; color: var(--bdc-mut); }
.bdc-tbl td:first-child { font-weight: 600; color: var(--bdc-ink); white-space: nowrap; }
.bdc-tbl td { color: var(--bdc-text); }

.bdc-dlg__foot { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--bdc-line); background: #fff; }
.bdc-dlg__foot .bdc-btn { flex: 1 1 0; }
.bdc-dlg__foot .bdc-btn--ok { flex: 1.25 1 0; }

/* подтверждение после выбора */
.bdc-toast { position: fixed; inset-inline-start: 50%; bottom: 24px; z-index: 99981; padding: 12px 18px; border-radius: 12px; background: var(--bdc-ink); color: #fff;
  font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .4); transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
[dir="rtl"] .bdc-toast { transform: translateX(50%); }
.bdc-toast.is-on { opacity: 1; }

/* телефон: плашка — шторка снизу, окно настроек — лист снизу */
@media (max-width: 600px) {
  .bdc-bar { inset-inline: 0; bottom: 0; width: auto; padding: 18px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 36px -12px rgba(26, 23, 24, .28); }
  .bdc-bar__title { font-size: 16px; }
  .bdc-bar__text { margin-bottom: 14px; font-size: 14px; }
  .bdc-more { display: block; margin: 12px auto 0; }
  .bdc-dlg { width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .bdc-dlg__head { padding-block: 14px; padding-inline: 16px 14px; }
  .bdc-dlg__title { font-size: 18px; }
  .bdc-dlg__body { padding: 16px 16px 6px; }
  .bdc-cat { padding: 14px; }
  .bdc-tbl { font-size: 12.5px; }
  .bdc-dlg__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .bdc-dlg__foot .bdc-btn { flex: 1 1 100%; }
  .bdc-dlg__foot .bdc-btn--ok { order: -1; }
  .bdc-toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .bdc-bar.is-in { animation: none; }
  .bdc *, .bdc-toast { transition: none !important; }
}
