/* Cookie Banner - canonical centered-modal design (shared across CTI/Omnipack/Cigar) */

:root {
  --cookie-accent: #006F46;        /* Cigar Rings medium green */
  --cookie-accent-hover: #0A4A2E;  /* Cigar Rings dark green */
}

/* Banner - compact card bottom-left */
.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e0e0e0;
  z-index: 9999;
  transform: translateY(calc(100% + 24px));
  transition: transform 0.25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner-content {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cookie-banner-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  color: #333;
}

.cookie-banner-close {
  color: #999;
}

.cookie-banner-close:hover {
  color: var(--cookie-accent);
}

.cookie-banner-text {
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
  color: #666;
}

.cookie-banner-text a {
  color: var(--cookie-accent);
  text-decoration: none;
}

.cookie-banner-text a:hover {
  text-decoration: underline;
}

.cookie-banner-links {
  font-size: 0.8rem;
  margin: 0 0 4px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-banner-links a {
  color: var(--cookie-accent);
  text-decoration: none;
}

.cookie-banner-links a:hover {
  text-decoration: underline;
}

.cookie-banner-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-banner-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}

.cookie-banner-btn:hover {
  opacity: 0.9;
}

.cookie-banner-btn-primary {
  background: var(--cookie-accent);
  color: white;
}

.cookie-banner-btn-secondary {
  background: #f0f0f0;
  color: #444;
}

.cookie-banner-btn-secondary:hover {
  background: #e8e8e8;
}

.cookie-banner-btn-text {
  background: none;
  color: #777;
  padding: 8px 10px;
}

.cookie-banner-btn-text:hover {
  color: var(--cookie-accent);
}

/* Settings Modal */
.cookie-settings-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 10000;
}

.cookie-settings-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-settings-content {
  background: #fff;
  border: 1px solid #e0e0e0;
  padding: 20px 24px;
  max-width: 480px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  margin: auto;
}

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.cookie-settings-title {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.cookie-settings-close {
  color: #999;
}

.cookie-settings-close:hover {
  color: var(--cookie-accent);
}

.cookie-category {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #eee;
  border-radius: 4px;
  background: #fafafa;
}

.cookie-category-required {
  opacity: 0.85;
  background: #f5f5f5;
}

.cookie-category-required .cookie-toggle {
  cursor: not-allowed;
  pointer-events: none;
}

.cookie-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cookie-toggle {
  border: none;
  padding: 0;
  background: #ccc;
}

.contact-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 24px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
}

.contact-map-placeholder-text {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 640px;
}

.contact-map-enable {
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  background: var(--cookie-accent);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

.contact-map-enable:hover {
  background: var(--cookie-accent-hover);
}

body.cookie-settings-open {
  overflow: hidden;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.cookie-category-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.cookie-category-description {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

.cookie-about-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.cookie-about-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  margin: 0 0 8px 0;
}

.cookie-about-text {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

/* Toggle */
.cookie-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  background: #ccc;
  border-radius: 11px;
  cursor: pointer;
  flex-shrink: 0;
}

.cookie-toggle.active {
  background: var(--cookie-accent);
}

.cookie-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookie-toggle.active::after {
  transform: translateX(18px);
}

.cookie-settings-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 12px;
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .cookie-banner-content {
    padding: 14px;
  }

  .cookie-banner-buttons {
    flex-direction: column;
  }

  .cookie-banner-btn {
    width: 100%;
  }

  .cookie-settings-content {
    padding: 18px 20px;
    margin: 12px;
  }
}

/* ===========================================================================
   Centered white consent modal (replaces the bottom-left card)
   =========================================================================== */
.cookie-banner {
  position: fixed;
  inset: 0;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 24, 16, 0.45);
  border: none;
  border-radius: 0;
  box-shadow: none;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.cookie-banner.show { opacity: 1; visibility: visible; }

.cookie-banner-content {
  background: #fff;
  color: #111;
  width: 100%;
  max-width: 440px;
  border-radius: 18px;
  padding: 32px 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  max-height: 88vh;
  overflow-y: auto;
  text-align: left;
}

.cookie-banner-title {
  font-family: var(--font-light, inherit);
  font-size: 1.3rem;
  font-weight: 400;
  color: #111;
  margin: 0 0 14px;
}
.cookie-banner-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
  margin: 0 0 4px;
}
.cookie-banner-text a { color: var(--cookie-accent); text-decoration: underline; }

.cookie-banner-categories {
  border-top: 1px solid #e6e6e6;
  margin-top: 22px;
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-banner-categories .cookie-category { margin: 0; }
.cookie-banner-categories .cookie-category-header {
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin: 0;
}
.cookie-banner-categories .cookie-category-title {
  font-size: 1rem;
  font-weight: 500;
  color: #111;
}
.cookie-category-note { font-weight: 400; color: #888; }

/* Toggle: reset the <button> chrome, keep the pill + knob */
.cookie-banner .cookie-toggle {
  border: none;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.cookie-banner .cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Actions: two underlined text links + one outlined pill button, stacked & centred */
.cookie-banner .cookie-banner-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #e6e6e6;
  margin-top: 24px;
  padding-top: 24px;
}
.cookie-banner-btn-link {
  background: none;
  border: none;
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: var(--font-light, inherit);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease;
}
.cookie-banner-btn-link:hover { color: var(--cookie-accent); }
.cookie-banner .cookie-banner-btn-primary {
  border: 1.5px solid #111;
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 13px 40px;
  font-family: var(--font-light, inherit);
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.cookie-banner .cookie-banner-btn-primary:hover { background: #111; color: #fff; }

/* Force dead-centre + square corners (beats the older .cookie-banner.show rule) */
.cookie-banner,
.cookie-banner.show {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.cookie-banner-content {
  border-radius: 0 !important;
}

/* EU-compliant actions: Accept and Reject equally prominent (same style, same size) */
.cookie-banner .cookie-banner-primary-row {
  display: flex;
  gap: 12px;
  width: 100%;
}
.cookie-banner .cookie-banner-primary-row .cookie-banner-btn-primary {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 1rem;
}
@media (max-width: 420px) {
  .cookie-banner .cookie-banner-primary-row { flex-direction: column; }
}
