/*
 * Vzhled lišty Cookie-Script podle cookie lišty ippacafe.cz (návod: docs/cookie-script/README.md).
 * Načítá ho storefront sám (`ConsentProvider`, jen při poskytovateli Cookie-Script), do
 * administrace Cookie-Script se nevkládá – Custom CSS tam mají jen placené tarify. Selektory
 * míří jen na třídy a ID lišty. Mock (`src/lib/web/consent/cookie-script-mock.ts`) staví stejný
 * DOM, takže tento soubor je jediný zdroj vzhledu pro obojí.
 *
 * !important je záměrně: přebíjí výchozí styly Cookie-Script, které mají vlastní specificitu.
 */

/* Modální dialogy storefrontu (Radix – např. promo popup) dávají na `body` `pointer-events:none`;
   lišta musí jít ovládat i nad nimi. */
.cookiescript_banner_container,
.cookiescript_banner_view {
  pointer-events: auto !important;
}

/* ---------- 1. vrstva: pruh dole přes celou šířku ---------- */

.cookiescript_banner_view_firstLayer {
  position: fixed !important;
  inset: auto 0 0 0 !important;
  width: 100% !important;
  max-width: none !important;
  max-height: 50vh !important;
  overflow: auto !important;
  z-index: 2147483000 !important;
  margin: 0 !important;
  padding: 22.5px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  background: rgba(40, 40, 40, 0.88) !important;
  color: #d7d7d7 !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 20px !important;
  line-height: 30px !important;
  font-weight: 400 !important;
  text-align: center !important;
  -webkit-font-smoothing: antialiased;
  transition: all 0.2s ease-in-out;
}

.cookiescript_banner_view_firstLayer .cookiescript_injected {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  border: 0 !important;
}

@media screen and (max-width: 1259px) {
  .cookiescript_banner_view_firstLayer .cookiescript_injected {
    padding: 0 25px !important;
  }
}

.cookiescript_banner_view_firstLayer .cookiescript_bnr_header {
  display: block !important;
  width: 100% !important;
  max-width: 1056px !important;
  margin: 0 0 7.5px !important;
  padding: 0 !important;
}

/* Nadpis „Cookies“ s ikonou sušenky (Font Awesome cookie-bite, stejná jako na předloze). */
.cookiescript_banner_view_firstLayer .cookiescript_title,
.cookiescript_fsd_header_wrapper::before {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #d7d7d7 !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 22.4px !important;
  line-height: 25.2px !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.cookiescript_banner_view_firstLayer .cookiescript_title::before,
.cookiescript_fsd_header_wrapper::before {
  background-repeat: no-repeat;
  background-size: 22.39px 24px;
}

.cookiescript_banner_view_firstLayer .cookiescript_title::before {
  content: '';
  display: inline-block;
  position: relative;
  top: 4px;
  width: 22.39px;
  height: 24px;
  margin: -4px 7px 0 -3px;
  vertical-align: top;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23d7d7d7' d='M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 0 0-57.79 57.81l-35.1 68.88a132.645 132.645 0 0 0-12.82 80.95l12.08 76.27a132.521 132.521 0 0 0 37.16 72.96l54.77 54.76a132.036 132.036 0 0 0 72.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0 0 57.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z'/%3E%3C/svg%3E");
}

/* Předloha nemá zavírací křížek ani jazykový přepínač. Patička „Powered by CookieScript“
   zůstává – odstranění brandingu je součást placeného tarifu, ne práce pro naše CSS. */
.cookiescript_banner_view_firstLayer .cookiescript_close_btn_container,
.cookiescript_banner_view_firstLayer .cookiescript_switch_container {
  display: none !important;
}

.cookiescript_banner_view_firstLayer .cookiescript_settings_wrapper {
  width: 100% !important;
  max-width: 1056px !important;
  max-height: none !important;
  margin: 0 0 7.5px !important;
  padding: 0 !important;
  overflow: visible !important;
  box-shadow: none !important;
}

.cookiescript_banner_view_firstLayer .cookiescript_description,
.cookiescript_banner_view_firstLayer .cookiescript_description_text {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #d7d7d7 !important;
  font-size: 20px !important;
  line-height: 30px !important;
  text-align: center !important;
}

.cookiescript_banner_view_firstLayer .cookiescript_description a {
  color: inherit !important;
  text-decoration: underline !important;
}

/* Tlačítka: NASTAVENÍ (šedé) · SOUHLASÍM (modré), pod nimi „Souhlas můžete odmítnout zde.“ */
.cookiescript_banner_view_firstLayer .cookiescript_btn_container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.cookiescript_banner_view_firstLayer #cookiescript_manage {
  order: 1;
}

