/* Frontend Styles for Voyager2 Gestor de Tarefas */

:root {
  --voyager-primary: #4285f4;
  --voyager-secondary: #8d00ff;
  --voyager-accent: #c50491;
  --voyager-gradient: linear-gradient(135deg, #4285f4, #8d00ff, #c50491);
  --voyager-text: #333;
  --voyager-light-text: #666;
  --voyager-background: #f5f7fa;
  --voyager-card-bg: #fff;
  --voyager-border: #e0e0e0;
  --voyager-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --voyager-radius: 8px;
}

/* Estilos gerais */
.voyager2-task-manager {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
    sans-serif;
  color: var(--voyager-text);
  background: #fff;
  border-radius: var(--voyager-radius);
  overflow: hidden;
  margin: 20px 0;
  box-shadow: var(--voyager-shadow);
}

/* Cabeçalho modificado */
.voyager2-header {
  background: var(--voyager-gradient);
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
}

.voyager2-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  text-align: left;
  color: white;
}

.voyager2-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
}

@media (max-width: 768px) {
  .voyager2-container {
    grid-template-columns: 1fr;
  }
}

.voyager2-sidebar {
  background: var(--voyager-card-bg);
  padding: 20px;
  border-right: 0px solid var(--voyager-border);
}

.voyager2-main-content {
  padding: 20px;
  background: #fff;
  min-height: 500px;
}

/* Buttons */
.voyager2-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 16px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  border: none !important;
  font-size: 14px !important;
  gap: 8px !important;
}

.voyager2-primary-button {
  background: var(--voyager-primary) !important;
  color: white !important;
}

.voyager2-primary-button:hover {
  background: #3b78e7 !important;
  box-shadow: 0 2px 5px rgba(66, 133, 244, 0.3) !important;
}

.voyager2-secondary-button {
  background: #f0f0f0 !important;
  color: #333 !important;
}

.voyager2-secondary-button:hover {
  background: #e5e5e5 !important;
}

.voyager2-button .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 1;
}

/* Container de botões - ajustado para ficar em coluna */
.voyager2-buttons-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 20px !important;
  width: 100% !important;
}

/* Botões - ajustados para ocupar espaço igual */
.voyager2-buttons-container button {
  flex: 1 1 0 !important;
  margin: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

/* Container e botão de deletar todas */
.voyager2-delete-all-container {
  display: flex !important;
  justify-content: flex-end !important;
  margin-bottom: 15px !important;
}

.voyager2-delete-all-button {
  background: #dc3545 !important;
  color: white !important;
  border: none !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: background 0.2s !important;
}

.voyager2-delete-all-button:hover {
  background: #c82333 !important;
}

.voyager2-delete-all-button .dashicons {
  font-size: 14px !important;
  width: 14px !important;
  height: 14px !important;
}

/* Estilos específicos para o botão de sugerir tarefas */
.voyager2-suggest-button, .voyager2-animated-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  color: #333 !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  padding: 10px 16px !important;
  border-radius: 6px !important;
  background-color: white !important;

  /* Borda animada com gradiente */
  background-image: linear-gradient(white, white), linear-gradient(90deg, #00c6ff, #8d00ff, #ff00e5, #00c6ff) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  border: 1px solid transparent !important;
  background-size: 300% 100% !important;
  animation: borderAnimation 6s ease infinite !important;

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.voyager2-suggest-button:hover, .voyager2-animated-button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

@keyframes borderAnimation {
  0% {
    background-position: 0% 50%, 0% 50%;
  }
  50% {
    background-position: 0% 50%, 100% 50%;
  }
  100% {
    background-position: 0% 50%, 0% 50%;
  }
}

/* Ícones de estrela */
.voyager-icons {
  display: inline-flex !important;
  position: relative !important;
  height: 20px !important;
  width: 20px !important;
  margin-right: 8px !important;
  vertical-align: middle !important;
}

.voyager-icon {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 10px !important;
  height: 10px !important;
  z-index: 1 !important;
}

.voyager-icon2 {
  position: absolute !important;
  top: 5px !important;
  left: 5px !important;
  width: 16px !important;
  height: 16px !important;
  z-index: 0 !important;
}

/* Filters */
.voyager2-filters {
  margin-bottom: 20px;
}

.voyager2-filters h3 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--voyager-text);
}

.voyager2-filter-group {
  margin-bottom: 12px;
}

.voyager2-filter-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: var(--voyager-light-text);
}

.voyager2-filter-group select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--voyager-border);
  background-color: white;
  font-size: 14px;
}

/* AI Assistant */
.voyager2-ai-assistant {
  margin-top: 20px;
  position: relative;
}

.voyager2-ai-assistant h3 {
  font-size: 16px;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--voyager-text);
}

.voyager2-ai-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  margin-bottom: 10px;
}

