/* Voyager2 Frontend Styles */

:root {
  --voyager2-primary: #4285f4; /* Blue */
  --voyager2-secondary: #8d00ff; /* Purple */
  --voyager2-accent: #c50491; /* Pink */
  --voyager2-light: #f0f4ff;
  --voyager2-dark: #333;
  --voyager2-white: #fff;
  --voyager2-gray: #f5f5f7;
  --voyager2-border: #e0e0e6;
  --voyager2-premium: #ffd700; /* Gold for premium features */
  --voyager2-bubble-icon: #ffd700; /* Gold for bubble icon */
}

/* Estilos gerais do formulário */
.voyager2-preferences-form {
  max-width: 1200px;
  margin: 0 auto;
  padding: 25px;
  background-color: var(--voyager2-white);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  
}

.voyager2-preferences-form h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-weight: 500;
}

.voyager2-preferences-form .form-group {
  margin-bottom: 24px;
}

/* Topics grid styling */
.voyager2-preferences-form .topics-group {
  background-color: var(--voyager2-light);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--voyager2-primary);
  transition: all 0.3s ease;
  
}

.voyager2-preferences-form .topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.voyager2-preferences-form .topic-checkbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--voyager2-white);
  border: 2px solid var(--voyager2-border);
  border-radius: 8px;
  padding: 15px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: center;
}

.voyager2-preferences-form .topic-checkbox:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--voyager2-primary);
}

.voyager2-preferences-form .topic-checkbox.selected {
  border-color: var(--voyager2-primary);
  background-color: var(--voyager2-light);
}

.voyager2-preferences-form .topic-checkbox.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.voyager2-preferences-form .topic-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}

.voyager2-preferences-form .topic-icon {
  font-size: 24px;
  color: var(--voyager2-primary);
  margin-bottom: 8px;
}

.voyager2-preferences-form .topic-name {
  font-weight: 500;
  color: var(--voyager2-dark);
}

/* Enhanced styling for frequency group */
.voyager2-preferences-form .frequency-group {
  background-color: var(--voyager2-light);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--voyager2-secondary);
  transition: all 0.3s ease;
}

.voyager2-preferences-form .frequency-group:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.voyager2-preferences-form .frequency-group > label {
  color: #333;
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 15px;
  display: block;
}

.voyager2-preferences-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--voyager2-dark);
}

.voyager2-preferences-form .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.voyager2-preferences-form .radio-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 16px;
  background-color: var(--voyager2-white);
  border-radius: 20px;
  transition: all 0.2s;
  position: relative;
  border: 2px solid transparent;
}

.voyager2-preferences-form .radio-group label:hover {
  background-color: rgba(66, 133, 244, 0.1);
}

.voyager2-preferences-form input[type="radio"] {
  margin-right: 8px;
  accent-color: var(--voyager2-primary);
}

.voyager2-preferences-form .radio-group input[type="radio"]:checked + span {
  color: var(--voyager2-primary);
  font-weight: 500;
}

.voyager2-preferences-form input[type="radio"]:checked {
  accent-color: var(--voyager2-secondary);
}

/* Styling for selected frequency option */
.voyager2-preferences-form .radio-group input[type="radio"]:checked + span {
  color: var(--voyager2-secondary);
  font-weight: 500;
}

.voyager2-preferences-form .radio-group input[type="radio"]:checked ~ .premium-badge {
  background-color: var(--voyager2-secondary);
}

/* Premium option styling */
.voyager2-preferences-form .radio-group label.premium-option {
  opacity: 0.7;
  background-color: rgba(255, 215, 0, 0.1);
  border: 1px dashed var(--voyager2-premium);
  cursor: not-allowed;
}

.voyager2-preferences-form .premium-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: var(--voyager2-premium);
  color: var(--voyager2-dark);
  font-size: 10px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.voyager2-preferences-form .premium-notice {
  font-size: 0.9em;
  color: #666;
  margin-top: 15px;
  padding: 10px;
  background-color: rgba(255, 215, 0, 0.1);
  border-radius: 6px;
  border-left: 3px solid var(--voyager2-premium);
}

