/* Startup library picker, conversion panel, and folder bar. */

.lib-setup {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    color: #000;
    font-family: fira-sans, sans-serif;
}

.lib-setup[hidden] { display: none; }

.lib-setup-bg {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 95, 0.55);
}

.lib-setup-bg::before { content: none; }

.lib-card {
    position: relative;
    width: min(720px, 100%);
    max-height: min(880px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--fam-deepnavy);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(17, 24, 95, 0.28);
    overflow: auto;
    animation: lib-rise 0.42s ease;
}

.lib-card-body[hidden] { display: none; }

.lib-card-head {
    padding: 1.15rem 1.5rem;
    background: var(--fam-deepnavy);
}

.lib-kicker {
    margin: 0 0 8px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fam-litebronze);
}

.lib-card h2 {
    margin: 0;
    font-family: fira-sans, sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0;
    line-height: 1.25;
    color: #fff;
}

.lib-lead {
    margin: 0.45rem 0 0;
    max-width: 46em;
    color: var(--fam-whitesmoke);
    font-size: 0.95rem;
    line-height: 1.5;
}

.lib-card-body {
    padding: 18px 28px 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lib-card-body .lib-card-foot {
    margin: 4px -28px 0;
}

.lib-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 0;
    align-items: center;
    min-height: 28px;
    font-size: 13px;
}

.lib-crumb,
.lib-crumb-static {
    background: none;
    border: 0;
    color: var(--fam-deepnavy);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    background: transparent;
    border: 0;
    border-radius: 4px;
    padding: 2px 0;
}

.lib-crumb { cursor: pointer; }
.lib-crumb:hover:not(:disabled) {
    background: transparent;
    border: 0;
    color: var(--fam-purple);
}
.lib-sep { color: var(--fam-slategrey); margin: 0 6px; }
.lib-crumb-static { color: #000; }

.lib-notice {
    margin: 0;
    padding: 0.65rem 0.8rem;
    border-radius: 4px;
    background: #fff7e8;
    border: 1px solid #e0c48a;
    color: #5c4500;
    font-size: 0.92rem;
    line-height: 1.4;
}

.lib-notice[hidden] { display: none; }

.lib-section-label {
    margin: 8px 8px 4px;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fam-slategrey);
}

.lib-paste {
    display: flex;
    gap: 8px;
}

.lib-paste input {
    flex: 1;
    min-width: 0;
    background: var(--fam-whitesmoke);
    border: 1px solid var(--fam-slategrey);
    color: #000;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    padding: 0 0.55rem;
    height: 2rem;
    font: inherit;
    font-size: 0.95rem;
}

.lib-paste input::placeholder { color: var(--fam-slategrey); }
.lib-paste input:focus {
    outline: none;
    border-color: var(--fam-slategrey);
}

.lib-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    color: #000;
    font-size: 0.9em;
    font-style: italic;
}

.lib-meta strong { color: #000; font-weight: 600; font-style: normal; }

.lib-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    overflow: auto;
    min-height: 240px;
    max-height: 340px;
    border-radius: 4px;
    background: var(--fam-whitesmoke);
    border: 1px solid var(--fam-slategrey);
}

.lib-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    background: transparent;
    border: 0;
    color: #000;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    padding: 10px 12px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: none;
}

.lib-row:hover:not(:disabled),
.lib-row:focus-visible {
    background: var(--fam-lightGrey);
    border: 0;
    color: #000;
}

.lib-row:disabled {
    opacity: 0.45;
    cursor: default;
}

.lib-row svg { flex: 0 0 auto; color: var(--fam-deepnavy); }
.lib-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-row-hint { color: var(--fam-bronze); font-size: 0.75rem; text-transform: none; }

.lib-empty {
    margin: 0;
    padding: 36px 16px;
    text-align: center;
    color: #000;
    font-size: 0.9rem;
}

.lib-error {
    margin: 0;
    color: var(--fam-bronze);
    font-size: 0.85rem;
    min-height: 1.2em;
}

.lib-card-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 16px 28px 22px;
}

.lib-foot-right { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.lib-btn {
    border-radius: 4px;
    padding: 0.45rem 0.85rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

.lib-btn:disabled { opacity: 0.45; cursor: default; }

.lib-btn-primary {
    background: var(--fam-deepnavy);
    color: #fff;
    border: 1px solid var(--fam-deepnavy);
    border-radius: 6px;
    font-weight: 600;
}

.lib-btn-primary:hover:not(:disabled) {
    background: var(--fam-purple);
    border-color: var(--fam-purple);
    color: #fff;
}

.lib-btn-ghost {
    background: var(--fam-whitesmoke);
    color: var(--fam-deepnavy);
    border: 1px solid var(--fam-deepnavy);
}

.lib-btn-ghost:hover:not(:disabled) {
    background: var(--fam-purple);
    border-color: var(--fam-purple);
    color: #fff;
}

.lib-btn-text {
    background: none;
    border: 0;
    color: var(--fam-deepnavy);
    padding-left: 0;
    padding-right: 0;
}

.lib-btn-text:hover:not(:disabled) {
    background: none;
    border: 0;
    color: var(--fam-purple);
}

.lib-thumbs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 0 28px;
}

.lib-thumbs-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fam-periwinkle-light);
    color: var(--fam-deepnavy);
    border: 1px solid var(--fam-deepnavy);
}

