/* piskotkiGDPR v2.3.20 | (c) Agencija Pakt d.o.o. | EULA: LICENSE.txt */

/* --- Backdrop --- */

#piskotki-gdpr-backdrop {
  display: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
}

/* --- Popup container --- */

#piskotki-gdpr {
  display: none;
  box-sizing: border-box;
  transform: none;
  position: fixed;
  width: min(465px, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: min(calc(100dvh - 16px), calc(100vh - 16px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  contain: layout;
  padding: 13px 20px;
  z-index: 999999;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  text-align: center;
  color: var(--pgdpr-font-color, #fff);
  font-size: var(--pgdpr-font-size, 14px);
  background: var(--pgdpr-bg, #171717);
  box-shadow: var(--pgdpr-shadow);
  border-radius: var(--pgdpr-radius);
  border: none;
  outline: none;
  scale: 1;
}

#piskotki-gdpr:focus,
#piskotki-gdpr:focus-visible {
  border: none !important;
  outline: none !important;
  outline-offset: 0;
}

#piskotki-gdpr * {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

/* --- Popup positions --- */

#piskotki-gdpr.piskotki-gdpr-top-left {
  top: 30px;
  left: 30px;
}

#piskotki-gdpr.piskotki-gdpr-top {
  top: 5px;
  right: 50%;
  transform: translateX(50%);
}

#piskotki-gdpr.piskotki-gdpr-top-right {
  top: 30px;
  right: 30px;
}

#piskotki-gdpr.piskotki-gdpr-right {
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
}

#piskotki-gdpr.piskotki-gdpr-bottom-right {
  bottom: 30px;
  right: 30px;
}

#piskotki-gdpr.piskotki-gdpr-bottom {
  bottom: 5px;
  right: 50%;
  transform: translateX(50%);
}

#piskotki-gdpr.piskotki-gdpr-bottom-left {
  bottom: 30px;
  left: 30px;
}

#piskotki-gdpr.piskotki-gdpr-left {
  top: 50%;
  left: 30px;
  transform: translateY(-50%);
}

#piskotki-gdpr.piskotki-gdpr-center {
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  user-select: none;
}

/* --- Popup positions: mobile --- */

@media (max-width: 525px) {
  #piskotki-gdpr.piskotki-gdpr-top-left,
  #piskotki-gdpr.piskotki-gdpr-top,
  #piskotki-gdpr.piskotki-gdpr-top-right,
  #piskotki-gdpr.piskotki-gdpr-right,
  #piskotki-gdpr.piskotki-gdpr-bottom-right,
  #piskotki-gdpr.piskotki-gdpr-bottom,
  #piskotki-gdpr.piskotki-gdpr-bottom-left,
  #piskotki-gdpr.piskotki-gdpr-left,
  #piskotki-gdpr.piskotki-gdpr-center {
    width: auto;
    max-width: none;
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    transform: none;
  }

  #piskotki-gdpr.piskotki-gdpr-top-left,
  #piskotki-gdpr.piskotki-gdpr-top,
  #piskotki-gdpr.piskotki-gdpr-top-right {
    top: max(0px, env(safe-area-inset-top, 0px));
    bottom: inherit;
  }

  #piskotki-gdpr.piskotki-gdpr-right,
  #piskotki-gdpr.piskotki-gdpr-bottom-right,
  #piskotki-gdpr.piskotki-gdpr-bottom,
  #piskotki-gdpr.piskotki-gdpr-bottom-left,
  #piskotki-gdpr.piskotki-gdpr-left {
    top: inherit;
    bottom: max(0px, env(safe-area-inset-bottom, 0px));
  }

  #piskotki-gdpr.piskotki-gdpr-center {
    top: inherit;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
}

/* --- Popup typography --- */

#piskotki-gdpr p {
  font-weight: 400;
  line-height: 1.6em;
  text-align: left;
  color: var(--pgdpr-font-color, inherit);
  font-family: inherit;
  font-size: var(--pgdpr-font-size, 14px);
  letter-spacing: inherit;
}