.voyager2-preferences-form .premium-notice a {
  color: var(--voyager2-secondary);
  font-weight: 600;
  text-decoration: none;
}

.voyager2-preferences-form .premium-notice a:hover {
  text-decoration: underline;
}

.voyager2-preferences-form .description {
  font-size: 0.9em;
  color: #666;
  margin-top: 6px;
}

.voyager2-preferences-form .form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.voyager2-preferences-form button[type="submit"] {
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  background-image: linear-gradient(white, white), linear-gradient(90deg, #00c6ff, #8d00ff, #ff00e5, #00c6ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent !important;
  background-size: 300% 100%;
  animation: borderAnimation 6s ease infinite;
  color: #333;
  
}

.voyager2-preferences-form button[type="submit"]:hover {
transform: translateY(-2px);
  }


@keyframes borderAnimation {
  0% {
    background-position: 0% 50%, 0% 50%;
  }
  50% {
    background-position: 0% 50%, 100% 50%;
  }
  100% {
    background-position: 0% 50%, 0% 50%;
  }
}



.voyager2-preferences-form button[type="submit"]:hover {
  background-color: #3b78e7;
}

/* Custom spinner styling */
.voyager2-form-spinner {
  display: inline-block;
  visibility: hidden;
  margin-left: 10px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--voyager2-primary);
  border-radius: 50%;
  animation: voyager2-spinner-rotate 0.8s linear infinite;
}

.voyager2-form-spinner.is-active {
  visibility: visible;
}

@keyframes voyager2-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.voyager2-form-message {
  margin-left: 10px;
  flex-grow: 1;
}

/* Mensagem de sucesso */
.voyager2-success-message {
  margin: 15px 0;
  padding: 12px 15px;
  border-radius: 4px;
  border-left: 4px solid #46b450;
  background-color: #f0fff4;
  color: #2e7d32;
  font-weight: 500;
  animation: voyager2-fade-in 0.5s ease;
  display: flex;
  align-items: center;
}

.voyager2-success-message .dashicons {
  margin-right: 8px;
  color: #46b450;
  font-size: 20px;
}

@keyframes voyager2-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.voyager2-error-message {
  margin: 15px 0;
  padding: 12px 15px;
  border-radius: 4px;
  border-left: 4px solid #dc3232;
  background-color: #fff0f0;
  color: #b71c1c;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.voyager2-error-message .dashicons {
  margin-right: 8px;
  color: #dc3232;
  font-size: 20px;
}

/* History styles - NOVO LAYOUT EM GRID */
.voyager2-history {
  max-width: 1200px;
  margin: 0 auto;
}

.voyager2-history-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 992px) {
  .voyager2-history-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .voyager2-history-grid {
    grid-template-columns: 1fr;
  }
}

.voyager2-history-card {
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

.voyager2-history-card-inner {
  height: 100%;
  background-color: var(--voyager2-white);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--voyager2-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  
}

.voyager2-history-card:hover .voyager2-history-card-inner {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.voyager2-history-title {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  line-height: 1.4;
  
}

.voyager2-history-title a {
  color: var(--voyager2-primary);
  text-decoration: none;
  transition: color 0.2s;
  text-decoration: none !important;
}

.voyager2-history-title a:hover {
  color: var(--voyager2-secondary);
  text-decoration: underline;
}

.voyager2-history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--voyager2-border);
  font-size: 0.9em;
  color: #666;
}

.voyager2-history-type {
  background-color: var(--voyager2-light);
  color: var(--voyager2-primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 500;
}

.voyager2-history-date {
  font-size: 0.85em;
  color: #777;
}

.voyager2-history-link {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--voyager2-primary), var(--voyager2-secondary));
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.voyager2-history-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(141, 0, 255, 0.25);
  color: white;
}

/* Paginação */
.voyager2-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  gap: 5px;
}

