/**
 * Estilos para Sistema de Consentimento de Cookies
 * LM Projetos e Sistemas - LGPD Compliant
 */

/* Banner simples de consentimento */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: none;
  background: rgba(33, 37, 41, 0.95);
  color: #ffffff;
  padding: 12px 16px;
  backdrop-filter: blur(6px);
}

.cookie-banner .cookie-banner-content {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-banner p {
  margin: 0;
  font-size: 14px;
  color: #f1f1f1;
}

.cookie-banner .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner .btn-accept {
  background: #388da8;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

.cookie-banner .btn-accept:hover {
  background: #2f7a90;
}

.cookie-banner a {
  color: #9bd0df;
  text-decoration: underline;
  font-size: 13px;
}

@media (max-width: 640px) {
  .cookie-banner .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (prefers-color-scheme: light) {
  .cookie-banner {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }
  .cookie-banner p {
    color: #3d4348;
  }
  .cookie-banner a {
    color: #388da8;
  }
}

/* Remoção visual do botão flutuante e notificações para modo simples */
.cookie-settings-button {
  display: none !important;
}
.cookie-success-notification {
  display: none !important;
}

/* Oculta elementos do modal complexo quando o modo simples estiver ativo */
.cookie-consent-modal,
.cookie-consent-overlay,
.cookie-consent-content {
  display: none !important;
}

.cookie-consent-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px;
  text-align: center;
}

.cookie-consent-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cookie-consent-header i {
  font-size: 1.6rem;
}

.cookie-consent-body {
  padding: 24px;
  max-height: 50vh;
  overflow-y: auto;
}

.cookie-consent-body p {
  margin-bottom: 20px;
  color: #555;
  line-height: 1.6;
}

/* Categorias de Cookies */
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cookie-category {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
}

.cookie-category:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.cookie-category-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cookie-category-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.cookie-category-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

/* Switch Toggle */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  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: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-switch input:checked + .cookie-slider {
  background-color: #667eea;
}

.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(26px);
}

.cookie-switch input:disabled + .cookie-slider {
  background-color: #4caf50;
  cursor: not-allowed;
}

.cookie-switch input:disabled + .cookie-slider:before {
  transform: translateX(26px);
}

/* Footer do Modal */
.cookie-consent-footer {
  background: #f8f9fa;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.cookie-consent-links a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
}

.cookie-consent-links a:hover {
  color: #5a67d8;
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-consent-buttons .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cookie-consent-buttons .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.cookie-consent-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cookie-consent-buttons .btn-secondary {
  background: #6c757d;
  color: white;
}

.cookie-consent-buttons .btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.cookie-consent-buttons .btn-outline-secondary {
  background: transparent;
  color: #6c757d;
  border: 2px solid #6c757d;
}

.cookie-consent-buttons .btn-outline-secondary:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
}

/* Botão de Configurações Flutuante */
.cookie-settings-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  animation: fadeInUp 0.5s ease-out 2s both;
}

.cookie-settings-button button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.cookie-settings-button button:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* Notificação de Sucesso */
.cookie-success-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.4s ease;
}

.cookie-success-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.notification-content i {
  font-size: 1.3rem;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .cookie-consent-content {
    width: 95%;
    margin: 2vh auto;
    max-height: 95vh;
  }

  .cookie-consent-header {
    padding: 20px;
  }

  .cookie-consent-header h3 {
    font-size: 1.2rem;
  }

  .cookie-consent-body {
    padding: 20px;
    max-height: 60vh;
  }

  .cookie-consent-footer {
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-buttons {
    justify-content: center;
  }

  .cookie-consent-buttons .btn {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cookie-switch {
    align-self: flex-start;
  }

  .cookie-settings-button {
    bottom: 15px;
    left: 15px;
  }

  .cookie-settings-button button {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .cookie-success-notification {
    top: 15px;
    right: 15px;
    left: 15px;
    transform: translateY(-100px);
  }

  .cookie-success-notification.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .cookie-consent-buttons {
    flex-direction: column;
  }

  .cookie-consent-buttons .btn {
    width: 100%;
  }
}

/* Modo Escuro */
@media (prefers-color-scheme: dark) {
  .cookie-consent-content {
    background: #2d3748;
    color: #e2e8f0;
  }

  .cookie-consent-body p {
    color: #cbd5e0;
  }

  .cookie-category {
    border-color: #4a5568;
    background: #374151;
  }

  .cookie-category:hover {
    border-color: #667eea;
  }

  .cookie-category-info h4 {
    color: #f7fafc;
  }

  .cookie-category-info p {
    color: #a0aec0;
  }

  .cookie-consent-footer {
    background: #1a202c;
  }
}

/* Acessibilidade */
.cookie-consent-modal:focus-within {
  outline: none;
}

.cookie-switch:focus-within {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.cookie-consent-buttons .btn:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Reduzir movimento para usuários sensíveis */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-modal,
  .cookie-consent-content,
  .cookie-success-notification,
  .cookie-settings-button button {
    animation: none;
    transition: none;
  }
}
