/*
 * Kominík365 – cookie lišta a nastavení cookies
 */

:root {
  --cookie-bg: #0b1120;
  --cookie-panel: #ffffff;
  --cookie-text: #111827;
  --cookie-muted: #6b7280;
  --cookie-border: #d1d5db;
  --cookie-accent: #f59e0b;
  --cookie-accent-hover: #d97706;
  --cookie-focus: rgba(245, 158, 11, .35);
}

.cookie-banner[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 5000;
  margin: 0 auto;
  max-width: 1180px;
  color: #ffffff;
}

.cookie-banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px;
  background: rgba(11, 17, 32, .98);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  backdrop-filter: blur(12px);
}

.cookie-banner__text {
  min-width: 0;
}

.cookie-banner__text strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
}

.cookie-banner__text p {
  max-width: 760px;
  margin: 0;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-banner a,
.cookie-modal a {
  color: #fbbf24;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner a:hover,
.cookie-modal a:hover {
  color: #fde68a;
}

.cookie-banner__actions,
.cookie-modal__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cookie-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 17px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition:
    background-color .2s ease,
    border-color .2s ease,
    color .2s ease,
    transform .2s ease;
}

.cookie-button:hover {
  transform: translateY(-1px);
}

.cookie-button:focus-visible,
.cookie-modal__close:focus-visible,
.footer-cookie-button:focus-visible {
  outline: 3px solid var(--cookie-focus);
  outline-offset: 3px;
}

.cookie-button--primary {
  background: var(--cookie-accent);
  color: #111827;
}

.cookie-button--primary:hover {
  background: var(--cookie-accent-hover);
}

.cookie-button--secondary {
  border-color: rgba(255, 255, 255, .5);
  background: transparent;
  color: #ffffff;
}

.cookie-button--secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, .1);
}

.cookie-button--settings {
  border-color: #9ca3af;
  background: #ffffff;
  color: #111827;
}

.cookie-button--settings:hover {
  background: #f3f4f6;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 5100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, .74);
  overflow-y: auto;
}

.cookie-modal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 30px;
  background: var(--cookie-panel);
  color: var(--cookie-text);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.cookie-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111827;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.cookie-modal__close:hover {
  background: #e5e7eb;
}

.cookie-modal__header {
  padding-right: 48px;
}

.cookie-modal__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #b45309;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cookie-modal__header h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.cookie-modal__header p {
  margin: 0;
  color: var(--cookie-muted);
  line-height: 1.6;
}

.cookie-categories {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.cookie-category {
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
}

.cookie-category__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cookie-category h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.cookie-category p {
  margin: 0;
  color: var(--cookie-muted);
  font-size: 14px;
  line-height: 1.55;
}

.cookie-category__status {
  margin-top: 10px;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
}

.cookie-switch {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.cookie-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.cookie-switch span {
  position: relative;
  display: block;
  width: 48px;
  height: 27px;
  border-radius: 999px;
  background: #9ca3af;
  transition: background-color .2s ease;
}

.cookie-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}

.cookie-switch input:checked + span {
  background: var(--cookie-accent);
}

.cookie-switch input:checked + span::after {
  transform: translateX(21px);
}

.cookie-switch input:focus-visible + span {
  outline: 3px solid var(--cookie-focus);
  outline-offset: 3px;
}

.cookie-switch--locked {
  cursor: not-allowed;
  opacity: .8;
}

.cookie-modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 22px;
  font-size: 14px;
}

.cookie-modal__links a {
  color: #92400e;
}

.cookie-modal__actions {
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.cookie-modal__actions .cookie-button--secondary {
  border-color: #6b7280;
  color: #111827;
}

.cookie-modal__actions .cookie-button--secondary:hover {
  border-color: #111827;
  background: #f3f4f6;
}

.cookie-modal__actions .cookie-button--settings {
  border-color: #d1d5db;
  background: #f3f4f6;
}

html.cookie-modal-open,
html.cookie-modal-open body {
  overflow: hidden;
}

.footer-cookie-button {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f59e0b;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.footer-cookie-button:hover {
  color: #fbbf24;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .cookie-banner__content {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .cookie-banner__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cookie-button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .cookie-banner__content {
    padding: 18px;
    border-radius: 16px;
  }

  .cookie-banner__actions,
  .cookie-modal__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .cookie-modal {
    align-items: end;
    padding: 0;
  }

  .cookie-modal__dialog {
    width: 100%;
    max-height: 92vh;
    padding: 24px 18px;
    border-radius: 22px 22px 0 0;
  }

  .cookie-modal__header h2 {
    font-size: 24px;
  }

  .cookie-category__heading {
    gap: 12px;
  }
}
