/* === FONT (Opcional, si no está global) === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* === MODAL BASE === */
.sight-modal .modal-content.modern {
  background: #fcfdff; /* Un blanco casi puro con un toque de azul */
  border: 1px solid #eaf2fd;
  border-radius: 18px;
  box-shadow: 0 12px 45px -10px rgba(30, 64, 175, 0.18),
    0 4px 15px -4px rgba(30, 64, 175, 0.1);
  font-family: "Inter", "Segoe UI", sans-serif;
  color: #1e293b; 
  overflow: hidden;
  transition: all 0.3s ease-out;
}

/* === HEADER === */
.sight-modal .modal-header {
  background: linear-gradient(100deg, #f3f8ff 0%, #fdfdff 100%);
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #eaf2fd;
}

.sight-modal .modal-title {
  color: #1e3a8a; /* Azul corporativo oscuro */
  font-weight: 600;
  letter-spacing: 0.1px;
}

/* === BOTÓN CERRAR (HEADER) === */
.sight-modal .modal-header .btn-close {
  filter: brightness(0) saturate(100%) invert(30%) sepia(59%) saturate(800%)
    hue-rotate(185deg) brightness(90%) contrast(90%);
  opacity: 0.6;
  padding: 0;
  margin: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  transition: all 0.25s ease;
}
.sight-modal .modal-header .btn-close:hover {
  opacity: 1;
  background-color: #eaf2fd;
  transform: scale(1.05) rotate(90deg);
}
.sight-modal .modal-header .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  opacity: 1;
}

/* === BODY === */
.sight-modal .modal-body {
  padding: 1rem 1.75rem 1.5rem;
  background-color: #fdfdff;
  max-height: 70vh;
  overflow-y: auto;
}

/* === SCROLLBAR (Detalle premium) === */
.sight-modal .modal-body::-webkit-scrollbar {
  width: 8px;
  background-color: #f5f9ff;
}
.sight-modal .modal-body::-webkit-scrollbar-thumb {
  background-color: #b0c9eb;
  border-radius: 10px;
  border: 2px solid #f5f9ff;
}
.sight-modal .modal-body::-webkit-scrollbar-thumb:hover {
  background-color: #9cb9e2;
}

/* === ACCORDION === */
.sight-modal .routes-accordion {
  border: none;
}

.sight-modal .route-card {
  border: 1px solid #eaf2fd;
  border-radius: 14px; /* Un poco más redondeado */
  background: #ffffff;
  overflow: hidden;
  transition: all 0.25s ease-out;
  box-shadow: 0 4px 10px -2px rgba(30, 64, 175, 0.04);
}

.sight-modal .route-card:hover {
  box-shadow: 0 7px 18px -4px rgba(30, 64, 175, 0.1);
  transform: translateY(-2px);
  border-color: #dbe8fa;
}

/* === ACCORDION HEADER BUTTON === */
.sight-modal .route-trigger {
  background-color: #f7faff;
  color: #1e40af;
  font-weight: 600; /* Más énfasis */
  padding: 1rem 1.35rem;
  transition: all 0.2s ease;
  width: 100%;
}
.sight-modal .route-trigger:hover {
  background-color: #f1f6ff;
}

.sight-modal .route-trigger:not(.collapsed) {
  background-color: #eaf2fd;
  color: #1d4ed8;
  /* Sombra interior más sutil */
  box-shadow: inset 0 -1px 0 #dbe8fa;
}

.sight-modal .route-trigger:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  z-index: 2;
}

/* === ICONO CHEVRON === */
.sight-modal .route-trigger::after {
  filter: brightness(0) saturate(100%) invert(28%) sepia(68%) saturate(743%)
    hue-rotate(186deg) brightness(92%) contrast(93%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); /* Transición con rebote */
}

/* === ACCORDION BODY === */
.sight-modal .route-body {
  background: #fdfdff;
  border-top: 1px solid #eaf2fd;
  padding: 1.25rem 1.35rem;
  font-size: 0.95rem;
  box-shadow: inset 0 4px 8px -4px rgba(30, 64, 175, 0.04);
}

/* === SKELETON LOADING === */
.sight-modal .skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.sight-modal .skeleton-item {
  height: 16px; /* Un poco más alto */
  width: 100%;
  background: linear-gradient(
    100deg,
    #eef3fa 30%,
    #fbfdff 50%,
    #eef3fa 70%
  );
  background-size: 200% 100%;
  border-radius: 8px;
  animation: shimmer 1.2s infinite linear;
}
.sight-modal .skeleton-item:nth-child(2) {
  width: 80%;
}
.sight-modal .skeleton-item:nth-child(3) {
  width: 90%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* === EXTRA HTML SECTION === */
.sight-modal .html-extra {
  border-top: 1px dashed #dbe8fa; /* Línea punteada para diferenciar */
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === FOOTER === */
.sight-modal .modal-footer {
  background: #f8fbff;
  padding: 1rem 1.75rem;
  border-top: 1px solid #eaf2fd;
  /* Sombra interior para separar del body */
  box-shadow: inset 0 1px 0 #ffffff;
}

/* === BOTÓN CERRAR (FOOTER) === */
.sight-modal .close-btn {
  background-color: #2563eb;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px; /* Consistente con las tarjetas */
  padding: 0.65rem 1.5rem;
  /* Sombra para que el botón resalte */
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease-out;
}

.sight-modal .close-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.sight-modal .close-btn:active {
  transform: translateY(0);
  background-color: #1e40af;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15),
    inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* === MEDIA QUERY (Ajustes finos) === */
@media (max-width: 576px) {
  .sight-modal .modal-dialog {
    margin: 0.5rem;
  }
  .sight-modal .modal-content.modern {
    border-radius: 16px;
  }
  .sight-modal .modal-header {
    padding: 1rem 1.25rem;
  }
  .sight-modal .modal-body {
    padding: 0.75rem 1.25rem 1.25rem;
  }
  .sight-modal .route-trigger {
    font-size: 0.9rem;
    padding: 0.9rem 1.1rem;
  }
  .sight-modal .route-body {
    padding: 1rem 1.1rem;
  }
  .sight-modal .modal-footer {
    padding: 0.75rem 1.25rem;
  }
  .sight-modal .close-btn {
    width: 100%; /* Botón full-width en móvil */
    padding: 0.75rem;
  }
}
