/* Cookie banner — Galeria Stron (Consent Mode v2) */

.gs-cc,
.gs-modal {
  --gs-accent: var(--color-accent, #a855f7);
  --gs-accent-hover: var(--color-accent-hover, #9333ea);
  --gs-card: #ffffff;
  --gs-card-soft: #f7f7f8;
  --gs-line: #e7e7ea;
  --gs-title: #18181b;
  --gs-text: #52525b;
  --gs-text-soft: #8a8a92;
  --gs-radius: 20px;
  --gs-font: var(--font-sans, Cosmica, Arial, sans-serif);
}

.gs-cc {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(1040px, calc(100% - 32px));
  z-index: 99999;
  background: var(--gs-card);
  color: var(--gs-text);
  font-family: var(--gs-font);
  border: 1px solid var(--gs-line);
  border-radius: var(--gs-radius);
  box-shadow: 0 24px 60px -18px rgba(24, 24, 27, 0.28);
  padding: 22px 24px;
  display: none;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  animation: gs-cc-up 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gs-cc.is-open {
  display: grid;
}

@keyframes gs-cc-up {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.gs-cc__title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--gs-title);
}

.gs-cc__text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
}

.gs-cc__text a {
  color: var(--gs-accent);
  font-weight: 600;
  text-decoration: none;
}

.gs-cc__text a:hover {
  text-decoration: underline;
}

.gs-cc__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gs-btn {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 12px;
  padding: 12px 20px;
  border: 1px solid transparent;
  transition: 0.18s;
  -webkit-backdrop-filter: blur(18px) saturate(185%);
  backdrop-filter: blur(18px) saturate(185%);
}

.gs-btn--glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(240, 240, 244, 0.4));
  color: var(--gs-title);
  border: 1px solid rgba(24, 24, 27, 0.1);
}

.gs-btn--glass:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 244, 248, 0.66));
  border-color: rgba(24, 24, 27, 0.2);
}

.gs-btn--glass:active,
.gs-btn--accent:active {
  transform: scale(0.98);
}

.gs-btn--accent {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(147, 51, 234, 0.95));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.gs-btn--accent:hover {
  background: #09090b;
  color: #fff;
  border-color: #09090b;
}

.gs-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  padding: 20px;
  overflow: auto;
  background: rgba(24, 24, 27, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-family: var(--gs-font, Cosmica, Arial, sans-serif);
}

.gs-modal.is-open {
  display: grid;
  place-items: center;
}

.gs-panel {
  width: min(680px, 100%);
  background: #fff;
  color: #52525b;
  border: 1px solid #e7e7ea;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(24, 24, 27, 0.4);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  animation: gs-cc-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes gs-cc-pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gs-panel__head {
  padding: 24px 26px 0;
  position: relative;
  flex: none;
}

.gs-panel__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #18181b;
  max-width: calc(100% - 40px);
}

.gs-panel__intro {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
}

.gs-x {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #71717a;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.18s;
}

.gs-x:hover {
  background: #f2f2f4;
  color: #18181b;
}

.gs-x svg {
  width: 20px;
  height: 20px;
}

.gs-tabs {
  display: flex;
  gap: 26px;
  padding: 0 26px;
  border-bottom: 1px solid #e7e7ea;
  flex: none;
}

.gs-tab {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8a92;
  padding: 14px 0;
  position: relative;
  transition: color 0.18s;
}

.gs-tab:hover {
  color: #3f3f46;
}

.gs-tab.is-active {
  color: #18181b;
}

.gs-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--color-accent, #a855f7);
  border-radius: 2px;
}

.gs-panel__body {
  padding: 6px 26px;
  overflow: auto;
  flex: 1 1 auto;
}

.gs-tabpane {
  display: none;
  padding: 16px 0;
}

.gs-tabpane.is-active {
  display: block;
}

.gs-cat {
  padding: 18px 0;
  border-bottom: 1px solid #e7e7ea;
}

.gs-cat:last-child {
  border-bottom: none;
}

.gs-cat__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gs-cat__name {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #18181b;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.35;
  padding-right: 8px;
}

.gs-cat__desc {
  margin: 10px 0 0;
  font-size: 12.8px;
  line-height: 1.55;
}

.gs-cat__toggle-detail {
  margin-top: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-accent, #a855f7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0;
}

.gs-cat__toggle-detail svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.gs-cat__toggle-detail.is-open svg {
  transform: rotate(180deg);
}

.gs-cat__detail {
  display: none;
  margin-top: 12px;
  border: 1px solid #e7e7ea;
  border-radius: 12px;
  overflow: hidden;
}