.cookiescript_banner_view_firstLayer #cookiescript_accept {
  order: 2;
}

.cookiescript_banner_view_firstLayer #cookiescript_reject {
  order: 3;
}

.cookiescript_banner_view #cookiescript_accept,
.cookiescript_banner_view #cookiescript_manage,
.cookiescript_banner_view #cookiescript_save {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 36px !important;
  margin: 8px 30px !important;
  padding: 6px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background-color: transparent !important;
  background-image: linear-gradient(#86a0c2, #86a0c2) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  background-position: 0 100% !important;
  color: #fff !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 16px !important;
  line-height: 24px !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transition: all 0.2s ease-in-out !important;
}

.cookiescript_banner_view #cookiescript_manage,
.cookiescript_banner_view #cookiescript_save {
  background-image: linear-gradient(#a0a0a0, #a0a0a0) !important;
}

/* Hover/focus předlohy: výplň „spadne“ do 1px linky dole a text převezme její barvu. */
.cookiescript_banner_view #cookiescript_accept:hover,
.cookiescript_banner_view #cookiescript_accept:focus {
  background-color: transparent !important;
  background-size: 100% 1px !important;
  color: #86a0c2 !important;
}

.cookiescript_banner_view #cookiescript_manage:hover,
.cookiescript_banner_view #cookiescript_manage:focus,
.cookiescript_banner_view #cookiescript_save:hover,
.cookiescript_banner_view #cookiescript_save:focus {
  background-color: transparent !important;
  background-size: 100% 1px !important;
  color: #a0a0a0 !important;
}

/* „Odmítnout“ jako textový odkaz na vlastním řádku. Popisek tlačítka v administraci = „zde“,
   zbytek věty doplní CSS podle jazyka lišty (`lang` na dialogu). inline-block zastaví
   podtržení tlačítka, aby bylo podtržené jen „zde“ jako na předloze. */
.cookiescript_banner_view_firstLayer #cookiescript_reject {
  display: block !important;
  flex-basis: 100% !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 12.5px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #d7d7d7 !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 20px !important;
  line-height: 30px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  text-decoration: underline !important;
  letter-spacing: normal !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

.cookiescript_banner_view_firstLayer #cookiescript_reject:hover {
  color: #86a0c2 !important;
  text-decoration: none !important;
}

.cookiescript_banner_view_firstLayer #cookiescript_reject::before,
.cookiescript_banner_view_firstLayer #cookiescript_reject::after {
  display: inline-block;
  color: #d7d7d7;
  text-decoration: none;
  white-space: pre;
}

.cookiescript_banner_view_firstLayer[lang='cs'] #cookiescript_reject::before {
  content: 'Souhlas můžete odmítnout ';
}

.cookiescript_banner_view_firstLayer[lang='en'] #cookiescript_reject::before {
  content: 'You can decline consent ';
}

.cookiescript_banner_view_firstLayer #cookiescript_reject::after {
  content: '.';
}

/* ---------- 2. vrstva (Nastavení): bílý modal s přepínači kategorií ---------- */

.cookiescript_banner_view_secondLayer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 20px !important;
  overflow: auto !important;
  background: rgba(10, 10, 10, 0.86) !important;
  font-family: brandon-grotesque, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

.cookiescript_banner_view_secondLayer .cookiescript_injected_wrapper {
  width: 100% !important;
  max-width: 800px !important;
  height: auto !important;
  max-height: calc(100vh - 40px) !important;
  margin: auto !important;
  padding: 0 !important;
  border: 0 !important;
}

.cookiescript_fsd_wrapper {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  max-height: calc(100vh - 40px) !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  background: #fff !important;
  color: #32394d !important;
}