#piskotki-gdpr p strong {
  font-weight: bolder;
  font-size: 1.18em;
}

#piskotki-gdpr a {
  text-decoration: underline;
  font-weight: 400;
  line-height: 25px;
  text-align: left;
  color: inherit;
  font-family: inherit;
  font-size: 1.18em;
  letter-spacing: inherit;
}

/* --- Popup content sections --- */

#piskotki-gdpr .piskotki-gdpr-title {
  margin-top: 10px;
}

#piskotki-gdpr .piskotki-gdpr-title span {
  font-weight: bolder;
  font-size: var(--pgdpr-title-size);
}

#piskotki-gdpr .piskotki-gdpr-main-text {
  margin-top: 10px;
}

/* --- Popup input area --- */

#piskotki-gdpr .piskotki-gdpr-input {
  user-select: none;
}

#piskotki-gdpr .piskotki-gdpr-input input {
  vertical-align: middle;
  cursor: pointer;
}

#piskotki-gdpr .piskotki-gdpr-input input:disabled {
  cursor: not-allowed;
  pointer-events: none;
}

#piskotki-gdpr .piskotki-gdpr-input label {
  font-size: var(--pgdpr-font-size, 12px);
  color: var(--pgdpr-font-color, inherit);
  margin-right: 10px;
  cursor: pointer;
}

#piskotki-gdpr .piskotki-gdpr-input input[type=checkbox]:disabled + label {
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Popup buttons area --- */

#piskotki-gdpr .piskotki-gdpr-center {
  margin: 15px auto;
  user-select: none;
}

@media (max-width: 374px) {
  #piskotki-gdpr .piskotki-gdpr-center {
    margin: 10px auto;
  }
}

/* --- Main button (accept) --- */

#piskotki-gdpr .piskotki-gdpr-btn {
  padding: 8px 28px;
  display: inline-block;
  text-align: center;
  font-weight: bolder;
  margin: 0 15px 0;
  text-decoration: none !important;
  transition: transform .5s, border-color .5s;
  border: 2px solid rgba(0, 0, 0, .1);
  line-height: 25px;
  min-height: 24px;
  appearance: none;
  outline: none;
  cursor: pointer;
  color: var(--pgdpr-btn-color, inherit);
  font-family: inherit;
  font-size: var(--pgdpr-btn-font-size, inherit);
  vertical-align: baseline;
  letter-spacing: inherit;
  background: var(--pgdpr-btn-bg);
  border-radius: var(--pgdpr-btn-radius);
}

#piskotki-gdpr .piskotki-gdpr-btn:hover {
  transform: scale(0.95);
  border: 2px solid rgba(0, 0, 0, .2);
}

@media (max-width: 768px) {
  #piskotki-gdpr .piskotki-gdpr-btn {
    margin: 0 10px 0;
    padding: 8px 26px;
  }
}

@media (max-width: 525px) {
  #piskotki-gdpr .piskotki-gdpr-btn {
    margin: 0 5px;
    padding: 6px 22px;
  }
}

@media (max-width: 374px) {
  #piskotki-gdpr .piskotki-gdpr-btn {
    display: block;
    margin: 10px 0;
  }
}

/* --- Secondary buttons (reject, settings) --- */

#piskotki-gdpr .piskotki-gdpr-btn-sec {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  opacity: .5;
  transition: transform .5s;
  appearance: none;
  outline: none;
  cursor: pointer;
  background: transparent;
  color: var(--pgdpr-sec-color, inherit);
  font-family: inherit;
  font-size: var(--pgdpr-sec-font-size, inherit);
  vertical-align: baseline;
  letter-spacing: inherit;
  border-width: 1px;
  border-style: var(--pgdpr-sec-border-style, dotted);
  border-color: var(--pgdpr-sec-border-color, inherit);
  border-radius: var(--pgdpr-sec-radius, 3px);
  padding: 12px 14px;
  line-height: 0;
  min-width: 71px;
}

#piskotki-gdpr .piskotki-gdpr-btn-sec:hover {
  opacity: 1;
  transform: scale(0.95);
}

