@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600&family=Hanken+Grotesk:wght@400;600&display=swap');

/* Click & Grow (clickgrow.cz): varianta B „Olivová" podle CaG Visual Identity 2024.
   #414F33 olivová, #F7EEE2 krémová, #DCEA54 limetková. Rozložení a třídy beze změny. */

.xg-cookie-banner,
.xg-cookie-modal-overlay,
.xg-manage-button {
  --cg-bg: #414F33;
  --cg-tx: #F7EEE2;
  --cg-tx2: rgba(247, 238, 226, 0.82);
  --cg-pri: #DCEA54;
  --cg-pri-tx: #414F33;
  --cg-bd: rgba(247, 238, 226, 0.22);
  font-family: 'Hanken Grotesk', -apple-system, 'Segoe UI', Arial, sans-serif;
  box-sizing: border-box;
}

.xg-cookie-banner *,
.xg-cookie-modal-overlay *,
.xg-manage-button * {
  box-sizing: border-box;
}

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

/* --- BANNER --- */
.xg-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--cg-bg);
  color: var(--cg-tx);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 44px;
  gap: 28px;
  z-index: 2147483647 !important;
  font-size: 14px;
  line-height: 1.5;
  border-top: 1px solid var(--cg-bd);
  box-shadow: 0 -6px 24px rgba(52, 49, 46, 0.12);
  isolation: isolate;
  transform: translateZ(0);
}

.xg-banner-text {
  flex: 1;
  color: var(--cg-tx2);
}

.xg-link {
  color: var(--cg-tx);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
}

.xg-link:hover {
  text-decoration: none;
}

.xg-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* --- TLAČÍTKA (pilulka jako tlačítka webu) --- */
.xg-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1;
  white-space: nowrap;
}

.xg-btn-outline {
  background-color: transparent;
  color: var(--cg-tx);
  border: 1.5px solid var(--cg-tx);
}

.xg-btn-outline:hover {
  background-color: rgba(247, 238, 226, 0.1);
}

.xg-btn-solid {
  background-color: var(--cg-pri);
  color: var(--cg-pri-tx);
  border: 1.5px solid var(--cg-pri);
}

.xg-btn-solid:hover {
  background-color: #e4efa0;
  border-color: #e4efa0;
}

.xg-btn:focus-visible,
.xg-close-btn:focus-visible,
.xg-manage-button:focus-visible {
  outline: 2px solid var(--cg-pri);
  outline-offset: 2px;
}

/* --- MODÁLNÍ OKNO --- */
.xg-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(52, 49, 46, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2147483647 !important;
  padding: 20px;
  isolation: isolate;
  transform: translateZ(0);
}

.xg-cookie-modal {
  background-color: var(--cg-bg);
  color: var(--cg-tx);
  width: 100%;
  max-width: 700px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  border-radius: 18px;
}

.xg-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 34px 14px;
}

.xg-modal-title {
  margin: 0;
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--cg-tx);
}

.xg-close-btn {
  background: transparent;
  border: none;
  color: var(--cg-tx);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xg-close-btn:hover {
  opacity: 0.7;
}

.xg-modal-body {
  padding: 0 34px;
  overflow-y: auto;
  font-size: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.xg-modal-intro {
  margin: 0 0 20px 0;
  line-height: 1.5;
  color: var(--cg-tx2);
}

.xg-cookie-option {
  margin-bottom: 18px;
}

.xg-cookie-option p {
  margin: 6px 0 0 34px;
  color: var(--cg-tx2);
  line-height: 1.5;
  font-size: 13px;
}

.xg-cookie-option strong {
  font-weight: 600;
}

/* --- ZAŠKRTÁVACÍ POLÍČKA --- */
.xg-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
  position: relative;
  color: var(--cg-tx);
}

.xg-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.xg-checkbox-custom {
  height: 22px;
  width: 22px;
  flex-shrink: 0;
  background-color: transparent;
  border: 1.5px solid var(--cg-tx2);
  border-radius: 6px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
}

.xg-checkbox-label input:checked ~ .xg-checkbox-custom {
  background-color: var(--cg-pri);
  border-color: var(--cg-pri);
}

.xg-checkbox-custom:after {
  content: "";
  display: none;
  width: 6px;
  height: 11px;
  border: solid var(--cg-pri-tx);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.xg-checkbox-label input:checked ~ .xg-checkbox-custom:after {
  display: block;
}

.xg-checkbox-label input:focus-visible ~ .xg-checkbox-custom {
  outline: 2px solid var(--cg-pri);
  outline-offset: 2px;
}

.xg-checkbox-label input:disabled ~ .xg-checkbox-custom {
  cursor: not-allowed;
  opacity: 0.55;
}

.xg-modal-footer {
  padding: 20px 34px 28px;
  display: flex;
  gap: 12px;
}

/* --- TLAČÍTKO PRO SPRÁVU SOUHLASU --- */
.xg-manage-button {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147483000;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--cg-bg);
  border: 1px solid var(--cg-bd);
  border-radius: 50%;
  color: var(--cg-tx);
  box-shadow: 0 4px 12px rgba(52, 49, 46, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.xg-manage-button:hover {
  transform: scale(1.08);
}

.xg-manage-button svg {
  width: 22px;
  height: 22px;
}

/* Pomocná třída pro snížení vrstvy plovoucího tlačítka „Kde koupit“ */
.sscb_lowered_buy_button {
  z-index: 2147482000 !important;
}

/* --- RESPONSIVITA PRO MOBILY --- */
@media (max-width: 768px) {
  .xg-cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
  }

  .xg-banner-actions,
  .xg-modal-footer {
    flex-direction: column;
  }

  .xg-btn {
    width: 100%;
    padding: 14px;
  }

  .xg-cookie-modal-overlay {
    padding: 12px;
  }

  .xg-modal-header {
    padding: 20px 20px 12px;
  }

  .xg-modal-title {
    font-size: 22px;
  }

  .xg-modal-body {
    padding: 0 20px;
  }

  .xg-modal-footer {
    padding: 16px 20px;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xg-btn,
  .xg-manage-button,
  .xg-checkbox-custom {
    transition: none;
  }
}
