/* ==============================================================================
   Screezy Cookie Consent System — Adapted from Uiverse.io by ilkhoeri
   Cyberpunk-Minimal Glassmorphism & Emerald Glow Palette
   ============================================================================== */

:root {
  --cookie-bg: rgba(9, 22, 11, 0.96);
  --cookie-border: rgba(75, 169, 40, 0.32);
  --cookie-glow: 0 18px 45px -10px rgba(0, 0, 0, 0.85), 0 0 28px -4px rgba(75, 169, 40, 0.22);
  --cookie-neon: #4ba928;
  --cookie-neon-bright: #5dc333;
  --cookie-neon-lime: #f5fe5a;
  --cookie-text: #f2fef5;
  --cookie-text-muted: #9cbca7;
}

/* Floating Banner Container */
.screezy-cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: calc(100% - 32px);
  max-width: 320px;
  background: var(--cookie-bg);
  border: 1px solid var(--cookie-border);
  border-radius: 20px;
  box-shadow: var(--cookie-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999999;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--cookie-text);
  padding-top: 36px;
  padding-left: 22px;
  padding-right: 22px;
  padding-bottom: 22px;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.screezy-cookie-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}

/* Floating Top Cookie Badge */
.screezy-cookie-badge {
  position: relative;
  margin: -62px auto 20px auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(75, 169, 40, 0.35), rgba(7, 16, 7, 0.95));
  border: 1.5px solid rgba(75, 169, 40, 0.5);
  box-shadow: 0 4px 20px rgba(75, 169, 40, 0.35), inset 0 0 12px rgba(93, 195, 51, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.screezy-cookie-badge svg {
  display: block;
  transform: scale(1.05);
}

/* Typography */
.screezy-cookie-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--cookie-text);
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
  text-align: left;
  width: 100%;
}

.screezy-cookie-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--cookie-text-muted);
  text-align: left;
  width: 100%;
  margin: 0 0 18px 0;
}

.screezy-cookie-link {
  color: var(--cookie-neon-bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
  cursor: pointer;
}

.screezy-cookie-link:hover {
  color: var(--cookie-neon-lime);
}

/* Action Controls */
.screezy-cookie-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  margin-top: 4px;
}

.screezy-cookie-btn-options {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cookie-text-muted);
  cursor: pointer;
  padding: 8px 4px;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
  text-align: left;
}

.screezy-cookie-btn-options:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.screezy-cookie-btn-accept {
  background: var(--cookie-neon);
  color: #040804;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 9px;
  padding: 8px 22px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(75, 169, 40, 0.4);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.screezy-cookie-btn-accept:hover {
  background: var(--cookie-neon-bright);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(93, 195, 51, 0.55);
}

.screezy-cookie-btn-accept:active {
  transform: translateY(0);
}

/* Close icon button */
.screezy-cookie-close-mini {
  position: absolute;
  top: -24px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cookie-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.screezy-cookie-close-mini:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ==============================================================================
   Preferences Modal (When clicking "More Options")
   ============================================================================== */
.screezy-cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 16px;
  box-sizing: border-box;
}

.screezy-cookie-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.screezy-cookie-modal {
  background: rgba(8, 18, 9, 0.98);
  border: 1px solid rgba(75, 169, 40, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(75, 169, 40, 0.25);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--cookie-text);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.screezy-cookie-modal-overlay.active .screezy-cookie-modal {
  transform: scale(1) translateY(0);
}

.screezy-cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.screezy-cookie-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* El dibujo nace a 65x46: aquí va a la altura de la línea de texto. */
.screezy-cookie-modal-title-icon {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.screezy-cookie-modal-title-icon svg {
  width: 26px;
  height: auto;
  display: block;
}

.screezy-cookie-modal-close {
  background: transparent;
  border: none;
  color: var(--cookie-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screezy-cookie-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.screezy-cookie-modal-intro {
  font-size: 13px;
  color: var(--cookie-text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.screezy-cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.screezy-cookie-cat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease;
}

.screezy-cookie-cat-item:hover {
  border-color: rgba(75, 169, 40, 0.3);
}

.screezy-cookie-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.screezy-cookie-cat-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.screezy-cookie-badge-req {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(75, 169, 40, 0.2);
  color: var(--cookie-neon-bright);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(75, 169, 40, 0.35);
}

.screezy-cookie-cat-desc {
  font-size: 12px;
  color: var(--cookie-text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Toggle Switch */
.screezy-cookie-toggle {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

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

.screezy-cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.screezy-cookie-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.screezy-cookie-toggle input:checked + .screezy-cookie-slider {
  background-color: var(--cookie-neon);
}

.screezy-cookie-toggle input:checked + .screezy-cookie-slider:before {
  transform: translateX(16px);
  background-color: #040804;
}

.screezy-cookie-toggle input:disabled + .screezy-cookie-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Modal Actions */
.screezy-cookie-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.screezy-cookie-btn-reject {
  background: transparent;
  color: var(--cookie-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.screezy-cookie-btn-reject:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}

.screezy-cookie-btn-save {
  background: rgba(75, 169, 40, 0.18);
  color: var(--cookie-neon-bright);
  border: 1px solid rgba(75, 169, 40, 0.45);
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.screezy-cookie-btn-save:hover {
  background: rgba(75, 169, 40, 0.28);
  border-color: var(--cookie-neon-bright);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
  .screezy-cookie-banner {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
    padding: 32px 18px 18px 18px;
  }

  .screezy-cookie-badge {
    margin-top: -54px;
    margin-bottom: 14px;
    width: 60px;
    height: 60px;
  }

  .screezy-cookie-badge svg {
    transform: scale(0.92);
  }

  .screezy-cookie-actions {
    flex-wrap: wrap;
  }

  .screezy-cookie-btn-accept {
    padding: 8px 18px;
  }

  .screezy-cookie-modal-actions {
    flex-direction: column-reverse;
    width: 100%;
  }

  .screezy-cookie-modal-actions button {
    width: 100%;
    text-align: center;
  }
}
