/* Cookie Consent Component - Kobestarr Digital */

.cc-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 20px;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: #1f2937;
  opacity: 0;
  transform: translateY(20px) translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.cc-banner.cc-visible {
  opacity: 1;
  transform: translateY(0) translateX(0);
  pointer-events: auto;
}

.cc-banner.cc-hiding {
  opacity: 0;
  transform: translateY(20px) translateX(20px);
  pointer-events: none;
}

/* Pulse animation for scroll nudge */
@keyframes cc-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.cc-banner.cc-pulse {
  animation: cc-pulse 0.6s ease-in-out;
}

/* Header */
.cc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.cc-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--pt-primary, #10b981);
}

.cc-heading {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

/* Body text */
.cc-body {
  font-size: 13px;
  line-height: 1.55;
  color: #6b7280;
  margin: 0 0 16px;
}

/* Toggle rows */
.cc-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.cc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cc-toggle-name {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
}

.cc-toggle-desc {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.3;
}

/* Accessible toggle switch */
.cc-switch {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  background: #d1d5db;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.cc-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cc-switch[aria-checked="true"] {
  background: var(--pt-primary, #10b981);
}

.cc-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.cc-switch:focus-visible {
  outline: 2px solid var(--pt-primary, #10b981);
  outline-offset: 2px;
}

/* Hidden states for two-stage UX */
.cc-toggles-hidden {
  display: none;
}

.cc-hidden {
  display: none !important;
}

/* Buttons */
.cc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.cc-actions-expanded {
  margin-bottom: 8px;
}

.cc-btn {
  flex: 1;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  line-height: 1;
}

.cc-btn:focus-visible {
  outline: 2px solid var(--pt-primary, #10b981);
  outline-offset: 2px;
}

.cc-btn-primary {
  background: var(--pt-primary, #10b981);
  color: #ffffff;
}

.cc-btn-primary:hover {
  filter: brightness(0.9);
}

.cc-btn-secondary {
  background: transparent;
  color: #1f2937;
  border: 1.5px solid #e5e7eb;
}

.cc-btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.cc-btn-link {
  flex: none;
  background: none;
  color: #6b7280;
  padding: 10px 4px;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-btn-link:hover {
  color: #1f2937;
}

/* Footer links */
.cc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cc-reject {
  font-family: inherit;
  font-size: 12px;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-reject:hover {
  color: #6b7280;
}

.cc-reject:focus-visible {
  outline: 2px solid var(--pt-primary, #10b981);
  outline-offset: 2px;
}

.cc-privacy {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-privacy:hover {
  color: #6b7280;
}

.cc-privacy:focus-visible {
  outline: 2px solid var(--pt-primary, #10b981);
  outline-offset: 2px;
}

/* Mobile: full-width bar at bottom */
@media (max-width: 639px) {
  .cc-banner {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    padding: 16px;
    transform: translateY(100%);
  }

  .cc-banner.cc-visible {
    transform: translateY(0);
  }

  .cc-banner.cc-hiding {
    transform: translateY(100%);
  }

  .cc-body {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .cc-toggles {
    padding: 10px;
    margin-bottom: 12px;
  }
}

/* Print: hide entirely */
@media print {
  .cc-banner {
    display: none !important;
  }
}