.cookiescript_fsd_header_wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 20px !important;
  border-bottom: 1px solid #dbdbdb !important;
  border-radius: 6px 6px 0 0 !important;
  background: #fff !important;
}

/* Nadpis „Cookies – nastavení“ – druhá vrstva Cookie-Script vlastní nadpis nemá. */
.cookiescript_fsd_header_wrapper::before {
  padding-left: 34px !important;
  color: #32394d !important;
  text-align: left !important;
  background-position: 0 50%;
  background-size: 23.5px 25.2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%2332394d' d='M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 0 0-57.79 57.81l-35.1 68.88a132.645 132.645 0 0 0-12.82 80.95l12.08 76.27a132.521 132.521 0 0 0 37.16 72.96l54.77 54.76a132.036 132.036 0 0 0 72.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0 0 57.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z'/%3E%3C/svg%3E");
}

.cookiescript_banner_view_secondLayer[lang='cs'] .cookiescript_fsd_header_wrapper::before {
  content: 'Cookies - nastavení';
}

.cookiescript_banner_view_secondLayer[lang='en'] .cookiescript_fsd_header_wrapper::before {
  content: 'Cookies - settings';
}

.cookiescript_fsd_header_wrapper .cookiescript_logo_container,
.cookiescript_fsd_header_wrapper .cookiescript_language_container,
.cookiescript_fsd_tab_wrapper,
.cookiescript_fsd_tab_container .cookiescript_scroll_shadow_vertical_wrapper,
.cookiescript_banner_view_secondLayer #cookiescript_reject,
.cookiescript_fsd_declaration_item_arrow,
.cookiescript_fsd_declaration_item_cookie_count,
.cookiescript_fsd_declaration_item_content {
  display: none !important;
}

