/* Overlay + modal edición de viaje — layout; look en atenea-chrome.css */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    -webkit-backdrop-filter 220ms ease,
    backdrop-filter 220ms ease,
    background-color 220ms ease,
    visibility 0s linear 220ms;
}
.overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 220ms ease,
    -webkit-backdrop-filter 220ms ease,
    backdrop-filter 220ms ease,
    background-color 220ms ease,
    visibility 0s linear 0s;
}

#overlay-editor-fila.overlay { z-index: 9000; }

#overlay-editor-fila .modal.modal-editor-fila {
  position: relative;
  width: min(340px, 78vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  /* Franja superior para la ✕; el título empieza debajo */
  padding: 28px 14px 0 14px;
  color-scheme: dark;
  color: #a8b8c8;
  font-family: "Segoe UI", sans-serif;
}

#overlay-editor-fila .modal.modal-editor-fila h2 {
  font-size: 15px;
  margin: 0 0 2px;
  padding-right: 0;
  color: #c8d0e0;
  font-weight: 600;
}

#overlay-editor-fila .modal-cerrar {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
#overlay-editor-fila .modal-cerrar i {
  font-size: 12px;
  line-height: 1;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#overlay-editor-fila .modal-sub {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--steel-sub, #8b97a8);
}

#overlay-editor-fila .editor-fila-box {
  margin: 0 0 4px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  scrollbar-width: thin;
}
#overlay-editor-fila .editor-fila-box .editor-fila-campo:last-child {
  margin-bottom: 0;
}
#overlay-editor-fila .editor-fila-campo { margin-bottom: 8px; }

#overlay-editor-fila .editor-fila-label {
  font-size: 10px;
  color: #6a7588;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
}

#overlay-editor-fila .editor-fila-inp {
  width: 100%;
  box-sizing: border-box;
  background: #0f1117;
  border: 1px solid #2a2d3a;
  color: #a8b8c8;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  line-height: 1.35;
  outline: none;
  transition: border-color 0.15s;
  color-scheme: dark;
}
#overlay-editor-fila .editor-fila-inp:focus { border-color: #4fc3f755; }
#overlay-editor-fila .editor-fila-inp::placeholder {
  color: #8898a8;
  opacity: 1;
}
#overlay-editor-fila .editor-fila-inp-mono { font-variant-numeric: tabular-nums; }
#overlay-editor-fila .editor-fila-inp--readonly {
  opacity: 0.55;
  cursor: default;
  color: #7a8a98;
}

#overlay-editor-fila .editor-fila-time-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
#overlay-editor-fila .editor-fila-time-row > input.editor-fila-inp {
  width: auto;
  min-width: 72px;
  max-width: 88px;
  flex: 0 0 auto;
  letter-spacing: 2px;
  text-align: center;
}

#overlay-editor-fila .editor-fila-pendiente-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  color: #7dcec4;
  cursor: pointer;
  user-select: none;
}
#overlay-editor-fila .editor-fila-pendiente-chk input {
  accent-color: #7dcec4;
  cursor: pointer;
  margin: 0;
}

#overlay-editor-fila .atenea-dd-btn {
  min-height: 28px;
  height: 28px;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

#overlay-editor-fila .modal-editor-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--steel-border, #3d4a5c);
  align-items: center;
}
#overlay-editor-fila .btn-editor-prim {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--steel-fill-soft, rgba(96, 125, 139, 0.12));
  color: var(--steel-text, #a8b4c4);
  border: 1px solid var(--steel-border-soft, rgba(136, 152, 168, 0.45));
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
#overlay-editor-fila .btn-editor-prim:hover {
  background: var(--steel-fill-hover, rgba(96, 125, 139, 0.22));
  border-color: var(--steel-hover, #8898a8);
  color: var(--steel-text-hover, #c5cdd8);
}
#overlay-editor-fila .btn-editor-prim:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#overlay-editor-fila .btn-editor-sec {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  background: transparent;
  color: #8b97a8;
  border: 1px solid var(--steel-border, #3d4a5c);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
#overlay-editor-fila .btn-editor-sec:hover {
  color: #a8b4c4;
  border-color: #5a6a7d;
}

#overlay-editor-fila .modal-firma {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 18px;
  padding: 6px 0 10px;
  user-select: none;
  pointer-events: none;
}
/* Firma: hereda Atenea steel (atenea-chrome) */

#overlay-editor-fila .editor-fila-error {
  font-size: 11px;
  color: #ffb300;
  margin: 0 0 8px;
  min-height: 0;
}
