/* ============================================================================
   Facilu Flow — Seguimiento público de servicio (#!/ServicioSeguimiento/:id)
   Todo vive bajo .fg-seg para no alterar AdminLTE ni ninguna otra pantalla.
   Pantalla pública, sin sesión: el objetivo es que se vea bien en el celular
   de un cliente, no solo en el escritorio de un operador.
   ========================================================================= */

.fg-seg {
    --fg-p: #6C3AED;
    --fg-pl: #A855F7;
    --fg-ap: #EC4899;
    --fg-ink: #1e293b;
    --fg-muted: #64748B;
    --fg-line: #E6E0F5;
    --fg-soft: #F7F5FF;
    --fg-bg: #F4F2FB;
    --fg-ok: #16A34A;
    --fg-warn: #D97706;

    box-sizing: border-box;
    min-height: 100vh;
    background: var(--fg-bg);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--fg-ink);
    padding: 24px 16px 48px;
}

.fg-seg * { box-sizing: border-box; }

/* ── Encabezado ─────────────────────────────────────────────────────────── */
.fg-seg__header {
    max-width: 1100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.fg-seg__logo { height: 44px; width: auto; }

.fg-seg__titulos h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.fg-seg__titulos p {
    margin: 4px 0 0;
    font-size: 13.5px;
    color: var(--fg-muted);
}

@media (max-width: 560px) {
    .fg-seg__titulos p { display: none; }
}

/* ── Novedad (aviso) ────────────────────────────────────────────────────── */
.fg-seg__novedad {
    max-width: 1100px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #FEF3E2;
    border: 1px solid #FBD9A5;
    border-radius: 10px;
    color: #92400E;
    font-size: 13.5px;
}

.fg-seg__novedad svg { flex: 0 0 auto; width: 18px; height: 18px; }

/* ── Layout principal ───────────────────────────────────────────────────── */
.fg-seg__grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 900px) {
    .fg-seg__grid { grid-template-columns: 1fr; }
    /* En celular el mapa importa mas que la ficha: va primero. */
    .fg-seg__mapa { order: -1; }
}

/* ── Tarjetas compartidas ───────────────────────────────────────────────── */
.fg-seg__card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(26, 8, 69, 0.06), 0 8px 28px rgba(26, 8, 69, 0.07);
    overflow: hidden;
}

/* ── Ficha de datos ─────────────────────────────────────────────────────── */
.fg-seg__ficha { padding: 20px 22px; }

.fg-seg__estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--fg-soft);
    color: var(--fg-p);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.fg-seg__estado::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.fg-seg__bloque { margin-bottom: 18px; }
.fg-seg__bloque:last-child { margin-bottom: 0; }

.fg-seg__etiqueta {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-p);
    margin-bottom: 6px;
}

.fg-seg__linea {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed var(--fg-line);
}

.fg-seg__linea:last-child { border-bottom: none; }

.fg-seg__linea span:first-child { color: var(--fg-muted); }
.fg-seg__linea span:last-child { font-weight: 700; text-align: right; }

.fg-seg__sinasignar {
    font-size: 13.5px;
    color: var(--fg-muted);
    font-style: italic;
}

/* ── Panel del mapa ─────────────────────────────────────────────────────── */
.fg-seg__mapa-body { padding: 16px; }

.fg-seg__mapa #map {
    width: 100%;
    height: 340px;
    border-radius: 10px;
    background: var(--fg-soft);
}

@media (min-width: 901px) {
    .fg-seg__mapa #map { height: 420px; }
}

/* ── Barra de refresco ──────────────────────────────────────────────────── */
.fg-seg__refresco {
    margin-top: 12px;
    height: 5px;
    border-radius: 999px;
    background: var(--fg-line);
    overflow: hidden;
}

.fg-seg__refresco-barra {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--fg-p), var(--fg-ap));
    transition: width 1s linear;
}

/* ── Leyenda ─────────────────────────────────────────────────────────────── */
.fg-seg__leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--fg-line);
}

.fg-seg__leyenda-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.fg-seg__punto {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.fg-seg__punto--origen { background: #16A34A; }
.fg-seg__punto--destino { background: #DC2626; }
.fg-seg__punto--conductor { background: #2563EB; }

@media (max-width: 420px) {
    .fg-seg__leyenda { gap: 10px; }
    .fg-seg__leyenda-item { font-size: 11px; }
}