/* Ajuste para o carrot (seta) do balão - posicionando acima do balão */
.voyager2-ai-bubble-arrow {
  content: "" !important;
  position: absolute !important;
  bottom: auto !important;
  top: -8px !important;
  left: 15px !important;
  width: 0 !important;
  height: 0 !important;
  border-left: 8px solid transparent !important;
  border-right: 8px solid transparent !important;
  border-top: none !important;
  border-bottom: 8px solid #4285f4 !important;
  transform: rotate(0deg) !important;
}

/* Ajuste para o balão - alinhando à esquerda */
.voyager2-ai-bubble {
  background: var(--voyager-gradient) !important;
  border-radius: 12px !important;
  padding: 15px !important;
  color: white !important;
  position: relative !important;
  max-width: 100% !important;
  margin: 0 !important;
  margin-bottom: 15px !important;
  text-align: left !important;
}

.voyager2-ai-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Tasks Container */
.voyager2-tasks-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  max-width: 100%;
}

/* Task Cards - tornando clicáveis */
.voyager2-task-card {
  background: var(--voyager-card-bg);
  border-radius: var(--voyager-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.voyager2-task-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.voyager2-task-card.priority-high {
  border-top: 3px solid #f44336;
}

.voyager2-task-card.priority-medium {
  border-top: 3px solid #ff9800;
}

.voyager2-task-card.priority-low {
  border-top: 3px solid #4caf50;
}

.voyager2-task-card.status-completed {
  opacity: 0.7;
}

.voyager2-task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.voyager2-task-title {
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  color: var(--voyager-text);
  word-break: break-word;
  flex: 1;
  padding-right: 10px;
}

/* Task Actions - Forçando visibilidade */
.voyager2-task-actions {
  display: flex !important;
  gap: 5px !important;
  flex-shrink: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.voyager2-task-action {
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  color: #666 !important;
  padding: 5px !important;
  border-radius: 4px !important;
  transition: all 0.2s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.voyager2-task-action:hover {
  background-color: #f0f0f0 !important;
  color: #333 !important;
  border-color: #e0e0e0 !important;
}

.voyager2-task-action svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  visibility: visible !important;
}

/* Estilo específico para o botão de deletar */
.voyager2-delete-task:hover {
  background-color: #ffebee !important;
  color: #d32f2f !important;
  
}

/* Debug - tornar os botões mais visíveis */
.voyager2-edit-task {
  color: #1976d2 !important;
  box-shadow: none;
}

.voyager2-delete-task {
  background-color: #ffebee !important;
  color: #d32f2f !important;
box-shadow: none;

}

/* Estilo para os ícones nos metadados */
.voyager2-task-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--voyager-light-text);
}

.voyager2-task-description {
  font-size: 14px;
  color: var(--voyager-light-text);
  margin-bottom: 15px;
  word-break: break-word;
}

.voyager2-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--voyager-light-text);
}

.voyager2-task-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.voyager2-task-meta-item .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.voyager2-task-status {
  position: static;
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  background: #f0f0f0;
  color: var(--voyager-light-text);
  margin-left: auto;
  align-self: flex-end;
}

.voyager2-task-status.status-pending {
  background-color: #e3f2fd;
  color: #1976d2;
}

.voyager2-task-status.status-in-progress {
  background-color: #fff8e1;
  color: #f57c00;
}

.voyager2-task-status.status-completed {
  background-color: #e8f5e9;
  color: #388e3c;
}

/* Ajustar o container de metadados para acomodar o status */
.voyager2-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--voyager-light-text);
  align-items: center;
  justify-content: space-between;
}

/* Remover estilos de debug dos botões */
.voyager2-task-action {
  background: transparent !important;
  border: 1px solid transparent !important;
  cursor: pointer !important;
  color: #666 !important;
  padding: 5px !important;
  border-radius: 4px !important;
  transition: all 0.2s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.voyager2-task-action:hover {
  background-color: #f0f0f0 !important;
  color: #333 !important;
  border-color: #e0e0e0 !important;
}

/* Remover cores de debug */
.voyager2-edit-task {
  background-color: transparent !important;
  color: #666 !important;
}

.voyager2-delete-task {
  background-color: transparent !important;
  color: #666 !important;
}

/* Loading */
.voyager2-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--voyager-light-text);
}

.voyager2-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(66, 133, 244, 0.2);
  border-radius: 50%;
  border-top-color: var(--voyager-primary);
  animation: voyager2-spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes voyager2-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State */
.voyager2-empty-state {
  text-align: center;
  padding: 40px;
  color: var(--voyager-light-text);
}

/* Modal */
.voyager2-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.voyager2-modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: var(--voyager-radius);
  box-shadow: var(--voyager-shadow);
  width: 90%;
  max-width: 600px;
  position: relative;
}

.voyager2-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: var(--voyager-light-text);
  cursor: pointer;
}

.voyager2-modal-close:hover {
  color: var(--voyager-text);
}

