/* =========================================================
   Cookie Banner & Modal — GForceSoftware design system
   ========================================================= */

/* ---------- Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  width: min(480px, calc(100vw - 48px));
  background: #fff;
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 28px 32px 32px;
  z-index: 9999;
  transform: translateY(16px);
  opacity: 0;
  display: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner.is-visible {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner__close {
  position: absolute;
  right: 20px;
  top: 20px;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #2C2A29;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s;
}

.cookie-banner__close:hover {
  opacity: 0.6;
}

/* top row: icon + texts */
.cookie-banner__inner .flex {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.cookie-banner__inner .icon-container {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: #2C2A29;
  padding: 10px;
}

.cookie-banner__inner .icon-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cookie-banner__text {
  margin: 0 0 6px;
  font-family: "Funnel Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: #000;
  text-transform: none;
  letter-spacing: 0.01em;
}

.cookie-banner__inner > .flex > div > p {
  margin: 0;
  font-family: "Funnel Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #2C2A29;
}

/* buttons row */
.cookie-banner__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.cookie-banner__actions a {
  flex: 1 1 auto;
  font-family: "Funnel Sans", sans-serif;
  min-width: 100px;
  text-align: center;
  min-height: 40px;
  line-height: 2.4;
  cursor: pointer;
  transition: all 0.25s linear !important;
  padding: 0;
  text-transform: none;
}

/* button overrides — black & white style */

#cookie-accept-all.button {
  background-color: #fff !important;
  border:1px solid #000 !important;
  color: #000 !important;
  transition: all 0.25s linear;
}
#cookie-accept-all.button:hover {
  background-color: #000!important;
  color: #fff !important;
  transition: all 0.25s linear;
}

#cookie-save-settings.button,
#cookie-open-settings.button {
  background-color: #000 !important;
  border: 1px solid #000 !important;
  color: #fff !important;
}

#cookie-save-settings.button:hover,
#cookie-open-settings.button:hover {
  background-color: #fff !important;
  color: #000 !important;
}
#cookie-open-settings .button__line path {
  stroke: #fff;
}

#cookie-cancel.button,
#cookie-reject-all.button {
  background-color: transparent !important;
  border-color: transparent !important;
  color: #000 !important;
}
#cookie-cancel.button:hover,
#cookie-reject-all.button:hover {
  background-color: #000 !important;
  color: #fff !important;
}
#cookie-reject-all .button__line {
  display: none;
}

/* ---------- Modal ---------- */
.cookie-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}

.cookie-modal.is-open {
  display: block;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.cookie-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px));
  background: #fff;
  color: #2C2A29;
  border-radius: 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  padding: 0;
  overflow: hidden;
}

.cookie-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 20px;
  border-bottom: 1px solid #e8e8e8;
}

.cookie-modal__header h2 {
  margin: 0;
  font-family: "Funnel Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.04em;
  color: #2C2A29;
}

.cookie-modal__close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #2C2A29;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s;
}

.cookie-modal__close:hover {
  opacity: 0.6;
}

.cookie-modal__content {
  padding: 20px 28px 0;
}

.cookie-modal__content > p {
  margin: 0 0 16px;
  font-family: "Funnel Sans", sans-serif;
  font-size: 16px;
  line-height: 1.2;
  color: #000;
}

/* categories */
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid #e8e8e8;
}

.cookie-category {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #e8e8e8;
}

.cookie-category__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}

.cookie-category__label strong {
  font-family: "Funnel Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.06em;
  color: #2C2A29;
}

.cookie-category__desc {
  font-family: "Funnel Sans", sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: none !important;
  letter-spacing: 0.06em;
  color: #2C2A29;
}

/* toggle */
.toggle {
  position: relative;
  width: 46px;
  height: 24px;
  flex: 0 0 auto;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #DFDFDF;
  border-radius: 9999px;
  transition: background-color 0.25s;
}

.toggle__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

.toggle input:checked + .toggle__slider {
  background-color: #4d4d4d !important;
}

.toggle input:checked + .toggle__slider::before {
  transform: translateX(22px);
}

/* modal actions */
.cookie-modal__actions {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 20px 8px 28px;
}

.cookie-modal__actions a {
  min-height: 40px;
  flex: 1 1 auto;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s linear;
  line-height: 2.3;
  padding: 0;
  font-family: "Funnel Sans", sans-serif;
  text-transform: none;
}

/* modal button overrides — black & white style */
#cookie-save-settings .button__line path {
  stroke: #fff;
}

#cookie-cancel .button__line {
  display: none;
}


/* ---------- Responsive ---------- */
@media (max-width: 540px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
    padding: 22px 20px 24px;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions a {
    width: 100%;
  }

  .cookie-modal__panel {
    width: calc(100vw - 24px);
  }

  .cookie-modal__header,
  .cookie-modal__content,
  .cookie-modal__actions {
    padding-left: 20px;
    padding-right: 20px;
  }
}
