/* ============================================================
 * engineModal.css
 * Shared styles for the FFmpeg engine-load modal.
 * Included from every tool page (index, splitter, joiner,
 * muxer, demuxer, mixer, converter).
 * ============================================================ */

.engine-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.engine-modal--hidden {
    display: none;
}

.engine-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.engine-modal__box {
    position: relative;
    z-index: 1;
    background: #fff;
    color: #222;
    padding: 24px;
    border-radius: 8px;
    min-width: 320px;
    max-width: 480px;
    width: calc(100% - 32px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.engine-modal__box h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.engine-modal__box p {
    margin: 0 0 8px;
}

.engine-modal__box select {
    width: 100%;
    padding: 8px;
    margin: 8px 0 16px;
    box-sizing: border-box;
    font-size: 14px;
}

.engine-progress {
    margin: 12px 0;
}

.engine-progress--hidden {
    display: none;
}

.engine-progress__bar {
    height: 22px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.engine-progress__fill {
    height: 100%;
    background: #28a745;
    width: 0%;
    transition: width 0.15s linear;
}

.engine-progress__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 13px;
    color: #444;
}

.engine-complete-mark {
    color: #28a745;
    font-weight: bold;
}

.engine-complete-mark--hidden {
    display: none;
}

.engine-modal__actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

.engine-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.engine-btn--primary {
    background: #007bff;
    color: #fff;
}

.engine-btn--primary:hover:not(:disabled) {
    background: #0069d9;
}

.engine-btn--secondary {
    background: #ddd;
    color: #222;
}

.engine-btn--secondary:hover:not(:disabled) {
    background: #ccc;
}

.engine-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.engine-btn--hidden {
    display: none;
}
