/**
 * ezCookies - Estilos do Sistema de Gestão de Cookies (LGPD Compliance)
 */

/* Reset e Base */
.ezcookies-banner,
.ezcookies-settings,
.ezcookies-banner *,
.ezcookies-settings * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Banner de Cookies */
.ezcookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.ezcookies-banner.ezcookies-show {
  transform: translateY(0);
}

.ezcookies-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.ezcookies-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header com título e link de privacidade */
.ezcookies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.ezcookies-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.ezcookies-privacy-link {
  color: #f5821f;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.ezcookies-privacy-link:hover {
  color: #d46a1a;
  text-decoration: underline;
}

.ezcookies-text {
  font-size: 14px;
  color: #4a4a4a;
  line-height: 1.6;
  margin: 0;
}

/* Botões */
.ezcookies-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ezcookies-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.ezcookies-btn:focus {
  outline: 2px solid #f5821f;
  outline-offset: 2px;
}

.ezcookies-btn-accept {
  background: #f5821f;
  color: #ffffff;
}

.ezcookies-btn-accept:hover {
  background: #d46a1a;
}

.ezcookies-btn-settings {
  background: #f0f0f0;
  color: #333333;
}

.ezcookies-btn-settings:hover {
  background: #e0e0e0;
}

.ezcookies-btn-reject {
  background: transparent;
  color: #666666;
  border: 1px solid #cccccc;
}

.ezcookies-btn-reject:hover {
  background: #f5f5f5;
  border-color: #999999;
}

.ezcookies-btn-save {
  background: #28a745;
  color: #ffffff;
}

.ezcookies-btn-save:hover {
  background: #218838;
}

/* Painel de Configurações */
.ezcookies-settings {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.ezcookies-settings.ezcookies-show {
  opacity: 1;
  visibility: visible;
}

.ezcookies-settings-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.ezcookies-settings-container {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ezcookies-settings.ezcookies-show .ezcookies-settings-container {
  transform: scale(1) translateY(0);
}

.ezcookies-settings-content {
  padding: 32px;
}

.ezcookies-settings-content .ezcookies-header {
  margin-bottom: 16px;
}

.ezcookies-settings-content .ezcookies-text {
  margin-bottom: 24px;
}

/* Categorias */
.ezcookies-categories {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.ezcookies-category {
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fafafa;
  transition: border-color 0.2s ease;
}

.ezcookies-category:hover {
  border-color: #cccccc;
}

.ezcookies-category-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ezcookies-category-info {
  flex: 1;
  min-width: 0;
}

.ezcookies-category-name {
  margin: 0 0 4px 0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ezcookies-required {
  font-size: 12px;
  font-weight: 500;
  color: #666666;
  background: #e8e8e8;
  padding: 2px 8px;
  border-radius: 4px;
}

.ezcookies-category-desc {
  margin: 0;
  font-size: 13px;
  color: #666666;
  line-height: 1.5;
}

/* Switch Toggle */
.ezcookies-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ezcookies-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ezcookies-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cccccc;
  transition: background-color 0.3s ease;
  border-radius: 26px;
}

.ezcookies-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: transform 0.3s ease;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ezcookies-switch input:checked + .ezcookies-slider {
  background-color: #28a745;
}

.ezcookies-switch input:focus + .ezcookies-slider {
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
}

.ezcookies-switch input:checked + .ezcookies-slider:before {
  transform: translateX(22px);
}

.ezcookies-switch input:disabled + .ezcookies-slider {
  opacity: 0.7;
  cursor: not-allowed;
  background-color: #f5821f;
}

.ezcookies-switch input:disabled:checked + .ezcookies-slider {
  background-color: #f5821f;
}

/* Link do Rodapé */
.ezcookies-footer-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
}

.ezcookies-footer-link:hover {
  opacity: 0.8;
}

/* Botão Flutuante de Cookie */
.ezcookies-floating-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #f5821f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999998;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
}

.ezcookies-floating-button.ezcookies-floating-show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.ezcookies-floating-button:hover {
  background: #fff5eb;
  border-color: #d46a1a;
  box-shadow: 0 6px 16px rgba(245, 130, 31, 0.25), 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.ezcookies-floating-button:active {
  transform: scale(0.95);
}

.ezcookies-floating-button:focus {
  outline: 2px solid #f5821f;
  outline-offset: 4px;
}

.ezcookies-floating-button svg {
  display: block;
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.ezcookies-floating-button:hover svg {
  transform: rotate(15deg) scale(1.1);
}

/* Animação de pulso (opcional) */
@keyframes ezcookies-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 4px 12px rgba(245, 130, 31, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 8px rgba(245, 130, 31, 0.1);
  }
}

/* Aplicar animação apenas quando não há consentimento */
.ezcookies-floating-button:not(.ezcookies-has-consent) {
  animation: ezcookies-pulse 2s ease-in-out infinite;
}

/* Responsividade */
@media (max-width: 768px) {
  .ezcookies-container {
    padding: 20px 16px;
  }

  .ezcookies-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ezcookies-title {
    font-size: 16px;
  }

  .ezcookies-text {
    font-size: 13px;
  }

  .ezcookies-actions {
    flex-direction: column;
    width: 100%;
  }

  .ezcookies-btn {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  .ezcookies-settings {
    padding: 12px;
  }

  .ezcookies-settings-container {
    max-height: calc(100vh - 24px);
    border-radius: 8px;
  }

  .ezcookies-settings-content {
    padding: 24px 20px;
  }

  .ezcookies-category {
    padding: 14px;
  }

  .ezcookies-category-header {
    gap: 12px;
  }

  .ezcookies-category-name {
    font-size: 14px;
  }

  .ezcookies-category-desc {
    font-size: 12px;
  }

  /* Botão flutuante responsivo */
  .ezcookies-floating-button {
    width: 48px;
    height: 48px;
    bottom: 16px;
    left: 16px;
  }

  .ezcookies-floating-button svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .ezcookies-container {
    padding: 16px 12px;
  }

  .ezcookies-settings-content {
    padding: 20px 16px;
  }

  .ezcookies-category {
    padding: 12px;
  }

  .ezcookies-switch {
    width: 44px;
    height: 24px;
  }

  .ezcookies-slider:before {
    height: 18px;
    width: 18px;
  }

  .ezcookies-switch input:checked + .ezcookies-slider:before {
    transform: translateX(20px);
  }
}

/* Acessibilidade - Reduzir movimento */
@media (prefers-reduced-motion: reduce) {
  .ezcookies-banner,
  .ezcookies-settings,
  .ezcookies-settings-container,
  .ezcookies-slider,
  .ezcookies-slider:before,
  .ezcookies-btn {
    transition: none;
  }
}

/* Print - Ocultar */
@media print {
  .ezcookies-banner,
  .ezcookies-settings {
    display: none !important;
  }
}
