/* ===== MODAL DA AGENDA - DESIGN MODERNO ===== */

/* Configuração global da fonte */
.modal-agenda,
.modal-agenda * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Modal principal */
.modal-agenda {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Container do modal */
.modal-agenda-content {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(25, 118, 210, 0.25);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header do modal */
.modal-agenda-header {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  padding: 24px 28px;
  position: relative;
  border-radius: 20px 20px 0 0;
  min-height: 100px;
}

/* Botão de fechar */
.modal-agenda-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.modal-agenda-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Título do evento */
.modal-agenda-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

/* Badges do evento */
.modal-agenda-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-agenda-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-agenda-badge.tipo {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.modal-agenda-badge.prioridade {
  color: white;
}

.modal-agenda-badge.prioridade.baixa {
  background: rgba(156, 39, 176, 0.8);
}

.modal-agenda-badge.prioridade.normal {
  background: rgba(76, 175, 80, 0.8);
}

.modal-agenda-badge.prioridade.alta {
  background: rgba(255, 152, 0, 0.8);
}

.modal-agenda-badge.prioridade.urgente {
  background: rgba(244, 67, 54, 0.8);
}

/* Conteúdo do modal */
.modal-agenda-body {
  padding: 28px;
  background: #ffffff;
}

/* Item de detalhe */
.modal-agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e3f2fd;
  transition: all 0.2s ease;
}

.modal-agenda-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.modal-agenda-item:hover {
  background: #f8fbff;
  margin: -8px -16px;
  padding: 16px 24px;
  border-radius: 12px;
}

/* Ícone do item */
.modal-agenda-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.modal-agenda-icon.data {
  background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
}

.modal-agenda-icon.local {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.modal-agenda-icon.descricao {
  background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
}

.modal-agenda-icon.participantes {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.modal-agenda-icon.lembrar {
  background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
}

/* Informações do item */
.modal-agenda-info {
  flex: 1;
  min-width: 0;
}

.modal-agenda-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1976d2;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.modal-agenda-value {
  font-size: 1rem;
  color: #1e293b;
  line-height: 1.5;
  font-weight: 500;
  word-wrap: break-word;
}

/* Ações do modal */
.modal-agenda-actions {
  padding: 20px 28px;
  background: #f8fbff;
  border-top: 1px solid #e3f2fd;
  display: flex;
  gap: 12px;
  border-radius: 0 0 20px 20px;
}

.modal-agenda-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  text-decoration: none;
  color: white;
}

.modal-agenda-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.modal-agenda-btn:active {
  transform: translateY(0);
}

.modal-agenda-btn.editar {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.modal-agenda-btn.editar:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
}

.modal-agenda-btn.concluir {
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
}

.modal-agenda-btn.concluir:hover {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

.modal-agenda-btn.excluir {
  background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
}

.modal-agenda-btn.excluir:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
}

.modal-agenda-btn-icon {
  font-size: 16px;
}

.modal-agenda-btn-text {
  font-weight: 600;
}

/* Responsividade */
@media (max-width: 768px) {
  .modal-agenda-content {
    width: 95%;
    max-width: none;
    margin: 20px;
  }

  .modal-agenda-header {
    padding: 20px 24px;
    min-height: 80px;
  }

  .modal-agenda-close {
    top: 12px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .modal-agenda-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }

  .modal-agenda-badges {
    gap: 8px;
  }

  .modal-agenda-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .modal-agenda-body {
    padding: 24px;
  }

  .modal-agenda-item {
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .modal-agenda-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .modal-agenda-label {
    font-size: 0.7rem;
  }

  .modal-agenda-value {
    font-size: 0.9rem;
  }

  .modal-agenda-actions {
    padding: 16px 24px;
    gap: 8px;
  }

  .modal-agenda-btn {
    padding: 12px 16px;
    font-size: 0.8rem;
    min-height: 44px;
  }

  .modal-agenda-btn-icon {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .modal-agenda-content {
    width: 100%;
    margin: 10px;
    border-radius: 16px;
  }

  .modal-agenda-header {
    border-radius: 16px 16px 0 0;
    padding: 16px 20px;
  }

  .modal-agenda-title {
    font-size: 1.25rem;
  }

  .modal-agenda-body {
    padding: 20px;
  }

  .modal-agenda-actions {
    padding: 12px 20px;
    flex-direction: column;
  }

  .modal-agenda-btn {
    width: 100%;
  }
}

/* Animações de entrada */
.modal-agenda.fade-out {
  animation: modalFadeOut 0.2s ease-in forwards;
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Estados de loading */
.modal-agenda.loading {
  pointer-events: none;
}

.modal-agenda.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Melhorias de acessibilidade */
.modal-agenda:focus {
  outline: none;
}

.modal-agenda-btn:focus {
  outline: 2px solid #1976d2;
  outline-offset: 2px;
}