/**
 * Cookie Consent Styles - LGPD Compliant
 * Estilos para banner e modal de cookies
 */

/* Banner de Cookies */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #ffffff;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 999999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 3px solid #0066ff;
}

.cookie-banner.show {
  transform: translateY(0);
}

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

.cookie-banner-text h4 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-text p {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-policy-link {
  color: #4da6ff;
  text-decoration: underline;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.cookie-policy-link:hover {
  color: #80c1ff;
}

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

/* Botões */
.cookie-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cookie-btn-primary {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.cookie-btn-primary:hover {
  background: linear-gradient(135deg, #0052cc 0%, #0041a3 100%);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
  transform: translateY(-2px);
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.cookie-btn-outline {
  background: transparent;
  color: #0066ff;
  border: 2px solid #0066ff;
}

.cookie-btn-outline:hover {
  background: #0066ff;
  color: #ffffff;
}

/* Modal de Configurações */
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cookie-modal.show {
  opacity: 1;
  visibility: visible;
}

.cookie-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.cookie-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
  transform: scale(1);
}

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

.cookie-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: #666;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.cookie-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

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

.cookie-modal-intro {
  margin: 0 0 24px 0;
  padding: 16px;
  background: #f8f9fa;
  border-left: 4px solid #0066ff;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

/* Categorias de Cookies */
.cookie-category {
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s;
}

.cookie-category:hover {
  border-color: #0066ff;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.1);
}

.cookie-category-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cookie-category-info h5 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-category-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.cookie-required {
  font-size: 0.75rem;
  color: #0066ff;
  font-weight: 600;
  background: rgba(0, 102, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.cookie-category-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.cookie-category-details small {
  font-size: 0.8rem;
  color: #888;
}

/* Toggle Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

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

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
  background-color: #0066ff;
}

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

.cookie-switch input:disabled + .cookie-slider {
  background-color: #0066ff;
  opacity: 0.6;
  cursor: not-allowed;
}

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

/* Responsividade */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .cookie-btn {
    width: 100%;
    justify-content: center;
  }

  .cookie-modal-content {
    width: 95%;
    max-height: 95vh;
  }

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

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

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

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

  .cookie-category-header {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .cookie-banner {
    padding: 16px;
  }

  .cookie-banner-text h4 {
    font-size: 1.1rem;
  }

  .cookie-banner-text p {
    font-size: 0.9rem;
  }

  .cookie-modal-header h3 {
    font-size: 1.2rem;
  }

  .cookie-btn {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

/* Animações */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

/* Link no footer para abrir configurações */
.footer-cookie-settings {
  color: #0066ff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-cookie-settings:hover {
  color: #0052cc;
}

/* Badge de status de cookies */
.cookie-status-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #0066ff;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
  cursor: pointer;
  z-index: 999998;
  transition: all 0.3s;
}

.cookie-status-badge:hover {
  background: #0052cc;
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.4);
  transform: translateY(-2px);
}
