/* ==========================================================================
   Unlimited Funds — Privacy, Cookie Consent & GPC Banner Styles
   Compliant with CCPA/CPRA (California), GDPR, and Global Privacy Control
   ========================================================================== */

:root {
  --upc-bg: rgba(14, 56, 70, 0.94);
  --upc-border: rgba(255, 255, 255, 0.16);
  --upc-gold: #F7A91B;
  --upc-teal: #006C80;
  --upc-turq: #00C3CF;
  --upc-text: #F3F6F5;
  --upc-muted: rgba(243, 246, 245, 0.76);
  --upc-dark: #07242E;
}

/* Floating Banner */
#unlimited-privacy-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 980px;
  margin: 0 auto;
  z-index: 999999;
  background: var(--upc-bg);
  border: 1px solid var(--upc-border);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.2);
  padding: 16px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--upc-text);
  animation: upcSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes upcSlideUp {
  from {
    transform: translateY(120%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.upc-content {
  flex: 1 1 auto;
  min-width: 0;
}

.upc-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upc-title-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 195, 207, 0.2);
  color: var(--upc-turq);
  border: 1px solid rgba(0, 195, 207, 0.3);
  font-weight: 600;
}

.upc-description {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--upc-muted);
  margin: 0;
}

.upc-description a {
  color: var(--upc-turq);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.upc-btn {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: none;
  outline: none;
}

.upc-btn-primary {
  background: var(--upc-gold);
  color: #0E3846;
  font-weight: 700;
}

.upc-btn-primary:hover {
  background: #ffb733;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(247, 169, 27, 0.35);
}

.upc-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.upc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.upc-btn-link {
  background: transparent;
  color: var(--upc-muted);
  padding: 8px 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upc-btn-link:hover {
  color: #FFFFFF;
}

/* Preferences Modal Overlay */
#unlimited-privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(7, 36, 46, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: upcFadeIn 0.2s ease forwards;
}

@keyframes upcFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.upc-modal-dialog {
  background: #0E3846;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  padding: 24px;
  box-sizing: border-box;
  color: var(--upc-text);
  font-family: 'Inter', -apple-system, sans-serif;
}

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

.upc-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.upc-modal-close {
  background: transparent;
  border: none;
  color: var(--upc-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.upc-modal-close:hover {
  color: #FFFFFF;
}

.upc-gpc-notice {
  background: rgba(0, 195, 207, 0.12);
  border: 1px solid rgba(0, 195, 207, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.45;
  color: #F3F6F5;
}

.upc-pref-group {
  margin-bottom: 14px;
  background: rgba(0, 108, 128, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.upc-pref-interactive {
  cursor: pointer;
}

.upc-pref-interactive:hover {
  background: rgba(0, 108, 128, 0.25);
  border-color: rgba(0, 195, 207, 0.25);
}

.upc-pref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.upc-pref-title-label {
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.upc-pref-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.upc-pref-status {
  font-size: 11px;
  color: var(--upc-turq);
  font-weight: 600;
  text-transform: uppercase;
}

.upc-pref-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--upc-muted);
  margin: 0;
}

/* Toggle Switch */
.upc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.upc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  pointer-events: none;
}

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

.upc-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .22s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input:checked + .upc-slider {
  background-color: var(--upc-gold);
}

input:checked + .upc-slider:before {
  transform: translateX(18px);
  background-color: #0E3846;
}

.upc-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  #unlimited-privacy-banner {
    flex-direction: column;
    align-items: stretch;
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 14px;
    gap: 14px;
  }
  .upc-actions {
    flex-wrap: wrap;
  }
  .upc-btn {
    flex: 1 1 auto;
    text-align: center;
  }
}