.voyager2-modal h3 {
  margin-top: 0;
  color: var(--voyager-primary);
  border-bottom: 1px solid var(--voyager-border);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* Form */
.voyager2-form-group {
  margin-bottom: 15px;
}

.voyager2-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--voyager-text);
}

.voyager2-form-group input,
.voyager2-form-group textarea,
.voyager2-form-group select {
  width: 100%;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid var(--voyager-border);
  font-size: 14px;
}

.voyager2-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

@media (max-width: 500px) {
  .voyager2-form-row {
    grid-template-columns: 1fr;
  }
}

.voyager2-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Notification */
.voyager2-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  background: var(--voyager-primary);
  color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  max-width: 350px;
}

.voyager2-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.voyager2-notification.error {
  background: #f44336;
}

/* Login Required */
.voyager2-login-required {
  background: var(--voyager-card-bg);
  border-radius: var(--voyager-radius);
  padding: 20px;
  text-align: center;
  color: var(--voyager-light-text);
}

/* Modal de Sugestão de Tarefas */
.voyager2-suggestions-form {
  margin-top: 15px;
}

.voyager2-form-section {
  margin-bottom: 20px;
}

.voyager2-form-section h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--voyager-primary);
  font-size: 16px;
}

.voyager2-subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

@media (max-width: 500px) {
  .voyager2-subjects-grid {
    grid-template-columns: 1fr;
  }
}

.voyager2-subject-option {
  position: relative;
}

.voyager2-subject-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.voyager2-subject-option label {
  display: block;
  padding: 10px;
  background: #f0f0f0;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.voyager2-subject-option input[type="radio"]:checked + label {
  background: var(--voyager-primary);
  color: white;
  font-weight: 500;
}

.voyager2-subject-option label:hover {
  background: #e0e0e0;
}

.voyager2-subject-option input[type="radio"]:checked + label:hover {
  background: var(--voyager-primary);
}

.voyager2-exam-type {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.voyager2-exam-option {
  flex: 1;
  position: relative;
}

.voyager2-exam-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.voyager2-exam-option label {
  display: block;
  padding: 12px;
  background: #f0f0f0;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.voyager2-exam-option input[type="radio"]:checked + label {
  background: var(--voyager-gradient);
  color: white;
}

.voyager2-form-slider {
  padding: 0 5px;
}

.voyager2-form-slider label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.voyager2-form-slider label span.value {
  font-weight: 500;
  color: var(--voyager-primary);
}

.voyager2-form-slider input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
}

.voyager2-form-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--voyager-primary);
  cursor: pointer;
}

.voyager2-form-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--voyager-primary);
  cursor: pointer;
  border: none;
}

.voyager2-difficulty-options {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.voyager2-difficulty-option {
  flex: 1;
  position: relative;
}

.voyager2-difficulty-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.voyager2-difficulty-option label {
  display: block;
  padding: 8px 5px;
  background: #f0f0f0;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.voyager2-difficulty-option input[type="radio"]:checked + label {
  background: var(--voyager-primary);
  color: white;
}

.voyager2-difficulty-option:nth-child(1) input[type="radio"]:checked + label {
  background: #4caf50;
}

.voyager2-difficulty-option:nth-child(2) input[type="radio"]:checked + label {
  background: #ff9800;
}

.voyager2-difficulty-option:nth-child(3) input[type="radio"]:checked + label {
  background: #f44336;
}

.voyager2-suggestion-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--voyager-radius);
}

.voyager2-suggestion-loading p {
  margin-top: 15px;
  color: var(--voyager-primary);
  font-weight: 500;
}

/* Paginação atualizada - botões circulares azuis com texto branco */
.voyager2-pagination {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin-top: 20px !important;
  gap: 10px !important;
}

/* Forçando estilos da paginação */
.voyager2-pagination-button {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  background: #f0f0f0 !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  margin: 0 2px !important;
  font-size: 14px !important;
  color: #333 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.voyager2-pagination-button:hover {
  background: #e0e0e0 !important;
}

.voyager2-pagination-button.active {
  background: #4285f4 !important;
  color: white !important;
  font-weight: bold !important;
}

.voyager2-pagination-button.disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.voyager2-pagination-container {
  display: flex !important;
  align-items: center !important;
  background: white !important;
  border-radius: 4px !important;
  padding: 5px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}

.voyager2-pagination-pages {
  display: flex !important;
  align-items: center !important;
}

.voyager2-pagination-nav {
  font-size: 18px;
  width: 36px !important;
  height: 36px !important;
}

.voyager2-pagination-ellipsis {
  padding: 0 5px;
  color: var(--voyager-light-text);
}

/* Responsividade adicional */
@media (max-width: 768px) {
  .voyager2-container {
    grid-template-columns: 1fr;
  }

  .voyager2-ai-bubble {
    max-width: 100%;
  }
  
  .voyager2-tasks-container {
    grid-template-columns: 1fr;
  }
}