@media (max-width: 768px) {
  #piskotki-gdpr .piskotki-gdpr-btn-sec {
    padding: 12px 12px;
  }
}

@media (max-width: 374px) {
  #piskotki-gdpr .piskotki-gdpr-btn-sec {
    display: block;
    margin-top: 10px;
    padding: 16px 22px;
  }
}

/* --- Cookie icon (pulse animation) --- */

#piskotki-gdpr .piskotki-gdpr-icon {
  background: rgba(0, 0, 0, .1);
  border-radius: 100%;
  padding: 6px;
  display: inline-block;
  vertical-align: middle;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  position: relative;
  flex-shrink: 0;
}

#piskotki-gdpr .piskotki-gdpr-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

#piskotki-gdpr .piskotki-gdpr-icon:before {
  content: "";
  position: absolute;
  display: block;
  width: 500%;
  height: 500%;
  box-sizing: border-box;
  top: -200%;
  left: -200%;
  border-radius: 100%;
  background-color: rgba(255, 255, 255, .1);
  animation: piskotki-gdpr-pulse-ring 2.5s cubic-bezier(0.215, 0.61, 0.355, 1) 10 forwards;
  pointer-events: none;
}

@keyframes piskotki-gdpr-pulse-ring {
  0% { transform: scale(0.33); opacity: 1; }
  80%, 100% { transform: scale(1); opacity: 0; }
}

/* --- Edit view (consent toggles) --- */

#piskotki-gdpr .piskotki-gdpr-flex {
  margin-top: 10px !important;
  display: flex;
  width: 100%;
  flex-wrap: wrap;
}

#piskotki-gdpr .piskotki-gdpr-flex .piskotki-gdpr-flex-inside {
  border-width: 1px;
  border-style: var(--pgdpr-edit-border-style, dotted);
  border-color: var(--pgdpr-edit-border-color, inherit);
  padding: 8px 8px 4px;
  margin-top: 4px;
  display: flex;
  width: 100%;
}

#piskotki-gdpr .piskotki-gdpr-flex .piskotki-gdpr-flex-inside p {
  width: 85% !important;
  font-weight: bolder !important;
}

#piskotki-gdpr .piskotki-gdpr-flex .piskotki-gdpr-flex-inside .piskotki-gdpr-switch-col {
  width: 15%;
  text-align: right;
}

#piskotki-gdpr .piskotki-gdpr-flex .piskotki-gdpr-flex-inside .piskotki-gdpr-switch-col label {
  margin: 0 !important;
}

/* --- Bounce animation --- */

.piskotki-gdpr-bounce {
  animation: piskotki-gdpr-bounce 8s ease-in-out 1;
}

/* scale, not transform, so bounce does not override translateX/Y positions.
   Last half of the 8s is already at rest so the window does not jump. */
@keyframes piskotki-gdpr-bounce {
  0%    { scale: 1; }
  12.5% { scale: 1.05; }
  25%   { scale: 1; }
  37.5% { scale: 1.05; }
  50%, 100% { scale: 1; }
}

@media (max-width: 525px) {
  .piskotki-gdpr-bounce {
    animation: none !important;
  }
}

/* --- Toggle switch (shared: popup + site page) --- */

.piskotki-gdpr-form-container .piskotki-gdpr-switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 40px;
}

.piskotki-gdpr-form-container .piskotki-gdpr-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}

