/**
 * GuestBot Cookie Consent Styles
 * GDPR/CCPA compliant cookie banner and preference center
 */

/* ========================================
   Cookie Banner
   ======================================== */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #111111;
  border-top: 1px solid #2a2a2a;
  padding: 20px 24px;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

#cookie-consent-banner.visible {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-banner-text {
  flex: 1;
}

.cookie-banner-text strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 4px;
}

.cookie-banner-text p {
  color: #a3a3a3;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.cookie-banner-text a {
  color: #10b981;
  text-decoration: none;
}

.cookie-banner-text a:hover {
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ========================================
   Cookie Buttons
   ======================================== */
.cookie-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.cookie-btn-primary {
  background: #10b981;
  color: #ffffff;
}

.cookie-btn-primary:hover {
  background: #059669;
}

.cookie-btn-secondary {
  background: transparent;
  color: #d4d4d4;
  border: 1px solid #404040;
}

.cookie-btn-secondary:hover {
  background: #1a1a1a;
  border-color: #525252;
}

/* ========================================
   Preference Center Modal
   ======================================== */
#cookie-preference-center {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

#cookie-preference-center.visible {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.cookie-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  margin: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #1a1a1a;
}

.cookie-modal-header h2 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  color: #737373;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.cookie-modal-close:hover {
  color: #ffffff;
}

.cookie-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.cookie-modal-body > p {
  color: #a3a3a3;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ========================================
   Cookie Categories
   ======================================== */
.cookie-category {
  background: #111111;
  border: 1px solid #1a1a1a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.cookie-category:last-child {
  margin-bottom: 0;
}

.cookie-category-ccpa {
  border-color: #3b2f1a;
  background: linear-gradient(135deg, #111111 0%, #1a1510 100%);
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.cookie-category-info strong {
  color: #ffffff;
  font-size: 15px;
}

.cookie-category-desc {
  color: #737373;
  font-size: 13px;
  margin: 8px 0 0;
  line-height: 1.5;
}

/* ========================================
   Cookie Badges
   ======================================== */
.cookie-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cookie-badge-required {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.cookie-badge-ccpa {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

/* ========================================
   Toggle Switch
   ======================================== */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

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

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #2a2a2a;
  border-radius: 26px;
  transition: background 0.3s ease;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: #10b981;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(22px);
}

.cookie-toggle input:focus + .cookie-toggle-slider {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* ========================================
   Modal Footer
   ======================================== */
.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #1a1a1a;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 640px) {
  #cookie-consent-banner {
    padding: 16px;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-banner-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .cookie-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .cookie-modal {
    margin: 10px;
    max-height: calc(100vh - 20px);
  }

  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding: 16px;
  }

  .cookie-modal-footer {
    flex-direction: column;
  }

  .cookie-modal-footer .cookie-btn {
    width: 100%;
  }
}