.voyager2-pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background-color: var(--voyager2-white);
  border: 1px solid var(--voyager2-border);
  border-radius: 4px;
  color: var(--voyager2-dark);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
}

.voyager2-pagination-link:hover {
  background-color: var(--voyager2-light);
  border-color: var(--voyager2-primary);
  color: var(--voyager2-primary);
}

.voyager2-pagination-active {
  background-color: var(--voyager2-primary);
  border-color: var(--voyager2-primary);
  color: white;
}

.voyager2-pagination-active:hover {
  background-color: var(--voyager2-primary);
  color: white;
}

/* Adicionar apenas os novos estilos para a paginação AJAX */
.voyager2-pagination-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  gap: 10px;
  color: #666;
  font-size: 14px;
}

.voyager2-pagination-loading .voyager2-form-spinner {
  visibility: visible;
  margin: 0;
  width: 16px;
  height: 16px;
}

/* Adicionar estilos específicos para a bubble e modal no final do arquivo */

/* NOVA IMPLEMENTAÇÃO DA BUBBLE DE RECOMENDAÇÃO - VERSÃO CONSOLIDADA */
/* Notification Bubble - Novo estilo baseado no outro plugin */
#voyager2-cr-notification-bubble {
  position: fixed !important;
  right: 20px !important;
  top: 25% !important; /* Posicionado a 25% do topo conforme solicitado */
  transform: translateY(-50%) !important;
  z-index: 99 !important;
  cursor: pointer !important;
  pointer-events: auto !important; /* Garantir que receba eventos de clique */
}

.voyager2-cr-bubble-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-image: linear-gradient(white, white), /* fundo branco sólido */
    linear-gradient(90deg, #4285f4, #8d00ff, #c50491, #4285f4) !important; /* gradiente com cores do branding */
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  border: 2px solid transparent !important;
  background-size: 300% 100% !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
  transition: transform 0.3s ease !important;
  position: relative !important;
  pointer-events: auto !important; /* Garantir que receba eventos de clique */
  animation: voyager2-cr-border-animation 6s ease infinite !important;
}

.voyager2-cr-bubble-inner:hover {
  transform: scale(1.1) !important;
}

.voyager2-cr-notification-badge {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  background-color: #C50491 !important;
  color: white !important;
  border-radius: 50% !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: bold !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Modificar o ícone da bubble para ter um gradiente com as cores do branding */
#voyager2-cr-notification-bubble-icon {
  background-image: linear-gradient(90deg, #4285f4, #8d00ff, #c50491);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
  font-size: 18px !important;
  font-weight: bold !important;
}

#voyager2-cr-notification-modal {
  display: none !important;
  position: fixed !important;
  top: 25% !important; /* Alinhado com a bubble */
  right: 20px !important;
  width: 350px !important;
  background-color: white !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
  z-index: 9999999 !important;
  overflow: hidden !important;
  border: 1px solid #e0e0e6 !important;
}

#voyager2-cr-notification-modal.active {
  display: block !important;
  animation: voyager2-cr-modal-fade-in 0.3s ease !important;
}

@keyframes voyager2-cr-modal-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#voyager2-cr-notification-header {
  padding: 18px 20px !important;
  background: linear-gradient(135deg, #4285f4, #8d00ff) !important;
  color: white !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

#voyager2-cr-notification-header h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: white !important;
}

#voyager2-cr-notification-content {
  padding: 20px !important;
  max-height: 400px !important;
  overflow-y: auto !important;
}

.voyager2-cr-recommendation-item {
  margin-bottom: 20px !important;
  padding-bottom: 20px !important;
  border-bottom: 1px solid #e0e0e6 !important;
}

.voyager2-cr-recommendation-item:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

.voyager2-cr-recommendation-item h4 {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
  color: #333 !important;
}

.voyager2-cr-recommendation-item p {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  font-size: 0.9em !important;
  color: #555 !important;
  line-height: 1.5 !important;
}

