/* 
   CRIAMEDIA Cookie Consent Styles
   Premium minimalist design inspired by Vercel/Stripe.
*/

:root {
  --cookie-bg: rgba(255, 255, 255, 0.85);
  --cookie-border: rgba(0, 0, 0, 0.08);
  --cookie-text: #111;
  --cookie-sub: #666;
  --cookie-accent: #000;
  --cookie-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  --cookie-radius: 12px;
}

.cookie-banner {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 380px;
  max-width: calc(100vw - 4rem);
  background: var(--cookie-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--cookie-border);
  border-radius: var(--cookie-radius);
  padding: 1.5rem;
  box-shadow: var(--cookie-shadow);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.cookie-content h4 {
  font-family: 'Theinhardt', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  color: var(--cookie-text);
  letter-spacing: 0.02em;
}

.cookie-content p {
  font-family: 'Theinhardt', sans-serif;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--cookie-sub);
  margin: 0;
}

.cookie-content a {
  color: var(--cookie-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-btn {
  font-family: 'Theinhardt', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.cookie-btn--primary {
  background: var(--cookie-accent);
  color: #fff;
}

.cookie-btn--primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.cookie-btn--secondary {
  background: rgba(0,0,0,0.05);
  color: var(--cookie-text);
}

.cookie-btn--secondary:hover {
  background: rgba(0,0,0,0.1);
}

.cookie-btn--text {
  background: transparent;
  color: var(--cookie-sub);
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  font-size: 0.65rem;
}

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

/* Modal / Settings Overlay */
.cookie-settings-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.2);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-settings-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.cookie-settings-card {
  background: #fff;
  width: 440px;
  max-width: 90vw;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-settings-overlay.visible .cookie-settings-card {
  transform: scale(1);
}

.settings-header h3 {
  font-family: 'Theinhardt', sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-info h5 {
  font-size: 0.85rem;
  margin: 0 0 0.2rem;
}

.settings-info p {
  font-size: 0.72rem;
  color: #777;
  margin: 0;
  line-height: 1.4;
}

/* Standard Switch UI */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #eee;
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider {
  background-color: #000;
}

input:checked + .slider:before {
  transform: translateX(16px);
}

input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Tweaks */
@media (max-width: 600px) {
  .cookie-banner {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }
}
