/* =========================================
   COOKIE CONSENT BANNER — TotalFluids
   GDPR/Consent Mode v2 compliant
   ========================================= */

.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: #1a2e22;
  color: #f0f4f1;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.18);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cc-banner.cc-hidden {
  display: none !important;
}

.cc-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cc-banner__text {
  flex: 1;
  min-width: 200px;
}

.cc-banner__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #ffffff;
}

.cc-banner__desc {
  color: #b8ccbe;
}

.cc-banner__desc a.cc-link {
  color: #6bc47e;
  text-decoration: underline;
}

.cc-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

.cc-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.cc-btn--accept {
  background: #2d7a4f;
  color: #fff;
  border-color: #2d7a4f;
}
.cc-btn--accept:hover, .cc-btn--accept:focus {
  background: #235f3d;
  border-color: #235f3d;
  outline: none;
}

.cc-btn--reject {
  background: transparent;
  color: #f0f4f1;
  border-color: #4a6654;
}
.cc-btn--reject:hover, .cc-btn--reject:focus {
  background: #2e3f34;
  outline: none;
}

.cc-btn--settings {
  background: transparent;
  color: #8fbfa0;
  border: none;
  text-decoration: underline;
  padding: 0.55rem 0.5rem;
  font-size: 0.8rem;
}
.cc-btn--settings:hover, .cc-btn--settings:focus {
  color: #6bc47e;
  outline: none;
}
.cc-settings {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0.55);
}

.cc-settings.cc-hidden { display: none !important; }

.cc-settings__panel {
  background: #fff;
  color: #333;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px 12px 0 0;
  padding: 1.5rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.cc-settings__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a2e22;
}

.cc-settings__close {
  float: right;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #666;
  line-height: 1;
  margin-top: -0.2rem;
}

.cc-category {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cc-category__label {
  flex: 1;
}

.cc-category__name {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.2rem;
  color: #222;
}

.cc-category__desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.4;
}
.cc-toggle {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-toggle__slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  cursor: pointer;
  transition: background 0.2s;
}

.cc-toggle__slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.cc-toggle input:checked + .cc-toggle__slider {
  background: #2d7a4f;
}

.cc-toggle input:checked + .cc-toggle__slider::before {
  transform: translateX(20px);
}

.cc-toggle input:disabled + .cc-toggle__slider {
  background: #2d7a4f;
  opacity: 0.7;
  cursor: not-allowed;
}

.cc-settings__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.cc-settings__actions .cc-btn {
  flex: 1;
  text-align: center;
  min-width: 120px;
}
.cc-footer-link {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  padding: 0;
}
.cc-footer-link:hover { color: #6bc47e; }

@media (max-width: 600px) {
  .cc-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .cc-banner__actions {
    justify-content: stretch;
  }
  .cc-btn {
    flex: 1;
    text-align: center;
  }
}
