/* Virtual Store — устanовик приложений (wizard) + панель загрузок */

#win-installer.asi-window {
    width: 560px;
    height: 520px;
    min-width: 420px;
    min-height: 420px;
    background: #1e1c22;
    border: 1px solid #3a3a44;
    border-radius: 6px;
    overflow: hidden;
    flex-direction: column;
}

#win-installer .asi-header {
    background: #2b2733 !important;
    color: #e8e6ea !important;
    font-family: 'Ubuntu', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    border-bottom: 1px solid #3a3a44 !important;
    flex-shrink: 0;
}

.asi-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    font-family: 'Ubuntu', sans-serif;
    color: #d1d4dc;
}

.asi-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    background: #24222a;
    border-bottom: 1px solid #33313a;
    flex-shrink: 0;
}

.asi-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #7a7883;
    padding: 4px 8px;
    border: 1px solid #35333d;
    border-radius: 20px;
}

.asi-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #33313d;
    color: #b9b7c2;
    font-size: 9px;
}

.asi-step.is-active {
    color: #fff;
    border-color: #e95420;
    background: rgba(233, 84, 32, 0.12);
}

.asi-step.is-active span {
    background: #e95420;
    color: #fff;
}

.asi-step.is-done {
    color: #8fd18f;
    border-color: rgba(80, 200, 120, 0.3);
}

.asi-step.is-done span {
    background: #2f7d4f;
    color: #fff;
}

.asi-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.asi-pane {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}

.asi-pane h2 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #fff;
}

.asi-p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #c6c4cd;
}

.asi-muted {
    color: #8b8a93;
    font-size: 12px;
    line-height: 1.5;
}

.asi-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    margin-bottom: 14px;
    background: #252932;
    border: 1px solid #33313d;
    border-radius: 8px;
}

.asi-hero__icon {
    font-size: 40px;
    line-height: 1;
}

.asi-hero h2 {
    margin: 0 0 4px;
}

.asi-eula {
    max-height: 170px;
    overflow-y: auto;
    margin: 0 0 12px;
    padding: 12px;
    background: #14121a;
    border: 1px solid #33313d;
    border-radius: 6px;
    font: 400 11px/1.5 'Ubuntu Mono', monospace;
    color: #b6b4be;
    white-space: pre-wrap;
}

.asi-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 13px;
    color: #d1d4dc;
    cursor: pointer;
}

.asi-check input {
    accent-color: #e95420;
    width: 15px;
    height: 15px;
}

.asi-path {
    padding: 10px 12px;
    margin: 4px 0 10px;
    background: #14121a;
    border: 1px solid #33313d;
    border-radius: 6px;
    font: 600 12px/1.4 'Ubuntu Mono', monospace;
    color: #f0b90b;
}

.asi-progress {
    height: 12px;
    margin: 14px 0 6px;
    background: #14121a;
    border: 1px solid #33313d;
    border-radius: 6px;
    overflow: hidden;
}

.asi-progress > i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e95420, #ffb86b);
    transition: width 0.15s linear;
}

.asi-progress-meta {
    font: 600 12px/1 'Ubuntu Mono', monospace;
    color: #b9b7c2;
}

.asi-log {
    height: 92px;
    margin: 0;
    padding: 10px 14px;
    overflow-y: auto;
    background: #14121a;
    border-top: 1px solid #33313d;
    font: 400 11px/1.5 'Ubuntu Mono', monospace;
    color: #8fd18f;
    white-space: pre-wrap;
    flex-shrink: 0;
}

.asi-log-line--ok {
    color: #57e389;
}

.asi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: #24222a;
    border-top: 1px solid #33313d;
    flex-shrink: 0;
}

.asi-counter {
    font-size: 10px;
    color: #8b8a93;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.asi-actions {
    display: flex;
    gap: 8px;
}

.asi-btn {
    padding: 7px 14px;
    border-radius: 5px;
    border: 1px solid #43414b;
    background: #2d2b34;
    color: #d1d4dc;
    font: 600 12px/1 'Ubuntu', sans-serif;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.asi-btn:hover:not(:disabled) {
    border-color: #e95420;
    background: #363039;
}

.asi-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.asi-btn--primary {
    background: #e95420;
    border-color: #c8481a;
    color: #fff;
}

.asi-btn--primary:hover:not(:disabled) {
    background: #ff6a34;
}

/* ── Панель загрузок (правый нижний угол) ── */
.app-dl-panel {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 320px;
    z-index: 40000;
    background: #1e222d;
    border: 1px solid #363a45;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #d1d4dc;
    display: none;
    overflow: hidden;
}

.app-dl-panel.is-open {
    display: block;
}

.app-dl-panel__head {
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b8a93;
    background: #252932;
    border-bottom: 1px solid #363a45;
}

.app-dl-panel__list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
}

.app-dl-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #363a45;
    border-radius: 8px;
    background: #252932;
    margin-bottom: 8px;
}

.app-dl-row:last-child {
    margin-bottom: 0;
}

.app-dl-row__icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.app-dl-row__body {
    flex: 1;
    min-width: 0;
}

.app-dl-row__name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-dl-row__bar {
    height: 5px;
    margin: 5px 0 4px;
    background: #14121a;
    border-radius: 3px;
    overflow: hidden;
}

.app-dl-row__bar > i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2962ff, #59a7ff);
    transition: width 0.15s linear;
}

.app-dl-row__meta {
    font-size: 10px;
    color: #8b8a93;
}

.app-dl-row.is-ready .app-dl-row__bar > i {
    background: linear-gradient(90deg, #26a69a, #57e389);
}

.app-dl-row.is-ready .app-dl-row__meta {
    color: #57e389;
}

.app-dl-row__action {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #2962ff;
    background: #2962ff;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.app-dl-row__action:disabled {
    background: transparent;
    border-color: #434651;
    color: #787b86;
    cursor: default;
}

@media (max-width: 820px) {
    .app-dl-panel {
        left: 8px;
        right: 8px;
        width: auto;
    }
    #win-installer.asi-window {
        width: 100%;
    }
}
