/* =========================================================
   Glopack cookie consent — banner, settings dialog, floating
   cookie button and placeholders for content blocked until
   consent. Scoped to #gcc-* / .gcc-* to avoid conflicts.
   Uses the colour variables from style.css.
   ========================================================= */

/* Blocked content stays hidden even if its own rules set a display value */
[data-consent][hidden],
[data-consent-placeholder][hidden] {
  display: none !important;
}

/* Banner */

#gcc-banner {
  display: none;
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2001;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 28px;
  align-items: center;
  gap: 28px;
  background: var(--white, #fff);
  color: var(--black, #000);
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.24);
  font-family: var(--font-family, sans-serif);
}

#gcc-banner.visible {
  display: flex;
}

#gcc-main {
  flex: 1 1 auto;
  min-width: 0;
}

#gcc-ttl {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--green-dark, #173C37);
}

#gcc-txt {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-gray, #6E6E73);
}

#gcc-txt a {
  color: var(--green-dark, #173C37);
  text-decoration: underline;
}

#gcc-txt a:hover {
  color: var(--orange-mid, #F36421);
}

#gcc-btns {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Buttons */

.gcc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 2px solid transparent;
  border-radius: 980px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.gcc-accept {
  background: var(--orange-mid, #F36421);
  color: var(--white, #fff);
}

.gcc-accept:hover {
  background: var(--orange-dark, #A6440D);
}

.gcc-reject {
  background: transparent;
  color: var(--dark-gray, #1D1D1F);
  border-color: var(--dark-gray, #1D1D1F);
}

.gcc-reject:hover {
  background: var(--dark-gray, #1D1D1F);
  color: var(--white, #fff);
}

.gcc-link {
  padding-left: 6px;
  padding-right: 6px;
  background: transparent;
  color: var(--green-dark, #173C37);
  text-decoration: underline;
}

.gcc-link:hover {
  color: var(--orange-mid, #F36421);
}

.gcc-btn:focus-visible,
#gcc-x:focus-visible,
#gcc-fab:focus-visible,
.gcc-tgl input:focus-visible + .gcc-sl {
  outline: 3px solid var(--orange-light, #F47922);
  outline-offset: 2px;
}

/* Settings dialog */

#gcc-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
}

#gcc-backdrop.visible {
  display: block;
}

/* Clicks outside the box pass through to the backdrop, which closes the dialog */
#gcc-settings {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2002;
  padding: 20px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#gcc-settings.visible {
  display: flex;
}

#gcc-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  overflow: hidden;
  background: var(--white, #fff);
  color: var(--black, #000);
  border-radius: 18px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.3);
  font-family: var(--font-family, sans-serif);
  pointer-events: auto;
  outline: none;
}

#gcc-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray, #E9E9EB);
}

#gcc-hd h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--green-dark, #173C37);
}

#gcc-x {
  padding: 0 6px;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 28px;
  line-height: 1;
  color: var(--text-gray, #6E6E73);
  cursor: pointer;
}

#gcc-x:hover {
  color: var(--black, #000);
}

#gcc-bd {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 24px;
}

.gcc-intro {
  margin: 16px 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-gray, #6E6E73);
}

.gcc-cat {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray, #E9E9EB);
}

.gcc-cat:last-child {
  border-bottom: none;
}

.gcc-cat-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.gcc-cat-hd h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.gcc-cat p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-gray, #6E6E73);
}

#gcc-ft {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--gray, #E9E9EB);
}

#gcc-cid {
  margin: 0;
  padding: 0 24px 14px;
  font-size: 11px;
  color: #999;
  text-align: right;
  word-break: break-all;
}

/* Toggle switch */

.gcc-tgl {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}

.gcc-tgl input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.gcc-sl {
  position: absolute;
  inset: 0;
  background: #C7C7CC;
  border-radius: 24px;
  transition: background 0.2s;
}

.gcc-sl::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: var(--white, #fff);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.gcc-tgl input:checked + .gcc-sl {
  background: var(--orange-mid, #F36421);
}

.gcc-tgl input:checked + .gcc-sl::before {
  transform: translateX(20px);
}

.gcc-tgl input:disabled {
  cursor: not-allowed;
}

.gcc-tgl input:disabled + .gcc-sl {
  opacity: 0.55;
}

/* Floating cookie button — shown once a choice has been made */

#gcc-fab {
  display: none;
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1500;
  width: 48px;
  height: 48px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--white, #fff);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.2s;
}

#gcc-fab.visible {
  display: flex;
}

#gcc-fab:hover {
  transform: scale(1.08);
}

#gcc-fab img {
  width: 30px;
  height: 30px;
}

/* Placeholder for the Google map (contact page) */

.gcc-map-placeholder {
  position: absolute;
  inset: 0;
  display: block;
}

.gcc-map-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder for the YouTube video (home page) */

.gcc-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  color: var(--white, #fff);
  background: radial-gradient(circle at 50% 40%, var(--green-dark, #173C37) 0%, var(--black, #000) 100%);
}

.gcc-video-placeholder p {
  max-width: 460px;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.gcc-video-placeholder a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}

.gcc-video-placeholder a:hover {
  color: var(--orange-light, #F47922);
}

.gcc-play {
  width: 56px;
  height: 56px;
  color: rgba(255, 255, 255, 0.9);
}

/* Responsive */

@media (max-width: 900px) {
  #gcc-banner.visible {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }
}

@media (max-width: 640px) {
  #gcc-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 18px;
  }

  #gcc-btns,
  #gcc-ft {
    flex-direction: column;
    align-items: stretch;
  }

  #gcc-settings {
    padding: 8px;
  }

  #gcc-hd,
  #gcc-ft {
    padding-left: 18px;
    padding-right: 18px;
  }

  #gcc-bd {
    padding: 0 18px;
  }

  .gcc-play {
    display: none;
  }

  .gcc-video-placeholder {
    gap: 10px;
    padding: 16px;
  }

  .gcc-video-placeholder p {
    font-size: 13px;
  }

  .gcc-video-placeholder .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}
