/* ==========================================================================
   amiGo — Cookie Consent
   Charte : teal #1A9CB0 / lime #A0D840 / fonts Montserrat + Poppins + Lato
   ========================================================================== */

/* ---- Banner ---- */
.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: #fff;
  box-shadow: 0 -4px 32px rgba(0,0,0,.12);
  padding: 1.25rem 0;
  animation: cc-slide-up .35s cubic-bezier(.4,0,.2,1);
}
.cc-banner[hidden] { display: none; }

@keyframes cc-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

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

.cc-banner-text {
  flex: 1;
  min-width: 200px;
  font-family: 'Lato', -apple-system, sans-serif;
  font-size: .9rem;
  color: #333;
  line-height: 1.55;
  margin: 0;
}

.cc-link {
  color: #1A9CB0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  font-weight: 600;
  white-space: nowrap;
}
.cc-link:hover { color: #0196B0; }

.cc-banner-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

/* ---- Shared button ---- */
.cc-btn {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: .83rem;
  font-weight: 600;
  padding: .65rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cc-btn:focus-visible {
  outline: 3px solid #A0D840;
  outline-offset: 2px;
}

/* Equal prominence: accept & refuse are both solid, same size */
.cc-btn--accept {
  background: #1A9CB0;
  color: #fff;
  border-color: #1A9CB0;
}
.cc-btn--accept:hover { background: #0196B0; border-color: #0196B0; }

.cc-btn--refuse {
  background: #1A1A1A;
  color: #fff;
  border-color: #1A1A1A;
}
.cc-btn--refuse:hover { background: #333; border-color: #333; }

.cc-btn--outline {
  background: transparent;
  color: #1A9CB0;
  border-color: #1A9CB0;
}
.cc-btn--outline:hover { background: #E8F8FB; }

.cc-btn--save {
  background: #A0D840;
  color: #1A1A1A;
  border-color: #A0D840;
}
.cc-btn--save:hover { background: #A9EB54; border-color: #A9EB54; }
.cc-btn--save:focus-visible { outline-color: #1A9CB0; }

/* ---- Overlay ---- */
.cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9001;
  background: rgba(26,26,26,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.cc-overlay[hidden] { display: none; }

/* ---- Modal ---- */
.cc-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9002;
  width: min(560px, 92vw);
  max-height: 90dvh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  outline: none;
  animation: cc-modal-in .25s cubic-bezier(.4,0,.2,1);
}
.cc-modal[hidden] { display: none; }

@keyframes cc-modal-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.cc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid #E5E5E5;
  flex-shrink: 0;
}

.cc-modal-title {
  font-family: 'Montserrat', -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -.02em;
  margin: 0;
}

.cc-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #777;
  padding: .4rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color .2s, background .2s;
  flex-shrink: 0;
}
.cc-modal-close:hover { color: #1A1A1A; background: #F3F4F6; }
.cc-modal-close:focus-visible { outline: 3px solid #A0D840; outline-offset: 2px; }

.cc-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.cc-modal-intro {
  font-family: 'Lato', -apple-system, sans-serif;
  font-size: .875rem;
  color: #5A5A5A;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

/* ---- Category rows ---- */
.cc-category {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid #E5E5E5;
}
.cc-category:last-child { border-bottom: none; padding-bottom: 0; }

.cc-cat-info { flex: 1; }

.cc-cat-title {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: .88rem;
  font-weight: 600;
  color: #1A1A1A;
  display: block;
  margin-bottom: .25rem;
}

.cc-cat-desc {
  font-family: 'Lato', -apple-system, sans-serif;
  font-size: .8rem;
  color: #777;
  line-height: 1.5;
  margin: 0;
}

.cc-always-on {
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: .75rem;
  font-weight: 600;
  color: #1A9CB0;
  white-space: nowrap;
  padding-top: .15rem;
  flex-shrink: 0;
}

/* ---- Toggle switch ---- */
.cc-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.cc-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cc-switch-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #D1D5DB;
  transition: background .25s ease;
  position: relative;
  flex-shrink: 0;
}

.cc-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .25s ease;
}

.cc-switch input:checked + .cc-switch-track { background: #1A9CB0; }
.cc-switch input:checked + .cc-switch-track::after { transform: translateX(20px); }

.cc-switch input:focus-visible + .cc-switch-track {
  outline: 3px solid #A0D840;
  outline-offset: 2px;
  border-radius: 14px;
}

/* ---- Modal footer ---- */
.cc-modal-footer {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  border-top: 1px solid #E5E5E5;
  background: #F9FAFB;
  flex-shrink: 0;
}

/* ---- Persistent manage button ---- */
.cc-manage-btn {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 8900;
  background: rgba(255,255,255,.96);
  color: #1A9CB0;
  border: 1.5px solid #D1D5DB;
  border-radius: 50px;
  font-family: 'Poppins', -apple-system, sans-serif;
  font-size: .72rem;
  font-weight: 600;
  padding: .45rem .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  transition: background .2s, border-color .2s, box-shadow .2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cc-manage-btn:hover {
  background: #E8F8FB;
  border-color: #1A9CB0;
  box-shadow: 0 4px 18px rgba(0,0,0,.14);
}
.cc-manage-btn:focus-visible { outline: 3px solid #A0D840; outline-offset: 2px; }
.cc-manage-btn[hidden] { display: none; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .cc-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: .875rem;
  }
  .cc-banner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
  }
  .cc-banner-actions .cc-btn:first-child {
    grid-column: 1 / -1;
  }
  .cc-modal-footer {
    flex-direction: column;
  }
  .cc-modal-footer .cc-btn { width: 100%; }
  .cc-manage-btn { bottom: 5.5rem; }
}
