/* Cookie consent — Technické služby Jablunkov a.s. */

#tsj-cookies {
  font-family: 'Manrope', sans-serif;
  color: #21160C;
}

/* ---------- Banner ---------- */
.tsj-cookies-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 9998;
  width: calc(100% - 40px);
  max-width: 1040px;
  transform: translate(-50%, 14px);
  opacity: 0;
  transition: opacity .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 30px;
  border-radius: 16px;
  border: 2px solid #AF4E06;
  background: #F3F3F3;
  background: rgba(243, 243, 243, .97);
  box-shadow: 0 14px 34px rgba(33, 22, 12, .18);
}
.tsj-cookies-banner.tsj-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.tsj-cookies-banner-text { flex: 1 1 420px; }
.tsj-cookies-banner-text h2 {
  margin: 0 0 6px;
  font-family: 'Bungee', sans-serif;
  font-size: 1.1em;
  font-weight: 400;
  color: #21160C;
}
.tsj-cookies-banner-text p {
  margin: 0;
  font-size: .92em;
  line-height: 1.55;
  color: #21160C;
}

.tsj-cookies-link {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: #AF4E06;
  text-decoration: underline;
  cursor: pointer;
  transition: color .35s ease-in-out;
}
.tsj-cookies-link:hover { color: #21160C; }

.tsj-cookies-banner-actions,
.tsj-cookies-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

/* ---------- Buttons ---------- */
.tsj-cookies-btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .88em;
  letter-spacing: .01em;
  cursor: pointer;
  transition: all .35s ease-in-out;
  white-space: nowrap;
}
.tsj-cookies-btn--primary {
  border: none;
  background: #AF4E06;
  color: #F3F3F3;
}
.tsj-cookies-btn--primary:hover { background: #21160C; }

.tsj-cookies-btn--outline {
  border: 1px solid #C3C3C3;
  background: rgba(224, 144, 30, .04);
  color: #AF4E06;
}
.tsj-cookies-btn--outline:hover {
  border-color: #AF4E06;
  background: rgba(224, 144, 30, .12);
  color: #21160C;
}

.tsj-cookies-btn--ghost {
  border: none;
  background: none;
  color: #21160C;
  padding: 0 10px;
}
.tsj-cookies-btn--ghost:hover { color: #AF4E06; }

/* ---------- Settings modal ---------- */
.tsj-cookies-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(33, 22, 12, 0);
  transition: background-color .4s ease;
}
.tsj-cookies-modal[hidden] { display: none; }
.tsj-cookies-modal.tsj-visible { background: rgba(33, 22, 12, .5); }

.tsj-cookies-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 36px;
  border-radius: 18px;
  border: 2px solid #AF4E06;
  background: #F3F3F3;
  box-shadow: 0 20px 50px rgba(33, 22, 12, .3);
  opacity: 0;
  transform: scale(.95) translateY(10px);
  transition: opacity .4s cubic-bezier(.22, 1, .36, 1), transform .4s cubic-bezier(.22, 1, .36, 1);
}
.tsj-cookies-modal.tsj-visible .tsj-cookies-modal-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.tsj-cookies-modal-card h2 {
  margin: 0 0 12px;
  font-family: 'Bungee', sans-serif;
  font-size: 1.2em;
  font-weight: 400;
  color: #21160C;
  padding-right: 30px;
}
.tsj-cookies-modal-card > p {
  margin: 0 0 22px;
  font-size: .92em;
  line-height: 1.55;
}

.tsj-cookies-modal-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 1.4em;
  line-height: 1;
  color: #21160C;
  cursor: pointer;
  transition: color .35s ease-in-out, transform .35s ease-in-out;
}
.tsj-cookies-modal-close:hover { color: #AF4E06; transform: rotate(90deg); }

.tsj-cookies-category {
  padding: 16px 0;
  border-top: 1px solid #C3C3C3;
}
.tsj-cookies-category:last-of-type { border-bottom: 1px solid #C3C3C3; }
.tsj-cookies-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tsj-cookies-category-name {
  font-weight: 700;
  font-size: .95em;
  color: #21160C;
}
.tsj-cookies-category p {
  margin: 8px 0 0;
  font-size: .85em;
  line-height: 1.5;
  color: #21160C;
}

/* ---------- Toggle switch ---------- */
.tsj-cookies-switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  border: none;
  border-radius: 20px;
  background: rgba(175, 78, 6, .18);
  cursor: pointer;
  transition: background-color .35s ease-in-out;
}
.tsj-cookies-switch-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F3F3F3;
  box-shadow: 0 2px 6px rgba(33, 22, 12, .3);
  transition: transform .35s ease-in-out;
}
.tsj-cookies-switch[aria-checked="true"] { background: #AF4E06; }
.tsj-cookies-switch[aria-checked="true"] .tsj-cookies-switch-dot { transform: translateX(20px); }
.tsj-cookies-switch--locked {
  background: #AF4E06;
  opacity: .55;
  cursor: not-allowed;
}
.tsj-cookies-switch--locked .tsj-cookies-switch-dot { transform: translateX(20px); }

.tsj-cookies-modal-actions { justify-content: flex-end; margin-top: 6px; }

/* ---------- Reopen tab ---------- */
.tsj-cookies-reopen {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9997;
  height: 38px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border: 1px solid #AF4E06;
  border-radius: 20px;
  background: rgba(243, 243, 243, .95);
  color: #21160C;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: .8em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(33, 22, 12, .12);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease-in-out, transform .35s ease-in-out, background-color .35s ease-in-out, color .35s ease-in-out;
  pointer-events: none;
}
.tsj-cookies-reopen.tsj-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.tsj-cookies-reopen:hover { background: #AF4E06; color: #F3F3F3; }

@media (prefers-reduced-motion: reduce) {
  .tsj-cookies-banner,
  .tsj-cookies-modal,
  .tsj-cookies-modal-card,
  .tsj-cookies-reopen,
  .tsj-cookies-modal-close {
    transition-duration: .01ms !important;
  }
}

@media (max-width: 640px) {
  .tsj-cookies-banner {
    bottom: 0;
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 20px;
  }
  .tsj-cookies-banner-actions { width: 100%; }
  .tsj-cookies-btn { flex: 1 1 auto; }
  .tsj-cookies-modal-card { padding: 28px 22px; }
}