.lib-thumbs-mark.ok {
    background: var(--fam-periwinkle);
    color: var(--fam-deepnavy);
    border-color: var(--fam-deepnavy);
}

.lib-pathbox {
    margin: 0;
    padding: 12px 14px;
    border-radius: 4px;
    background: var(--fam-whitesmoke);
    border: 1px solid var(--fam-slategrey);
    color: var(--fam-deepnavy);
    font-family: Consolas, "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.45;
    word-break: break-all;
}

.lib-samples {
    margin: 0;
    color: #000;
    font-size: 0.9rem;
}

.lib-busy { opacity: 0.72; pointer-events: none; }

.lib-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 8px 8px 8px 12px;
    background: var(--fam-whitesmoke);
    border: 1px solid var(--fam-deepnavy);
    border-radius: 4px;
    font-size: 0.85rem;
    color: #000;
}

.lib-bar-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fam-bronze);
    flex: 0 0 auto;
}

.lib-bar-path {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: left;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.lib-bar-path span {
    direction: ltr;
    unicode-bidi: plaintext;
}

.lib-bar button {
    flex: 0 0 auto;
    border: 1px solid var(--fam-deepnavy);
    background: var(--fam-whitesmoke);
    color: var(--fam-deepnavy);
    border-radius: 4px;
    padding: 0.4rem 0.7rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

.lib-bar button:hover:not(:disabled) {
    background: var(--fam-purple);
    border-color: var(--fam-purple);
    color: #fff;
}

@media (max-width: 640px) {
    .lib-card h2 { font-size: 1.35rem; }
    .lib-card-head, .lib-card-body, .lib-card-foot { padding-left: 18px; padding-right: 18px; }
    .lib-card-body .lib-card-foot { margin-left: -18px; margin-right: -18px; }
    .lib-card-foot { flex-direction: column; align-items: stretch; }
    .lib-foot-right { justify-content: stretch; }
    .lib-foot-right .lib-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .lib-card { animation: none; }
}

@keyframes lib-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* Start / stop control for .mov files in the selected folder. */
.mov-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    margin: 0 0 22px;
    padding: 16px 18px 18px;
    background: var(--fam-whitesmoke);
    border: 1px solid var(--fam-deepnavy);
    border-radius: 8px;
    color: #000;
}
.mov-panel[hidden] { display: none; }
.mov-copy { flex: 1 1 260px; min-width: 0; }
.mov-kicker {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fam-bronze);
}
.mov-title {
    margin: 3px 0 4px;
    font-family: fira-sans, sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
    color: var(--fam-deepnavy);
}
.mov-detail {
    margin: 0;
    color: #000;
    font-size: 14px;
    line-height: 1.45;
}
.mov-names {
    margin: 6px 0 0;
    color: var(--fam-bronze);
    font-size: 13px;
}
.mov-error {
    margin: 6px 0 0;
    color: var(--fam-bronze);
    font-size: 13px;
}
.mov-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.mov-btn {
    border-radius: 4px;
    padding: 0.45rem 0.85rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}
.mov-btn:disabled { opacity: 0.5; cursor: default; }
.mov-start {
    background: var(--fam-deepnavy);
    color: #fff;
    border: 1px solid var(--fam-deepnavy);
    border-radius: 6px;
}
.mov-start:hover:not(:disabled) {
    background: var(--fam-purple);
    border-color: var(--fam-purple);
    color: #fff;
}
.mov-stop {
    background: var(--fam-slategrey);
    color: #fff;
    border: 1px solid var(--fam-slategrey);
}
.mov-stop:hover:not(:disabled) {
    background: var(--fam-lightGrey);
    border-color: var(--fam-lightGrey);
    color: #000;
}
.mov-track {
    flex: 1 0 100%;
    height: 6px;
    margin-top: 4px;
    background: var(--fam-whitesmoke);
    border: 1px solid var(--fam-lightGrey);
    border-radius: 99px;
    overflow: hidden;
    display: none;
}
.mov-track.on { display: block; }
.mov-track span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--fam-deepnavy);
    transition: width 0.25s ease;
}
.mov-jobs {
    flex: 1 0 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mov-jobs li {
    margin-top: 6px;
    font-size: 13px;
    color: #000;
}

.thumb-fill {
    margin: -8px 0 16px;
    font-size: 13px;
    color: #000;
}
.thumb-fill[hidden] { display: none; }

.faststart-fill {
    margin: -8px 0 16px;
    font-size: 13px;
    color: #000;
}
.faststart-fill[hidden] { display: none; }
.faststart-fill.err { color: var(--fam-bronze); }
