/* LagosPlug Media Engine */

.lpme {
    display: none;
    width: 100%;
    box-sizing: border-box;
    margin: 18px 0 10px;
    padding: 16px 17px;
    border: 1px solid rgba(10,149,72,.20);
    border-radius: 15px;
    background: linear-gradient(135deg,#f5fcf7,#ffffff);
    box-shadow: 0 9px 26px rgba(15,23,42,.05);
}

.lpme.is-visible { display: block; }

.lpme__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.lpme__status {
    color: #092c1b;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}

.lpme__percent {
    flex: 0 0 auto;
    color: #0a9548;
    font-size: 13px;
    font-weight: 900;
}

.lpme__track {
    width: 100%;
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4ece7;
}

.lpme__bar {
    position: relative;
    width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: linear-gradient(90deg,#065f46,#16a34a,#22c55e);
    transition: width .14s ease;
}

.lpme__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 38%;
    background: linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);
    transform: translateX(-120%);
    animation: lpme-shine 1s linear infinite;
}

.lpme__message {
    margin-top: 9px;
    color: #55655d;
    font-size: 11.5px;
    font-weight: 650;
    line-height: 1.5;
}

.lpme__tip {
    display: none;
    margin-top: 10px;
    padding: 10px 11px;
    border: 1px solid #f2d58a;
    border-radius: 10px;
    background: #fffaf0;
    color: #854d0e;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.lpme__tip.is-visible { display: block; }

.lpme.is-complete { border-color: rgba(10,149,72,.30); }

.lpme.is-complete .lpme__status,
.lpme.is-complete .lpme__percent,
.lpme.is-complete .lpme__message {
    color: #08783c;
}

.lpme.is-error {
    border-color: rgba(220,38,38,.28);
    background: linear-gradient(135deg,#fff7f7,#ffffff);
}

.lpme.is-error .lpme__status,
.lpme.is-error .lpme__percent { color: #b91c1c; }

.lpme.is-error .lpme__bar {
    background: linear-gradient(90deg,#991b1b,#ef4444);
}

.lpme__actions {
    display: none;
    margin-top: 12px;
}

.lpme.has-retry .lpme__actions { display: block; }

.lpme__retry {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 9px;
    min-height: 38px;
    padding: 9px 14px;
    background: #07142f;
    color: #fff;
    font-size: 11.5px;
    font-weight: 850;
    cursor: pointer;
}

@keyframes lpme-shine {
    to { transform: translateX(350%); }
}

@media (max-width: 600px) {
    .lpme {
        padding: 14px;
        border-radius: 13px;
    }

    .lpme__status,
    .lpme__percent { font-size: 12.5px; }

    .lpme__message,
    .lpme__tip { font-size: 11px; }

    .lpme__retry {
        width: 100%;
        min-height: 42px;
    }
}


/* V2 — slow/stuck connection recovery */
.lpme__refresh-wrap {
    display: none;
    margin-top: 12px;
}

.lpme.show-refresh .lpme__refresh-wrap,
.lpme.is-single-mode .lpme__refresh-wrap {
    display: block;
}

.lpme__refresh {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 44px;
    padding: 11px 15px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg,#0a9548,#22c55e);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(10,149,72,.16);
}

.lpme__refresh-note {
    margin-top: 7px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1.45;
    text-align: center;
}

.lpme.is-single-mode .lpme__refresh {
    display: none;
}

.lpme.is-single-mode .lpme__refresh-note {
    color: #08783c;
}
