/* Estilos para el modal de servicios geográficos externos */

.xl-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: xl-fadeIn 0.2s ease;
}

@keyframes xl-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.xl-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: xl-slideUp 0.3s ease;
}

@keyframes xl-slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.xl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.xl-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.xl-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.xl-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.xl-modal-body {
  padding: 24px;
}

.xl-form-group {
  margin-bottom: 20px;
}

.xl-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #555;
  font-size: 14px;
}

.xl-form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.xl-form-control:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.xl-form-control::placeholder {
  color: #aaa;
}

select.xl-form-control {
  cursor: pointer;
  background: white;
}

.xl-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.xl-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.xl-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.xl-btn-primary {
  background: #4CAF50;
  color: white;
}

.xl-btn-primary:hover:not(:disabled) {
  background: #45a049;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.xl-btn-secondary {
  background: #f5f5f5;
  color: #666;
}

.xl-btn-secondary:hover:not(:disabled) {
  background: #e0e0e0;
}

.xl-modal-help {
  margin-top: 24px;
  padding: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #4CAF50;
}

.xl-modal-help h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.xl-modal-help ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}

.xl-modal-help li {
  margin-bottom: 6px;
}

.xl-modal-help strong {
  color: #4CAF50;
  font-weight: 600;
}

/* Botón de agregar en el header del grupo - usa el mismo estilo que xl-layers__iconBtn */
/* No se necesitan estilos personalizados, hereda de xl-layers__iconBtn */

/* Botón de guardar/eliminar servicio */
.xl-layers__chip--saved {
  cursor: pointer !important;
  opacity: 0.9;
  transition: all 0.2s;
}

.xl-layers__chip--saved:hover {
  opacity: 1;
  transform: scale(1.1);
  background: #ffebee !important;
}

.xl-layers__chip:disabled {
  cursor: not-allowed !important;
  opacity: 0.6;
}

/* Lista de capas disponibles en el modal */
.xl-layers-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px;
  background: #f9f9f9;
}

.xl-layer-item {
  margin-bottom: 8px;
  background: white;
  border-radius: 4px;
  transition: all 0.2s;
}

.xl-layer-item:hover {
  background: #f5f5f5;
}

.xl-layer-item:last-child {
  margin-bottom: 0;
}

.xl-layer-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  cursor: pointer;
  margin: 0;
}

.xl-layer-checkbox input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.xl-layer-info {
  flex: 1;
}

.xl-layer-title {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 2px;
}

.xl-layer-name {
  font-size: 12px;
  color: #4CAF50;
  font-family: monospace;
  margin-bottom: 4px;
}

.xl-layer-abstract {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  margin-top: 4px;
  font-style: italic;
}

/* Scrollbar personalizado para la lista de capas */
.xl-layers-list::-webkit-scrollbar {
  width: 8px;
}

.xl-layers-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.xl-layers-list::-webkit-scrollbar-thumb {
  background: #4CAF50;
  border-radius: 4px;
}

.xl-layers-list::-webkit-scrollbar-thumb:hover {
  background: #45a049;
}