.piskotki-gdpr-form-container .piskotki-gdpr-switch input:focus-visible + .piskotki-gdpr-slider {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.piskotki-gdpr-form-container .piskotki-gdpr-slider {
  background-color: var(--pgdpr-slider-off, #ccc);
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
}

.piskotki-gdpr-form-container .piskotki-gdpr-slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 16px;
}

.piskotki-gdpr-form-container input:checked + .piskotki-gdpr-slider,
.piskotki-gdpr-form-container input:disabled + .piskotki-gdpr-slider,
.piskotki-gdpr-form-container input:disabled:checked + .piskotki-gdpr-slider {
  background-color: var(--pgdpr-slider-on, #66bb6a);
}

.piskotki-gdpr-form-container input:checked + .piskotki-gdpr-slider:before,
.piskotki-gdpr-form-container input:disabled + .piskotki-gdpr-slider:before {
  transform: translateX(16px);
}

.piskotki-gdpr-form-container .piskotki-gdpr-slider.piskotki-gdpr-round {
  border-radius: 32px;
}

.piskotki-gdpr-form-container .piskotki-gdpr-slider.piskotki-gdpr-round:before {
  border-radius: 50%;
}

.piskotki-gdpr-form-container .piskotki-gdpr-slider.piskotki-gdpr-disabled {
  background-color: var(--pgdpr-slider-on, #66bb6a) !important;
  opacity: 1;
  filter: none;
  cursor: not-allowed;
}

.piskotki-gdpr-form-container .piskotki-gdpr-slider.piskotki-gdpr-disabled:before {
  transform: translateX(16px) !important;
}

/* --- Cookie tables (site page) --- */

.piskotki-gdpr {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.piskotki-gdpr table {
  border-collapse: collapse !important;
  height: 100% !important;
  margin: 0 auto !important;
  vertical-align: middle !important;
  width: 100% !important;
  word-break: normal !important;
}

.piskotki-gdpr table th {
  padding: 15px;
  border: 1px solid #ccc;
  background: #fff;
}

.piskotki-gdpr table td {
  border-width: 1px;
  padding: 15px;
  border: 1px solid #ccc;
}

@media (max-width: 768px) {
  .piskotki-gdpr input[type=checkbox] {
    width: 15px;
    height: 15px;
    background: #fff;
    vertical-align: middle;
    margin-right: 5px;
    appearance: checkbox !important;
  }
}

/* --- Floating cookie icon (reopen consent) --- */

#piskotki-gdpr-floating {
  position: fixed;
  z-index: 999998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: transform .3s, opacity .3s;
  opacity: .7;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

#piskotki-gdpr-floating.piskotki-gdpr-floating-bottom-left  { bottom: 20px; left: 20px; }
#piskotki-gdpr-floating.piskotki-gdpr-floating-bottom-right { bottom: 20px; right: 20px; }
#piskotki-gdpr-floating.piskotki-gdpr-floating-top-left  { top: 20px; left: 20px; }
#piskotki-gdpr-floating.piskotki-gdpr-floating-top-right { top: 20px; right: 20px; }

#piskotki-gdpr-floating:hover {
  transform: scale(1.1);
  opacity: 1;
}

#piskotki-gdpr-floating svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 525px) {
  #piskotki-gdpr-floating {
    width: 40px;
    height: 40px;
  }
  #piskotki-gdpr-floating.piskotki-gdpr-floating-bottom-left  { bottom: max(15px, env(safe-area-inset-bottom, 0px)); left: max(15px, env(safe-area-inset-left, 0px)); }
  #piskotki-gdpr-floating.piskotki-gdpr-floating-bottom-right { bottom: max(15px, env(safe-area-inset-bottom, 0px)); right: max(15px, env(safe-area-inset-right, 0px)); }
  #piskotki-gdpr-floating.piskotki-gdpr-floating-top-left  { top: max(15px, env(safe-area-inset-top, 0px)); left: max(15px, env(safe-area-inset-left, 0px)); }
  #piskotki-gdpr-floating.piskotki-gdpr-floating-top-right { top: max(15px, env(safe-area-inset-top, 0px)); right: max(15px, env(safe-area-inset-right, 0px)); }
}

#piskotki-gdpr :focus-visible,
#piskotki-gdpr-floating:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .piskotki-gdpr-bounce,
  #piskotki-gdpr .piskotki-gdpr-icon:before {
    animation: none !important;
  }
  #piskotki-gdpr .piskotki-gdpr-btn,
  #piskotki-gdpr .piskotki-gdpr-btn-sec,
  #piskotki-gdpr-floating,
  .piskotki-gdpr-form-container .piskotki-gdpr-slider,
  .piskotki-gdpr-form-container .piskotki-gdpr-slider:before {
    transition: none !important;
  }
}