.voyager2-cr-recommendation-meta {
  margin-bottom: 12px !important;
}

.voyager2-cr-recommendation-type {
  display: inline-block !important;
  background-color: #f0f4ff !important;
  color: #4285f4 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  font-size: 0.8em !important;
  font-weight: 500 !important;
}

.voyager2-cr-recommendation-actions {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.voyager2-cr-view-link {
  display: inline-block !important;
  padding: 8px 16px !important;
  background: linear-gradient(135deg, #4285f4, #8d00ff) !important;
  color: white !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.voyager2-cr-view-link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(141, 0, 255, 0.25) !important;
}

.voyager2-cr-report-link {
  display: inline-block !important;
  padding: 8px 16px !important;
  background: #f5f5f7 !important;
  color: #dc3232 !important;
  border: 1px solid #e0e0e6 !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  font-size: 0.9em !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background-color 0.2s !important;
}

.voyager2-cr-report-link:hover {
  background-color: #fff0f0 !important;
}

#voyager2-cr-notification-close {
  color: white !important;
  cursor: pointer !important;
  font-size: 18px !important;
  opacity: 0.8 !important;
  transition: opacity 0.2s !important;
}

#voyager2-cr-notification-close:hover {
  opacity: 1 !important;
}

/* Opção de idioma */
.voyager2-preferences-form .language-group {
  background-color: var(--voyager2-light);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid var(--voyager2-accent);
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.voyager2-preferences-form .language-group:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.voyager2-preferences-form .language-group > label {
  color: #333;
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 15px;
  display: block;
}

.voyager2-preferences-form .language-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.voyager2-preferences-form .language-options label {
  font-weight: normal;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 16px;
  background-color: var(--voyager2-white);
  border-radius: 20px;
  transition: all 0.2s;
  position: relative;
  border: 2px solid transparent;
}

.voyager2-preferences-form .language-options label:hover {
  background-color: rgba(197, 4, 145, 0.1);
}

.voyager2-preferences-form .language-options input[type="radio"]:checked + span {
  color: var(--voyager2-accent);
  font-weight: 500;
}

/* Estilos específicos para a mensagem de sucesso */
.voyager2-success-message {
  margin: 15px 0 !important;
  padding: 12px 15px !important;
  border-radius: 4px !important;
  border-left: 4px solid #46b450 !important;
  background-color: #f0fff4 !important;
  color: #2e7d32 !important;
  font-weight: 500 !important;
  animation: voyager2-fade-in 0.5s ease !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.voyager2-success-message .dashicons {
  margin-right: 8px !important;
  color: #46b450 !important;
  font-size: 20px !important;
}

@keyframes voyager2-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estilos para garantir que a mensagem de sucesso seja exibida corretamente */
.voyager2-preferences-form {
  position: relative !important;
}

.voyager2-form-message {
  margin: 15px 0 !important;
  width: 100% !important;
}

/* Estilos específicos para os checkboxes personalizados */

/* Forçar layout de grid com 4-5 colunas */
.voyager2-preferences-form .topics-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 15px !important;
  margin-top: 15px !important;
  margin-bottom: 15px !important;
  
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
  .voyager2-preferences-form .topics-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .voyager2-preferences-form .topics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 400px) {
  .voyager2-preferences-form .topics-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Esconder o checkbox original */
.voyager2-preferences-form .topic-checkbox input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Estilo para o container do checkbox */
.voyager2-preferences-form .topic-checkbox {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #ffffff !important;
  border: 2px solid #e0e0e6 !important;
  border-radius: 8px !important;
  padding: 15px 10px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  text-align: center !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

/* Estilo para hover */
.voyager2-preferences-form .topic-checkbox:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
  border-color: #4285f4 !important;
}

/* Estilo para checkbox selecionado */
.voyager2-preferences-form .topic-checkbox.selected {
  border-color: #4285f4 !important;
  background-color: #f0f4ff !important;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15) !important;
}

/* Estilo para checkbox desabilitado */
.voyager2-preferences-form .topic-checkbox.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Estilo para o ícone */
.voyager2-preferences-form .topic-icon {
  font-size: 24px !important;
  color: #4285f4 !important;
  margin-bottom: 8px !important;
  transition: transform 0.2s ease !important;
}

/* Estilo para ícone personalizado */
.voyager2-preferences-form .topic-custom-icon {
  width: 24px !important;
  height: 24px !important;
  margin-bottom: 8px !important;
  transition: transform 0.2s ease !important;
}

/* Efeito no ícone quando selecionado */
.voyager2-preferences-form .topic-checkbox.selected .topic-icon,
.voyager2-preferences-form .topic-checkbox.selected .topic-custom-icon {
  transform: scale(1.1) !important;
}

.voyager2-preferences-form .topic-checkbox.selected .topic-icon {
  color: #8d00ff !important;
}

/* Estilo para o nome do tópico */
.voyager2-preferences-form .topic-name {
  font-weight: 500 !important;
  color: #333333 !important;
  transition: color 0.2s ease !important;
}

/* Cor do nome quando selecionado */
.voyager2-preferences-form .topic-checkbox.selected .topic-name {
  color: #4285f4 !important;
  font-weight: 600 !important;
}

/* Adicionar um indicador visual de seleção */
.voyager2-preferences-form .topic-checkbox.selected::before {
  content: "✓" !important;
  position: absolute !important;
  top: -10px !important;
  right: -10px !important;
  background-color: #4285f4 !important;
  color: white !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: bold !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Garantir que o checkbox seja clicável em toda a área */
.voyager2-preferences-form .topic-checkbox {
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}

/* Melhorar a aparência em dispositivos touch */
@media (hover: none) {
  .voyager2-preferences-form .topic-checkbox {
    padding: 20px 10px !important; /* Área de toque maior para dispositivos móveis */
  }

  .voyager2-preferences-form .topic-icon,
  .voyager2-preferences-form .topic-custom-icon {
    font-size: 28px !important; /* Ícones maiores para dispositivos móveis */
    width: 28px !important;
    height: 28px !important;
  }
}

/* Garantir que o z-index seja alto o suficiente para que o checkbox fique acima de outros elementos */
.voyager2-preferences-form .topic-checkbox {
  z-index: 1 !important;
}

/* Adicionar efeito de feedback ao clicar */
.voyager2-preferences-form .topic-checkbox:active {
  transform: scale(0.98) !important;
}

/* Menu icon styling */
#adminmenu .toplevel_page_voyager2-cr-dashboard .wp-menu-image {
  color: var(--voyager2-primary);
}

.voyager2-cr-settings-page {
  max-width: 800px;
}

.voyager2-cr-settings-page .form-table th {
  width: 200px;
}

/* Admin page title styling */
.wrap h1 {
  color: var(--voyager2-secondary);
  margin-bottom: 25px;
}

/* Form styling */
.form-table th {
  font-weight: 600;
}

.form-table input[type="text"],
.form-table input[type="number"],
.form-table select {
  border: 1px solid var(--voyager2-border);
  border-radius: 6px;
  padding: 8px 12px;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-table input[type="text"]:focus,
.form-table input[type="number"]:focus,
.form-table select:focus {
  border-color: var(--voyager2-primary);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
  outline: none;
}

.form-table .description {
  color: #666;
  font-style: normal;
}

/* Button styling */
.wp-core-ui .button-primary {
  background-color: var(--voyager2-primary);
  border-color: var(--voyager2-primary);
  color: white !important;
  text-shadow: none;
  box-shadow: none;
  transition: background-color 0.2s;
}

.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
  background-color: #3b78e7;
  border-color: #3b78e7;
  color: white;
}

/* Manual search form styles */
.voyager2-cr-manual-search {
  margin-top: 40px;
  background: var(--voyager2-white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-top: 4px solid var(--voyager2-accent);
}

.voyager2-cr-manual-search h2 {
  margin-top: 0;
  color: var(--voyager2-accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.voyager2-cr-manual-search select,
.voyager2-cr-manual-search input[type="text"] {
  border: 1px solid var(--voyager2-border);
  border-radius: 6px;
  padding: 8px 12px;
  width: 100%;
  max-width: 400px;
}

.voyager2-cr-manual-search select:focus,
.voyager2-cr-manual-search input[type="text"]:focus {
  border-color: var(--voyager2-accent);
  box-shadow: 0 0 0 2px rgba(197, 4, 145, 0.2);
  outline: none;
}

.voyager2-cr-manual-search button[type="submit"] {
  background: linear-gradient(135deg, var(--voyager2-accent), var(--voyager2-secondary));
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.voyager2-cr-manual-search button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(197, 4, 145, 0.25);
}

.voyager2-cr-recommendations-list {
  background: var(--voyager2-gray);
  border: 1px solid var(--voyager2-border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 25px;
}

.voyager2-cr-recommendations-list li {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--voyager2-border);
  background: var(--voyager2-white);
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.voyager2-cr-recommendations-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 15px;
  border-bottom: none;
}

.voyager2-cr-recommendations-list li strong a {
  color: var(--voyager2-primary);
  text-decoration: none;
  font-weight: 600;
}

.voyager2-cr-recommendations-list li strong a:hover {
  text-decoration: underline;
}

.voyager2-cr-recommendations-list li p {
  margin: 8px 0;
  color: #555;
}

.voyager2-cr-recommendation-type {
  display: inline-block;
  background: linear-gradient(135deg, var(--voyager2-primary), var(--voyager2-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  border: 1px solid var(--voyager2-border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: 600;
  margin-top: 8px;
}

#voyager2-cr-search-results {
  margin-top: 25px;
}

#voyager2-cr-search-results .notice {
  margin: 5px 0 15px;
  border-left-color: var(--voyager2-primary);
}

#voyager2-cr-search-results .notice-success {
  border-left-color: var(--voyager2-secondary);
}

#voyager2-cr-search-results h3 {
  color: var(--voyager2-accent);
  margin-top: 25px;
  margin-bottom: 15px;
}

/* User permissions page */
.voyager2-cr-user-selector {
  background: var(--voyager2-white);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--voyager2-border);
  margin-bottom: 30px;
}

.voyager2-cr-user-permissions,
.voyager2-cr-user-current-settings {
  background: var(--voyager2-white);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--voyager2-border);
  margin-bottom: 30px;
}

.voyager2-cr-user-permissions h2,
.voyager2-cr-user-current-settings h3 {
  color: var(--voyager2-secondary);
  margin-top: 0;
}

/* Tópicos manager styling */
.cr-topics-list {
  margin-bottom: 20px;
}

.cr-topic-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background-color: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.cr-topic-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cr-topic-icon {
  margin-right: 15px;
}

.cr-topic-icon .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: var(--voyager2-primary);
}

.cr-topic-details {
  flex-grow: 1;
  display: flex;
  gap: 10px;
  align-items: center;
}

.cr-topic-name {
  flex-grow: 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cr-topic-icon-select {
  min-width: 150px;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.cr-topic-actions {
  margin-left: 10px;
}

.cr-add-topic-form {
  margin-top: 15px;
}

.cr-add-topic {
  background: var(--voyager2-primary);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cr-add-topic:hover {
  background-color: #3b78e7;
}

.cr-remove-topic {
  color: #dc3232;
  border-color: #dc3232;
}

.cr-remove-topic:hover {
  background-color: #dc3232;
  color: white;
}

/* Adicionar estilos para a mensagem de chave API ausente */
.api-key-missing {
  color: #dc3232;
}

.api-key-missing .dashicons {
  color: #dc3232;
}

.api-key-test-section {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 5px;
  border-left: 4px solid #4285f4;
}

#cr-test-api {
  display: flex;
  align-items: center;
}

#cr-test-api .dashicons {
  margin-right: 5px;
}

