/* LocalKard Standard Cookie & Storage Consent Banner Styles */
#localkard-cookie-banner-overlay {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 680px;
  margin: 0 auto;
  z-index: 2147483647; /* Maximum z-index to appear on top of Streamlit & PWA */
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  padding: 24px;
  box-sizing: border-box;
  animation: lkCookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lkCookieSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#localkard-cookie-banner-overlay * {
  box-sizing: border-box;
}

.lk-cookie-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.lk-cookie-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.lk-cookie-title-wrap h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.2px;
}

.lk-cookie-title-wrap span {
  font-size: 0.75rem;
  color: #A78BFA;
  font-weight: 600;
}

.lk-cookie-text {
  font-size: 0.86rem;
  line-height: 1.55;
  color: #CBD5E1;
  margin: 0 0 16px 0;
}

.lk-cookie-text a {
  color: #A78BFA;
  text-decoration: underline;
  font-weight: 600;
}

.lk-cookie-text a:hover {
  color: #C4B5FD;
}

.lk-cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lk-btn-allow-all {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  color: #FFFFFF;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.lk-btn-allow-all:hover {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  transform: translateY(-1px);
}

.lk-btn-customize {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lk-btn-customize:hover {
  background: rgba(139, 92, 246, 0.2);
  color: #FFFFFF;
  border-color: #A78BFA;
}

.lk-btn-deny {
  background: transparent;
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lk-btn-deny:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #F1F5F9;
  border-color: #CBD5E1;
}

/* Granular Preferences Drawer */
#lk-cookie-drawer {
  display: none;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lk-cookie-option {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.lk-cookie-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.lk-cookie-option-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #F8FAFC;
}

.lk-badge-essential {
  background: rgba(34, 197, 94, 0.15);
  color: #4ADE80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.lk-cookie-option-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94A3B8;
  margin: 0;
}

.lk-drawer-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-end;
}

.lk-btn-save-prefs {
  background: #7C3AED;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.lk-btn-save-prefs:hover {
  background: #6D28D9;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  #localkard-cookie-banner-overlay {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px;
    max-height: 85vh;
    overflow-y: auto;
  }
  .lk-cookie-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .lk-btn-allow-all, .lk-btn-customize, .lk-btn-deny {
    width: 100%;
    text-align: center;
    padding: 11px;
  }
}

