@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

/* ============================================================
   SS Cookie Bar — styl pro sunnysoft-dist.eu
   Brand: navy #1e4aa1, oranžová #ff450c, font Serial (fallback Manrope)
   Volitelné kategorie = SEMAFOR přepínače (červená vyp / zelená zap),
   ve výchozím stavu vypnuté (opt-in).
   ============================================================ */

:root {
  --ssd-navy: #1e4aa1;
  --ssd-navy-dark: #16213a;
  --ssd-orange: #ff450c;
  --ssd-orange-dark: #e63c08;
  --ssd-text: #1b2a4a;
  --ssd-muted: #5b6577;
  --ssd-line: #e3e7ef;
  --ssd-on: #1fa45b;
  --ssd-off: #d8584c;
}

.xg-cookie-banner,
.xg-cookie-modal-overlay,
.xg-manage-button {
  font-family: 'Serial', 'Manrope', -apple-system, system-ui, 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(--ssd-navy);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 24px;
  z-index: 2147483647 !important;
  font-size: 13.5px;
  line-height: 1.55;
  border-top: 3px solid var(--ssd-orange);
  box-shadow: 0 -6px 24px rgba(16, 33, 70, 0.25);
  isolation: isolate;
  transform: translateZ(0);
}

.xg-banner-text {
  flex: 1;
}

.xg-link {
  color: #ffffff;
  text-decoration: underline;
  margin-left: 4px;
  font-weight: 600;
}

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

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

/* --- TLAČÍTKA --- */
.xg-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.1;
  letter-spacing: .2px;
}

/* Primární (Přijmout vše) = oranžová */
.xg-btn-solid {
  background-color: var(--ssd-orange);
  color: #ffffff;
  border: 1px solid var(--ssd-orange);
}

.xg-btn-solid:hover {
  background-color: var(--ssd-orange-dark);
  border-color: var(--ssd-orange-dark);
}

/* Sekundární v BANNERU (na navy pozadí) = bílý outline */
.xg-cookie-banner .xg-btn-outline {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.xg-cookie-banner .xg-btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
}

/* Sekundární v MODALU (na bílém pozadí) = navy outline */
.xg-cookie-modal .xg-btn-outline {
  background-color: transparent;
  color: var(--ssd-navy);
  border: 1px solid var(--ssd-navy);
}

.xg-cookie-modal .xg-btn-outline:hover {
  background-color: var(--ssd-navy);
  color: #ffffff;
}

/* --- MODÁLNÍ OKNO --- */
.xg-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(16, 33, 70, 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: #ffffff;
  color: var(--ssd-text);
  width: 100%;
  max-width: 680px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(16, 33, 70, 0.35);
  overflow: hidden;
}

.xg-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--ssd-line);
}

.xg-modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ssd-navy);
}

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

.xg-close-btn:hover {
  color: var(--ssd-navy);
}

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

.xg-modal-intro {
  margin: 0 0 22px 0;
  line-height: 1.55;
  color: var(--ssd-muted);
}

.xg-cookie-option {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ssd-line);
}

.xg-cookie-option:last-child {
  border-bottom: none;
}

.xg-cookie-option p {
  margin: 8px 0 0 58px;
  color: var(--ssd-muted);
  line-height: 1.5;
  font-size: 13px;
}

.xg-option-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ssd-text);
}

.xg-always-on {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--ssd-on);
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* --- SEMAFOR PŘEPÍNAČE (toggle) --- */
.xg-switch-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

/* skrytý nativní checkbox */
.xg-switch-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* dráha přepínače — VYPNUTO = červená (semafor) */
.xg-switch {
  flex-shrink: 0;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background-color: var(--ssd-off);
  position: relative;
  transition: background-color 0.2s ease;
}

/* knoflík */
.xg-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

/* ZAPNUTO = zelená + knoflík vpravo */
.xg-switch-label input:checked ~ .xg-switch {
  background-color: var(--ssd-on);
}

.xg-switch-label input:checked ~ .xg-switch::after {
  transform: translateX(20px);
}

/* fokus z klávesnice */
.xg-switch-label input:focus-visible ~ .xg-switch {
  outline: 2px solid var(--ssd-navy);
  outline-offset: 2px;
}

/* Nezbytné (disabled) — zelená zamčená */
.xg-switch-label input:disabled ~ .xg-switch {
  background-color: var(--ssd-on);
  opacity: 0.55;
  cursor: not-allowed;
}

.xg-modal-footer {
  padding: 18px 32px 24px;
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--ssd-line);
}

/* --- PLOVOUCÍ TLAČÍTKO PRO SPRÁVU --- */
.xg-manage-button {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 2147483000;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--ssd-navy);
  border: 1px solid var(--ssd-navy);
  border-radius: 50%;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(16, 33, 70, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.xg-manage-button:hover {
  background: var(--ssd-orange);
  border-color: var(--ssd-orange);
  transform: scale(1.08);
}

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

.xg-manage-button:focus {
  outline: none;
}

/* 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;
    padding: 16px;
  }

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

  .xg-btn {
    width: 100%;
  }

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

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

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

  .xg-cookie-option p {
    margin-left: 0;
  }

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