/* =============================================
   MALTALOCKERS — COOKIE CONSENT BANNER (GDPR)
   cookie-consent.css
   ============================================= */

/* ── Overlay backdrop (shown when banner is open) ── */
#cookie-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 60, 0.55);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#cookie-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* ── Banner ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #0a1f3c;
  color: #fff;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.35);
  border-top: 3px solid #fdca0b;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}
#cookie-banner.show {
  transform: translateY(0);
}

/* Icon */
#cookie-banner .cc-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

/* Text block */
#cookie-banner .cc-text {
  flex: 1;
  min-width: 240px;
}
#cookie-banner .cc-text h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
#cookie-banner .cc-text p {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
  margin: 0;
}
#cookie-banner .cc-text a {
  color: #fdca0b;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cookie-banner .cc-text a:hover { color: #fdd84a; }

/* Buttons */
#cookie-banner .cc-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

#cookie-banner .cc-btn {
  padding: 11px 22px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s ease;
}
#cookie-banner .cc-accept {
  background: #fdca0b;
  color: #0a1f3c;
}
#cookie-banner .cc-accept:hover {
  background: #fdd84a;
  transform: translateY(-1px);
}
#cookie-banner .cc-necessary {
  background: transparent;
  color: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.25);
}
#cookie-banner .cc-necessary:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}
#cookie-banner .cc-settings-btn {
  background: transparent;
  color: rgba(255,255,255,0.5);
  border: none;
  font-size: 0.78rem;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-family: 'DM Sans', sans-serif;
}
#cookie-banner .cc-settings-btn:hover { color: #fff; }

/* ── Settings modal ── */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#cookie-modal.show {
  opacity: 1;
  pointer-events: auto;
}
#cookie-modal .cc-modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-height: 90vh;
  overflow-y: auto;
}
#cookie-modal h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  color: #0a1f3c;
  margin-bottom: 8px;
}
#cookie-modal .cc-modal-intro {
  font-size: 0.88rem;
  color: #5a6a7e;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Toggle rows */
.cc-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #dde4ef;
}
.cc-toggle-row:last-of-type { border-bottom: none; }
.cc-toggle-label strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0a1f3c;
  margin-bottom: 3px;
}
.cc-toggle-label span {
  font-size: 0.82rem;
  color: #5a6a7e;
  line-height: 1.5;
}

/* Toggle switch */
.cc-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cc-toggle-slider {
  position: absolute;
  inset: 0;
  background: #dde4ef;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s;
}
.cc-toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cc-toggle input:checked + .cc-toggle-slider { background: #fdca0b; }
.cc-toggle input:checked + .cc-toggle-slider::before { transform: translateX(20px); }
.cc-toggle input:disabled + .cc-toggle-slider { background: #fdca0b; opacity: 0.6; cursor: not-allowed; }
.cc-toggle input:disabled + .cc-toggle-slider::before { transform: translateX(20px); }

/* Modal actions */
.cc-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.cc-modal-save {
  flex: 1;
  padding: 13px;
  background: #0a1f3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.cc-modal-save:hover { background: #122d56; }
.cc-modal-accept-all {
  flex: 1;
  padding: 13px;
  background: #fdca0b;
  color: #0a1f3c;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.cc-modal-accept-all:hover { background: #fdd84a; }

/* ── Mobile ── */
@media (max-width: 600px) {
  #cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding: 16px 16px 20px 16px;
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
  }
  #cookie-banner .cc-icon { display: none; }
  #cookie-banner .cc-text {
    min-width: unset;
    width: 100%;
    box-sizing: border-box;
  }
  #cookie-banner .cc-text h3 { font-size: 0.95rem; margin-bottom: 4px; }
  #cookie-banner .cc-text p {
    font-size: 0.78rem;
    /* Truncate long text on mobile */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  #cookie-banner .cc-actions {
    width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    gap: 8px;
  }
  #cookie-banner .cc-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 13px;
    white-space: normal;
  }
  #cookie-banner .cc-settings-btn {
    width: 100%;
    text-align: center;
    padding: 6px;
  }
  #cookie-modal .cc-modal-box {
    padding: 24px 18px;
    margin: 0 8px;
  }
  #cookie-backdrop {
    background: rgba(10, 31, 60, 0.3);
  }
}
