/**
 * Cookie Consent Banner Styles
 * Designed to work with Tailwind CSS
 */

/* Banner overlay */
#consent-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  animation: fadeIn 0.3s ease-in;
}

/* Non-blocking banner for non-GDPR regions (US/CCPA) */
#consent-banner.non-blocking {
  background-color: transparent;
  height: auto;
  pointer-events: none;
}

#consent-banner.non-blocking .consent-modal {
  pointer-events: auto;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.2), 0 -2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Banner content box */
.consent-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 2rem;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  max-height: 90vh;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .consent-modal {
    bottom: 2rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 600px;
    border-radius: 0.5rem;
  }
}

/* Customize modal */
#consent-customize-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Buttons */
.consent-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 1rem;
}

.consent-btn-primary {
  background: linear-gradient(90deg, #d53369 0%, #daae51 100%);
  color: white;
}

.consent-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.consent-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.consent-btn-secondary:hover {
  background: #e5e7eb;
}

.consent-btn-link {
  background: transparent;
  color: #d53369;
  text-decoration: underline;
}

.consent-btn-link:hover {
  color: #b02856;
}

/* Toggle switch for preferences */
.consent-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

.consent-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.consent-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.consent-toggle input:checked + .consent-toggle-slider {
  background: linear-gradient(90deg, #d53369 0%, #daae51 100%);
}

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

.consent-toggle input:disabled + .consent-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Preference row */
.consent-pref-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.consent-pref-row:last-child {
  border-bottom: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Close button */
.consent-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

.consent-close:hover {
  color: #374151;
}
