/* Locator-Bar-Farbe - on top of text-generators.css, texture-editor.css and painting-generator.css */
.lb-layout {
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.lb-form {
    display: grid;
    gap: 2px;
    text-align: left;
}

.tg-panel .lb-go,
.tg-panel .lb-add {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
}

.lb-add[hidden],
.lb-result[hidden],
.lb-tag[hidden] {
    display: none;
}

.lb-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tg-line);
}

.lb-who {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: center;
    flex-direction: column;
}

#lbHead {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    image-rendering: pixelated;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.lb-who div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.lb-who strong {
    color: var(--text-primary);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.lb-who small {
    color: var(--text-muted);
    font-family: var(--mono-font);
    font-size: 0.68rem;
    overflow-wrap: anywhere;
}

.lb-tag {
    justify-self: start;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--tg-accent-soft);
    color: var(--tg-accent);
    font-size: 0.68rem;
    font-weight: 700;
}

/* the big colour */
.lb-swatch {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 10px;
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--lb, #3d9be9);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 24px color-mix(in srgb, var(--lb, #3d9be9) 35%, transparent);
    text-align: left;
}

.lb-swatch b {
    color: #fff;
    font-family: var(--mono-font);
    font-size: 1.6rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.lb-swatch span {
    grid-column: 1;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.lb-swatch .mct-icon {
    grid-row: 1 / span 2;
    grid-column: 2;
}

.main .lb-label {
    margin-top: 16px;
}

.lb-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.lb-steps span {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 8px 10px;
    border: 1px solid var(--tg-line);
    border-radius: 10px;
    background: var(--tg-field);
}

.lb-steps small {
    color: var(--text-muted);
    font-size: 0.66rem;
}

.lb-steps b {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--c);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.lb-steps code {
    font-size: 0.72rem;
}

.lb-steps i {
    color: var(--tg-accent);
    font-size: 0.8rem;
}

/* the bar */
.lb-stage {
    padding: 22px 10px;
    border-radius: 12px;
    background: linear-gradient(180deg, #6f9fd8 0%, #9cc3ec 55%, #5d8a3a 55%, #4b7430 100%);
}

#lbBar {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

.main .lb-sprite-info {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.main .lb-friends {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lb-friends li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border: 1px solid var(--tg-line);
    border-radius: 10px;
    background: var(--tg-field);
    text-align: left;
}

.lb-friends canvas {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    image-rendering: pixelated;
}

.lb-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--lb);
}

.lb-friends strong {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.lb-friends code {
    font-size: 0.75rem;
}

/* commands */
.lb-cmd-opts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.tg-panel .lb-cmd-opts label {
    display: grid;
    gap: 4px;
    margin: 0;
    font-size: 0.8rem;
    text-align: left;
}

.tg-panel .lb-cmd-opts input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--tg-line);
    border-radius: 10px;
    background: var(--tg-field);
    cursor: pointer;
}

.lb-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lb-team i {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--lb);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.lb-cmds {
    display: grid;
    gap: 8px;
}

.lb-cmd {
    display: grid;
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--tg-line);
    border-radius: 10px;
    background: var(--tg-field);
    text-align: left;
}

.lb-cmd span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.lb-cmd code {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .lb-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .lb-cmd-opts {
        grid-template-columns: minmax(0, 1fr);
    }

    .lb-cmd {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .lb-cmd span {
        grid-column: 1 / -1;
    }
}

/* the bar preview sticks while the page scrolls, like the preview of the text generators -
   only side by side; never taller than the screen */
@media (min-width: 901px) {
    .lb-preview {
        position: sticky;
        top: 96px;
        max-height: calc(100vh - 112px);
        overflow-y: auto;
    }
}

/* the two panels below the layout must not touch */
.main .lb-below .tg-panel + .tg-panel {
    margin-top: 24px;
}