.cookiescript_fsd_header_btns_container {
  display: flex !important;
  align-items: center !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_close_btn {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #000 !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 30px !important;
  line-height: 20px !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_close_btn:hover {
  opacity: 0.8 !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_xmark {
  display: none !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_close_btn::after {
  content: '×';
}

.cookiescript_fsd_tab_container {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  margin: 0 !important;
  padding: 20px 20px 0 !important;
}

.cookiescript_fsd_tab_content,
.cookiescript_fsd_tab_pane {
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  box-shadow: none !important;
}

.cookiescript_fsd_declaration_item {
  margin: 0 !important;
  padding: 15px 0 !important;
  border: 0 !important;
  border-top: 1px solid #dbdbdb !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.cookiescript_fsd_declaration_item:first-child {
  padding-top: 0 !important;
  border-top: 0 !important;
}

.cookiescript_fsd_declaration_item_header {
  display: flex !important;
  flex-direction: row-reverse !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 7.5px !important;
  padding: 0 !important;
}

.cookiescript_fsd_declaration_item_action_btn {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  cursor: default !important;
  pointer-events: none !important;
}

.cookiescript_fsd_declaration_title {
  color: #32394d !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 18px !important;
  line-height: 27px !important;
  font-weight: 700 !important;
}

.cookiescript_fsd_declaration_item_description {
  margin: 0 !important;
  padding: 0 !important;
  color: #32394d !important;
  font-family: brandon-grotesque, sans-serif !important;
  font-size: 14px !important;
  line-height: 26px !important;
}

/* Přepínač jako Buefy `switch is-rounded` předlohy. */
.cookiescript_banner_view_secondLayer .cookiescript_switch {
  position: relative !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  width: 49.5px !important;
  height: 28.35px !important;
  margin: 0 !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_switch input {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  opacity: 0 !important;
  cursor: pointer !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_switch_bg {
  position: absolute !important;
  inset: 0 !important;
  border-radius: 18px !important;
  background: #b5b5b5 !important;
  transition: background 0.15s ease-out !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_switch_knob {
  position: absolute !important;
  top: 3.6px !important;
  left: 3.6px !important;
  z-index: 1 !important;
  width: 21.15px !important;
  height: 21.15px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 3px 3px rgba(10, 10, 10, 0.1) !important;
  transform: none !important;
  transition: transform 0.15s ease-out !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_switch input:checked ~ .cookiescript_switch_bg,
.cookiescript_banner_view_secondLayer
  .cookiescript_switch
  input[aria-checked='true']
  ~ .cookiescript_switch_bg {
  background: #86a0c2 !important;
}

.cookiescript_banner_view_secondLayer
  .cookiescript_switch
  input:checked
  ~ .cookiescript_switch_knob,
.cookiescript_banner_view_secondLayer
  .cookiescript_switch
  input[aria-checked='true']
  ~ .cookiescript_switch_knob {
  transform: translateX(21.15px) !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_switch_disabled {
  opacity: 0.5 !important;
}

.cookiescript_banner_view_secondLayer .cookiescript_switch_disabled input {
  cursor: not-allowed !important;
}

.cookiescript_fsd_bottom {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 20px 5px !important;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

/* VYBRANÝCH (šedé) vlevo, VŠECH (modré) vpravo. */
.cookiescript_fsd_bottom #cookiescript_save {
  order: 1;
  margin: 15px 30px 15px 0 !important;
}

.cookiescript_fsd_bottom #cookiescript_accept {
  order: 2;
  margin: 15px 0 15px 30px !important;
}

.cookiescript_fsd_bottom #cookiescript_accept,
.cookiescript_fsd_bottom #cookiescript_save {
  flex: 0 1 auto !important;
  white-space: normal !important;
  text-align: center !important;
}

/* „Přijmout vše“ má v Cookie-Script jeden popisek pro obě vrstvy („Souhlasím“); v modalu
   předloha píše delší text – podle jazyka ho doplní CSS. */
.cookiescript_fsd_bottom #cookiescript_accept {
  font-size: 0 !important;
}

.cookiescript_fsd_bottom #cookiescript_accept::after {
  font-size: 16px;
  line-height: 24px;
}

.cookiescript_banner_view_secondLayer[lang='cs']
  .cookiescript_fsd_bottom
  #cookiescript_accept::after {
  content: 'Souhlasím s použitím všech cookies';
}

.cookiescript_banner_view_secondLayer[lang='en']
  .cookiescript_fsd_bottom
  #cookiescript_accept::after {
  content: 'I agree with all cookies';
}

.cookiescript_fsd_declaration_item_header:has(.cookiescript_switch_disabled)
  .cookiescript_fsd_declaration_title {
  opacity: 0.5 !important;
}

@media screen and (max-width: 1055px) {
  .cookiescript_fsd_bottom {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .cookiescript_fsd_bottom #cookiescript_save,
  .cookiescript_fsd_bottom #cookiescript_accept {
    margin: 15px 30px !important;
  }
}

/* ---------- Odznak pro změnu souhlasu (po rozhodnutí) ---------- */

.cookiescript_banner_view_badge {
  position: fixed !important;
  inset: auto auto 16px 16px !important;
  z-index: 2147482000 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#cookiescript_badge {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(40, 40, 40, 0.88) !important;
  box-shadow: 0 0 0.8125rem 1px rgba(0, 0, 0, 0.19) !important;
  opacity: 0.8 !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
}

#cookiescript_badge:hover,
#cookiescript_badge:focus-visible {
  opacity: 1 !important;
  background: #86a0c2 !important;
}

#cookiescript_badgetext,
#cookiescript_badgesvg {
  display: none !important;
}

#cookiescript_badgeimage {
  display: block !important;
  width: 22px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: no-repeat center / 22px 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23ffffff' d='M510.52 255.82c-69.97-.85-126.47-57.69-126.47-127.86-70.17 0-127-56.49-127.86-126.45-27.26-4.14-55.13.3-79.72 12.82l-69.13 35.22a132.221 132.221 0 0 0-57.79 57.81l-35.1 68.88a132.645 132.645 0 0 0-12.82 80.95l12.08 76.27a132.521 132.521 0 0 0 37.16 72.96l54.77 54.76a132.036 132.036 0 0 0 72.71 37.06l76.71 12.15c27.51 4.36 55.7-.11 80.53-12.76l69.13-35.21a132.273 132.273 0 0 0 57.79-57.81l35.1-68.88c12.56-24.64 17.01-52.58 12.91-79.91zM176 368c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm32-160c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32zm160 128c-17.67 0-32-14.33-32-32s14.33-32 32-32 32 14.33 32 32-14.33 32-32 32z'/%3E%3C/svg%3E");
}
