/*
 * The visitor choice card and the settings dialog (Laravel's light replacement for the Moove GDPR plugin).
 * Brand colour #ff1782. Neutral class names: filter lists hide elements whose names mention cookies or consent.
 */
.ob-choice,
.ob-choice-dialog {
  font-family: 'Nunito', 'Montserrat', 'Montserrat Fallback', sans-serif;
  color: #202020;
}

/*
 * The bar across the whole width at the bottom. Below the drawer (z-index 10000, addons.css), above everything else,
 * like the plugin's 9900. Up to the hamburger breakpoint refresh.css lifts it above the bottom menu.
 */
.ob-choice {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9900;
  box-sizing: border-box;
  margin: 0;
  padding: 16px max(24px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  background: #fff;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.06), 0 -16px 48px rgba(0, 0, 0, 0.16);
  animation: ob-choice-in 0.45s var(--ob-ease-out) both;
}
/* Wjeżdża od dołu ekranu, żeby ruch zwrócił na nią uwagę */
@keyframes ob-choice-in {
  from {
    transform: translateY(100%);
  }
}
/* Karta nad dolnym menu (refresh.css) unosi się krótko w górę */
@keyframes ob-choice-pop {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}
.ob-choice__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1140px;
  margin: 0 auto;
}
.ob-choice__copy {
  flex: 1 1 auto;
  min-width: 0;
}
.ob-choice__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.ob-choice__text {
  max-width: 640px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #3f3f46;
}
.ob-choice__actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.ob-choice__actions .ob-choice__btn {
  min-width: 148px;
}
/* 10 px nad i pod tekstem daje linkowi obszar dotyku jak przyciskom */
.ob-choice__link {
  margin-right: 4px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #202020;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* 14 px nad i pod tekstem daje przyciskowi 48 px wysokości; zaokrąglenie jak przycisk rezerwacji na stronie */
.ob-choice__btn {
  display: inline-block;
  padding: 14px 20px;
  border: 0;
  border-radius: var(--ob-radius, 12px);
  background: #f2f2f4;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: #202020;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.ob-choice__btn--primary {
  background: linear-gradient(90deg, #ff1782 0%, #e0006f 100%);
  box-shadow: 0 6px 18px rgba(255, 23, 130, 0.3);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .ob-choice__btn:hover {
    background: #e6e6ea;
    color: #202020;
    text-decoration: none;
  }

  .ob-choice__btn--primary:hover {
    background: linear-gradient(90deg, #e8086f 0%, #c90063 100%);
    box-shadow: 0 8px 22px rgba(255, 23, 130, 0.38);
    color: #fff;
  }

  .ob-choice__link:hover {
    color: #202020;
  }
}
.ob-choice__btn:focus-visible,
.ob-choice__link:focus-visible,
.ob-choice-dialog__close:focus-visible,
.ob-switch input:focus-visible + .ob-switch__track {
  outline: 3px solid #202020;
  outline-offset: 2px;
}

.ob-choice-dialog {
  position: fixed;
  inset: 0;
  z-index: 9910;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ob-choice-dialog[hidden],
.ob-choice-dialog [hidden] {
  display: none;
}
.ob-choice-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.ob-choice-dialog__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  max-height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.22);
  outline: 0;
}
.ob-choice-dialog__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f4;
  font-size: 15px;
  color: #202020;
  cursor: pointer;
}
.ob-choice-dialog__body {
  overflow-y: auto;
  padding: 24px 24px 4px;
  font-size: 14px;
  line-height: 1.5;
}
.ob-choice-dialog__title {
  margin: 0 0 6px;
  padding-right: 44px;
  font-size: 20px;
  line-height: 1.3;
}
.ob-choice-dialog__intro {
  margin: 0 0 6px;
  color: #5f5f66;
}
/* Opis po lewej, przełącznik po prawej */
.ob-choice-dialog__category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid #f0f0f2;
}
.ob-choice-dialog__category h3 {
  grid-column: 1;
  margin: 0 0 3px;
  font-size: 15px;
}
.ob-choice-dialog__category p {
  grid-column: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #5f5f66;
}
.ob-choice-dialog__category .ob-switch {
  grid-column: 2;
  grid-row: 1 / span 3;
  margin-top: 2px;
}
.ob-choice-dialog .ob-choice-dialog__always {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #e0006b;
}
.ob-choice-dialog__status {
  margin: 8px 0 12px;
  font-weight: 700;
  color: #0a7a3d;
}
.ob-choice-dialog__status:empty {
  margin: 0;
}
/* Zapisz wybór na całą szerokość, pod nim Odrzuć i Akceptuj obok siebie */
.ob-choice-dialog__foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 24px 20px;
  border-top: 1px solid #f0f0f2;
  background: #fafafb;
}
.ob-choice-dialog__save {
  grid-column: 1 / -1;
}

/* The settings page (/ustawienia-prywatnosci/) shows the same panel in the page flow. */
.ob-choice-dialog--page {
  position: static;
  display: block;
  padding: 0;
  margin: var(--ob-space-5) 0 var(--ob-space-7);
}
.ob-choice-dialog--page .ob-choice-dialog__panel {
  margin: 0 auto;
  border: 1px solid #e5e5e5;
  box-shadow: none;
}
/* Na stronie ustawień tytuł jest już w nagłówku strony */
.ob-choice-dialog--page .ob-choice-dialog__title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ob-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.ob-switch input {
  position: absolute;
  opacity: 0;
}
.ob-switch__track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #bbb;
  transition: background 0.2s;
}
.ob-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s var(--ob-ease-out);
}
.ob-switch input:checked + .ob-switch__track {
  background: #ff1782;
}
.ob-switch input:checked + .ob-switch__track::after {
  transform: translateX(20px);
}
.ob-switch input:disabled + .ob-switch__track {
  opacity: 0.4;
}
/* Stan przełącznika czyta czytnik ekranu, widać go po kolorze */
.ob-switch__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Na telefonie tekst nad przyciskami, Odrzuć i Akceptuj po połowie, Ustawienia pod nimi */
@media (max-width: 760px) {
  .ob-choice {
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
  }
  .ob-choice__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .ob-choice__title {
    font-size: 17px;
  }
  .ob-choice__text {
    font-size: 14px;
  }
  .ob-choice__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ob-choice__actions .ob-choice__btn {
    min-width: 0;
  }
  .ob-choice__link {
    grid-column: 1 / -1;
    order: 1;
    justify-self: center;
    margin: -4px 0 -8px;
    padding: 8px 12px;
  }
}

@media (max-width: 600px) {
  .ob-choice-dialog__body {
    padding-right: 20px;
    padding-left: 20px;
  }
  .ob-choice-dialog__foot {
    padding: 14px 16px 16px;
  }
  .ob-choice-dialog__foot .ob-choice__btn {
    padding: 12px 6px;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ob-choice {
    animation: none;
  }
  .ob-switch__track,
  .ob-switch__track::after {
    transition: none;
  }
}
