/* Cookie Consent Banner Styles — GDPR Compliant */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  color: #000;
  padding: 20px 24px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 10000;
  font-family: 'Roboto Slab', serif;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  border-top: 2px solid var(--colors-brand-green, #0D9B6F);
}

.cookie-consent-text {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  color: #333;
}

.cookie-consent-text a {
  color: var(--colors-brand-green, #0D9B6F);
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.cookie-consent-buttons button {
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Roboto Slab', serif;
  transition: opacity 0.15s ease, transform 0.15s ease;
  border: none;
}

.cookie-consent-buttons button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cookie-consent-buttons button:focus-visible {
  outline: 2px solid var(--colors-brand-green, #0D9B6F);
  outline-offset: 2px;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #0D9B6F 0%, #066B4A 100%);
  color: #fff;
}

.cookie-btn-reject {
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.cookie-btn-customize {
  background: transparent;
  color: #1f2937;
  border: 1px solid #9ca3af;
}

/* Customize Panel */
.cookie-consent-customize {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.cookie-consent-customize.visible {
  display: block;
}

.cookie-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-info {
  flex: 1;
}

.cookie-category-name {
  font-weight: 600;
  font-size: 13px;
  color: #111;
}

.cookie-category-desc {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 16px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  border-radius: 24px;
  transition: background-color 0.2s ease;
}

.cookie-toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: var(--colors-brand-green, #0D9B6F);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(20px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-toggle input:focus-visible + .cookie-toggle-slider {
  outline: 2px solid var(--colors-brand-green, #0D9B6F);
  outline-offset: 2px;
}

.cookie-consent-save {
  margin-top: 12px;
}

.cookie-consent-save button {
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Roboto Slab', serif;
  background: linear-gradient(135deg, #0D9B6F 0%, #066B4A 100%);
  color: #fff;
  border: none;
  transition: opacity 0.15s ease;
}

.cookie-consent-save button:hover {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 600px) {
  .cookie-consent-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 14px 14px 12px;
    border-radius: 18px;
    border-top-width: 1px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  }

  .cookie-consent-text {
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 12px;
  }

  .cookie-consent-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .cookie-consent-buttons button {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .cookie-btn-accept {
    box-shadow: 0 10px 24px rgba(13, 155, 111, 0.28);
    order: -1;
  }
  
  .cookie-btn-reject {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
  }

  .cookie-btn-customize {
    border: 1px solid #9ca3af;
    color: #4b5563;
  }

  .cookie-consent-customize {
    margin-top: 12px;
    padding-top: 12px;
  }
}

/* 7.4 Mobile Cookie Banner UX Fixes */
@media (max-width: 767px) {
    .cookie-consent-banner {
        padding: 16px;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        border-top: none;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    }
    .cookie-consent-text {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    .cookie-consent-buttons {
        gap: 8px;
    }
    .cookie-consent-buttons button {
        padding: 10px 14px;
        font-size: 12px;
        flex: 1; /* Make buttons take equal width */
    }
    /* Ensure Accept All stands out */
    .cookie-consent-buttons button:last-child,
    .cookie-consent-buttons button.accept-all,
    #cookie-accept {
        background-color: var(--colors-brand-green, #0D9B6F);
        color: white;
    }
    .cookie-consent-buttons button:first-child {
        background-color: #F3F4F6;
        color: #4B5563;
    }
}
