/* =========================================================
   Barra superior estilo app (atrás · título · inicio)
   La usan: carrito, pedir cotización, solicitud y su seguimiento.
   ========================================================= */

.seg-barra {
    font-family: 'Schibsted Grotesk', Arial, Helvetica, sans-serif;
    position: sticky;
    top: 0;
    z-index: 900;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #E7E9F0;
}

@media (min-width: 1024px) {
    header.seg-barra { padding-inline: max(14px, calc((100% - var(--barra-ancho, 1000px)) / 2)); }
}

.seg-barra-btn {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #F1F2F7;
    color: #172331;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.seg-barra-btn:active { transform: scale(.94); }
.seg-barra-btn svg { width: 21px; height: 21px; }

.seg-barra-titulo {
    min-width: 0;
    text-align: center;
    line-height: 1.2;
}

.seg-barra-titulo strong {
    display: block;
    font-size: 16px;
    color: #172331;
}

.seg-barra-titulo span {
    display: block;
    font-size: 13px;
    color: #56616D;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ---------- Tarjeta de estado (seguimiento de la solicitud) ---------- */
.seg-estado {
    position: relative;
    overflow: hidden;
    margin: 0 0 18px;
    padding: 22px;
    border: 0 !important;
    border-radius: 24px !important;
    color: #fff;
    background: radial-gradient(60% 90% at 100% 0%, rgba(61, 179, 183, .30), transparent 70%), #18334E !important;
    box-shadow: 0 24px 44px -28px rgba(15, 36, 56, .7);
}

.seg-estado::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: url('../img/fondo-ruta.svg') right center / cover no-repeat;
    opacity: .5;
    -webkit-mask-image: linear-gradient(110deg, transparent 30%, #000 80%);
    mask-image: linear-gradient(110deg, transparent 30%, #000 80%);
}

.seg-estado > * { position: relative; }

.seg-estado-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.seg-estado-ico {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #F2BE4B;
    color: #1B2430;
}

.seg-estado-ico svg { width: 24px; height: 24px; }

.seg-vivo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 12px;
    font-weight: 800;
}

.seg-vivo i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F2BE4B;
    animation: seg-pulso 1.6s ease-in-out infinite;
}

@keyframes seg-pulso {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

.seg-estado .seg-estado-ceja {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, .78);
}

.seg-estado .seg-estado-sub {
    margin: 8px 0 16px;
    color: rgba(255, 255, 255, .72);
    font-size: 13.5px;
    line-height: 1.45;
}

.seg-codigo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 16px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.seg-codigo small { display: block; font-size: 11.5px; opacity: .7; }
.seg-codigo b { display: block; font-size: 17px; letter-spacing: .04em; }
.seg-codigo svg { width: 20px; height: 20px; flex: none; }
.seg-codigo em { display: none; font-style: normal; font-size: 13px; font-weight: 800; color: #8FE3B5; }
.seg-codigo.copiado svg { display: none; }
.seg-codigo.copiado em { display: inline; }

.seg-oculto {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}


/* ---------- Logo de la empresa junto al título ---------- */
.seg-barra-titulo.con-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: left;
}
.seg-barra-texto { min-width: 0; }
.seg-barra-titulo .seg-barra-avatar {
    width: 46px;
    height: 46px;
    flex: none;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 13px;
    background: #fff;
    border: 1px solid #E1E4EC;
    box-shadow: 0 6px 16px -10px rgba(15, 36, 56, .35);
}
.seg-barra-titulo .seg-barra-avatar img { width: 100%; height: 100%; object-fit: contain; }
.seg-barra-titulo .seg-barra-iniciales {
    border: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
}

@media (min-width: 768px) {
    header.seg-barra .seg-barra-titulo.con-avatar { justify-content: flex-start; }
    header.seg-barra .seg-barra-titulo { text-align: left; }
    .seg-barra-titulo .seg-barra-avatar { width: 60px; height: 60px; border-radius: 16px; }
    header.seg-barra { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 8px; }
    header.seg-barra .seg-barra-titulo.con-avatar strong { font-size: 18px; }
    header.seg-barra .seg-barra-titulo.con-avatar span { font-size: 13.5px; }
    header.seg-barra .seg-barra-titulo.con-avatar { gap: 12px; }
}


/* ---------- Barra más grande (igual en todas las páginas) ---------- */
header.seg-barra .seg-barra-titulo .seg-barra-avatar { width: 54px; height: 54px; border-radius: 15px; }
header.seg-barra .seg-barra-titulo.con-avatar strong,
header.seg-barra .seg-barra-titulo strong { font-size: 18px; }
header.seg-barra .seg-barra-titulo.con-avatar span,
header.seg-barra .seg-barra-titulo span { font-size: 14px; }
@media (min-width: 768px) {
    header.seg-barra { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; }
    header.seg-barra .seg-barra-titulo .seg-barra-avatar { width: 76px; height: 76px; border-radius: 20px; }
    header.seg-barra .seg-barra-titulo.con-avatar { gap: 16px; }
    header.seg-barra .seg-barra-titulo.con-avatar strong { font-size: 22px; }
    header.seg-barra .seg-barra-titulo.con-avatar span { font-size: 15.5px; }
}