.gs-cat__detail.is-open {
  display: block;
}

.gs-cookie {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 14px;
  padding: 11px 14px;
  font-size: 12px;
  border-bottom: 1px solid #e7e7ea;
  background: #f7f7f8;
}

.gs-cookie:last-child {
  border-bottom: none;
}

.gs-cookie b {
  color: #18181b;
  font-weight: 600;
}

.gs-cookie span {
  color: #8a8a92;
}

.gs-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  display: inline-block;
}

.gs-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.gs-switch .track {
  position: absolute;
  inset: 0;
  background: #d4d4d8;
  border-radius: 999px;
  transition: background 0.2s;
}

.gs-switch .thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: 0 1px 3px rgba(24, 24, 27, 0.35);
}

.gs-switch input:checked + .track {
  background: var(--color-accent, #a855f7);
}

.gs-switch input:checked ~ .thumb {
  transform: translateX(20px);
}

.gs-switch input:disabled {
  cursor: not-allowed;
}

.gs-switch input:disabled + .track {
  background: var(--color-accent, #a855f7);
  opacity: 0.5;
}

.gs-info p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 14px;
}

.gs-info a {
  color: var(--color-accent, #a855f7);
  font-weight: 600;
  text-decoration: none;
}

.gs-info a:hover {
  text-decoration: underline;
}

.gs-info__id {
  font-size: 12px;
  color: #8a8a92;
  margin-top: 6px;
}

.gs-info__id b {
  color: #18181b;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.gs-panel__foot {
  display: flex;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid #e7e7ea;
  flex: none;
  flex-wrap: wrap;
}

.gs-panel__foot .gs-btn {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
}

.gs-panel__foot .gs-btn--accent {
  flex: 2 1 220px;
}

@media (max-width: 720px) {
  .gs-cc {
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    border-radius: 18px 18px 0 0;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  }

  .gs-cc.is-open {
    display: block;
  }

  .gs-cc__actions {
    margin-top: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .gs-cc__actions .gs-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 14px 20px;
  }

  .gs-cc__actions [data-gs="reject"] {
    order: 1;
  }

  .gs-cc__actions [data-gs="customize"] {
    order: 2;
  }

  .gs-cc__actions [data-gs="accept"] {
    order: 3;
  }

  @keyframes gs-cc-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .gs-modal {
    padding: 0;
    align-items: end;
    place-items: end stretch;
    overflow: hidden;
  }

  .gs-modal.is-open {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .gs-panel {
    width: 100%;
    max-width: none;
    max-height: min(92dvh, calc(100vh - 8px));
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }

  .gs-panel__head {
    padding: 20px 18px 0;
  }

  .gs-panel__title {
    font-size: 18px;
    line-height: 1.3;
    max-width: calc(100% - 48px);
    margin-bottom: 10px;
  }

  .gs-panel__intro {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.6;
    padding-right: 4px;
  }

  .gs-x {
    top: 14px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .gs-tabs {
    gap: 0;
    padding: 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gs-tabs::-webkit-scrollbar {
    display: none;
  }

  .gs-tab {
    flex: 1 1 auto;
    text-align: center;
    font-size: 11.5px;
    letter-spacing: 0.03em;
    padding: 14px 10px;
    white-space: nowrap;
  }

  .gs-panel__body {
    padding: 4px 18px;
    -webkit-overflow-scrolling: touch;
  }

  .gs-tabpane {
    padding: 12px 0 8px;
  }

  .gs-cat {
    padding: 18px 0;
  }

  .gs-cat__row {
    gap: 12px;
    align-items: center;
  }

  .gs-cat__name {
    font-size: 15px;
  }

  .gs-cat__desc {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
  }

  .gs-cat__toggle-detail {
    margin-top: 14px;
    min-height: 44px;
    padding: 8px 0;
  }

  .gs-cookie {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 14px;
  }

  .gs-info p {
    font-size: 13.5px;
    line-height: 1.65;
  }

  .gs-panel__foot {
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  }

  .gs-panel__foot .gs-btn,
  .gs-panel__foot .gs-btn--accent {
    flex: none;
    width: 100%;
    padding: 14px 18px;
  }

  .gs-switch {
    width: 50px;
    height: 30px;
  }

  .gs-switch .thumb {
    width: 24px;
    height: 24px;
  }

  .gs-switch input:checked ~ .thumb {
    transform: translateX(20px);
  }
}

body.is-nav-open .gs-cc {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
