/* ==========================================================================
   RVZ GDPR Cookie Consent Banner & Preferences Modal
   Bespoke Dark Glassmorphism for Reinhardt van Zyl Portfolio
   ========================================================================== */

:root {
  --rvz-cookie-bg: rgba(11, 23, 21, 0.94);
  --rvz-cookie-border: rgba(180, 245, 76, 0.22);
  --rvz-cookie-border-subtle: rgba(255, 255, 255, 0.1);
  --rvz-cookie-lime: #b4f54c;
  --rvz-cookie-lime-hover: #c4f964;
  --rvz-cookie-dark: #091819;
  --rvz-cookie-text: #f0f7f4;
  --rvz-cookie-text-muted: rgba(240, 247, 244, 0.72);
  --rvz-cookie-text-dim: rgba(240, 247, 244, 0.45);
}

.rvz-cookie-banner {
  position: fixed;
  bottom: 1.75rem;
  left: 1.75rem;
  z-index: 999999;
  width: calc(100% - 3.5rem);
  max-width: 440px;
  background: linear-gradient(145deg, rgba(13, 27, 24, 0.96) 0%, rgba(8, 17, 16, 0.98) 100%);
  border: 1px solid var(--rvz-cookie-border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(180, 245, 76, 0.2), 0 0 40px rgba(180, 245, 76, 0.05);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  color: var(--rvz-cookie-text);
  font-family: 'Mona Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 1.5rem;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header */
.rvz-cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.rvz-cookie-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rvz-cookie-lime);
  background: rgba(180, 245, 76, 0.08);
  border: 1px solid rgba(180, 245, 76, 0.2);
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
}

.rvz-cookie-banner svg {
  flex-shrink: 0;
}

.rvz-cookie-icon {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: inline-block !important;
  vertical-align: middle;
}

.rvz-cookie-close {
  background: none;
  border: none;
  color: var(--rvz-cookie-text-dim);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
  line-height: 1;
}

.rvz-cookie-close svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  display: block !important;
}

.rvz-cookie-close:hover {
  color: var(--rvz-cookie-text);
  background-color: rgba(255, 255, 255, 0.08);
}

/* Title & Body */
.rvz-cookie-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.5rem 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.rvz-cookie-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--rvz-cookie-text-muted);
  margin: 0 0 1.25rem 0;
}

.rvz-cookie-desc a {
  color: var(--rvz-cookie-lime);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.rvz-cookie-desc a:hover {
  color: var(--rvz-cookie-lime-hover);
}

/* Actions Row */
.rvz-cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.rvz-cookie-btn-group {
  display: flex;
  gap: 0.6rem;
}

.rvz-cookie-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: 9999px;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.rvz-cookie-btn-primary {
  flex: 1;
  background: var(--rvz-cookie-lime);
  color: var(--rvz-cookie-dark);
  box-shadow: 0 4px 16px rgba(180, 245, 76, 0.25);
}

.rvz-cookie-btn-primary:hover {
  background: var(--rvz-cookie-lime-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(180, 245, 76, 0.35);
}

.rvz-cookie-btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  color: var(--rvz-cookie-text);
  border: 1px solid var(--rvz-cookie-border-subtle);
}

.rvz-cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.rvz-cookie-customize-btn {
  background: none;
  border: none;
  color: var(--rvz-cookie-text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  padding: 0.4rem 0.6rem;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  align-self: center;
  width: auto;
}

.rvz-cookie-customize-btn svg {
  width: 12px !important;
  height: 12px !important;
  max-width: 12px !important;
  max-height: 12px !important;
  display: inline-block !important;
  vertical-align: middle;
}

.rvz-cookie-customize-btn:hover {
  color: var(--rvz-cookie-lime);
}

/* Preferences View */
.rvz-cookie-view-prefs {
  display: none;
}

.rvz-cookie-banner.is-customizing .rvz-cookie-view-default {
  display: none;
}

.rvz-cookie-banner.is-customizing .rvz-cookie-view-prefs {
  display: block;
}

.rvz-cookie-prefs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.rvz-cookie-back-btn {
  background: none;
  border: none;
  color: var(--rvz-cookie-lime);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.rvz-cookie-back-btn svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: inline-block !important;
  vertical-align: middle;
}

.rvz-cookie-back-btn:hover {
  color: var(--rvz-cookie-lime-hover);
}

.rvz-cookie-category-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.rvz-cookie-category-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--rvz-cookie-border-subtle);
  border-radius: 12px;
  padding: 0.85rem;
  transition: border-color 0.2s;
}

.rvz-cookie-category-item:hover {
  border-color: rgba(180, 245, 76, 0.25);
}

.rvz-cookie-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.rvz-cookie-category-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.rvz-cookie-category-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--rvz-cookie-text-muted);
  margin: 0;
}

.rvz-cookie-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rvz-cookie-lime);
  background: rgba(180, 245, 76, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

/* Custom Toggle Switch */
.rvz-cookie-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

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

.rvz-cookie-toggle-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: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.rvz-cookie-toggle input:checked + .rvz-cookie-toggle-slider:before {
  transform: translateX(18px);
  background-color: var(--rvz-cookie-dark);
}

.rvz-cookie-toggle input:focus-visible + .rvz-cookie-toggle-slider {
  outline: 2px solid var(--rvz-cookie-lime);
  outline-offset: 2px;
}

/* Scrollbar for category list */
.rvz-cookie-category-list::-webkit-scrollbar {
  width: 4px;
}
.rvz-cookie-category-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.rvz-cookie-category-list::-webkit-scrollbar-thumb {
  background: rgba(180, 245, 76, 0.2);
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 600px) {
  .rvz-cookie-banner {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    padding: 1.25rem;
    border-radius: 16px;
  }
  
  .rvz-cookie-btn-group {
    flex-direction: column;
  }
}
