/* Modulo ineccompra: renovacion embebida en /app */
html.ineccompra-abierta,
html.ineccompra-abierta body {
    overflow: hidden !important;
}

#ineccompra-hoja {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: var(--sb-fondo, #ffffff);
    color: var(--sb-item-color, #111827);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.ineccompra-barra {
    height: 56px;
    min-height: 56px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--c-borde, #e5e7eb);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    background: var(--sb-fondo, #ffffff);
    color: var(--sb-item-color, #111827);
}

.ineccompra-volver {
    background: transparent;
    border: 0;
    padding: 6px 12px;
    color: var(--sb-item-color, #111827);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.ineccompra-volver:hover {
    background: var(--c-borde, rgba(0, 0, 0, 0.05));
}

.ineccompra-barra-tit {
    font-size: 15px;
    font-weight: 600;
    color: var(--sb-item-color, #111827);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.ineccompra-cuerpo {
    flex: 1;
    height: calc(100% - 56px);
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
}

.ineccompra-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

/* Esqueleto de checkout instantaneo */
.ineccompra-esqueleto {
    box-sizing: border-box;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.ineccompra-sk-tit {
    height: 28px;
    width: 220px;
    border-radius: 6px;
    background: var(--c-borde, #e5e7eb);
}

.ineccompra-sk-grid {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.ineccompra-sk-campos {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ineccompra-sk-barra {
    height: 42px;
    width: 100%;
    border-radius: 6px;
    background: var(--c-borde, #e5e7eb);
}

.ineccompra-sk-lateral {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ineccompra-sk-resumen {
    height: 180px;
    border-radius: 8px;
    border: 1px solid var(--c-borde, #e5e7eb);
    background: var(--sb-fondo, #ffffff);
}

.ineccompra-sk-boton {
    height: 46px;
    border-radius: 6px;
    background: var(--inec-marca, #f26a4b);
    opacity: 0.85;
}

@media (max-width: 700px) {
    .ineccompra-sk-grid {
        flex-direction: column;
        gap: 20px;
    }
    .ineccompra-sk-campos,
    .ineccompra-sk-lateral {
        width: 100%;
        flex: 1 1 auto;
    }
}

@keyframes ineccompra-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.ineccompra-sk-tit,
.ineccompra-sk-barra,
.ineccompra-sk-resumen,
.ineccompra-sk-boton {
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    background-repeat: no-repeat;
    animation: ineccompra-shimmer 1.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
    .ineccompra-sk-tit,
    .ineccompra-sk-barra,
    .ineccompra-sk-resumen,
    .ineccompra-sk-boton {
        animation: none;
        background-image: none;
    }
}

.ineccompra-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 32px 20px;
    box-sizing: border-box;
    text-align: center;
    gap: 12px;
}

.ineccompra-error-msg {
    font-size: 15px;
    color: #dc2626;
    margin: 0;
    max-width: 480px;
}

.ineccompra-enlace-respaldo {
    color: var(--inec-marca, #f26a4b);
    text-decoration: underline;
    font-weight: 500;
    font-size: 14px;
}

.ineccompra-aviso {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100001;
    max-width: calc(100vw - 32px);
    width: max-content;
    box-sizing: border-box;
    background: var(--inec-marca, #f26a4b);
    color: #ffffff;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    pointer-events: none;
}
