/* File: shelfsag_v2.css | Verze a aktuální datum: 06-11-26 v_1.17 */

.th-sag2-pills.th-pill-group {
    flex-wrap: wrap;
}

.th-sag2-pills .th-pill-label {
    flex: 1 1 auto;
}

.th-sag2-row [hidden],
.th-sag2-row[hidden] {
    display: none;
}

.th-sag2 {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.th-sag2-title {
    font-size: 12px;
    font-weight: bold;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.th-sag2-ladder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.th-sag2-cell {
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.th-sag2-cell-label {
    min-height: 26px;
    font-size: 11px;
    line-height: 1.2;
    color: #999;
}

.th-sag2-cell-value {
    margin-top: 5px;
    font-size: 16px;
    font-weight: bold;
}

.th-sag2-ok .th-sag2-cell-value { color: #4CAF50; }
.th-sag2-warn .th-sag2-cell-value { color: #FF9800; }
.th-sag2-bad .th-sag2-cell-value { color: #F44336; }
.th-sag2-hold .th-sag2-cell-value { color: #f9c343; }

.th-sag2-note {
    font-size: 12px;
    line-height: 1.4;
    color: #999;
}

.th-sag2-admin {
    padding-top: 6px;
    border-top: 1px dashed #444;
    color: #777;
}

.th-sag2-advice {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 1.5;
    color: #ddd;
}

.th-sag2-advice li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}

.th-sag2-advice li + li {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.th-sag2-advice li > span {
    flex: 1 1 auto;
    min-width: 0;
}

.th-sag2-advice .th-calc-error-action {
    flex-shrink: 0;
    width: auto;
    margin: 0;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

/* Telefon: text rady nahoře, tlačítko pod ním přes celou šířku */
@media (max-width: 700px) {
    .th-sag2-advice li {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 0;
    }

    .th-sag2-advice .th-calc-error-action {
        width: 100%;
        max-width: none;
    }
}

.th-sag2-pick {
    margin-bottom: 0;
}

.th-sag2-load {
    padding-bottom: 16px;
}

.th-sag2-bracket-grid {
    row-gap: 20px !important;
}

.th-sag2-bracket-grid .th-range-slider {
    margin-top: 12px;
}

#th-svg-wrapper .th-vis-stage[data-th-vis-id="shelfsag"].th-vis-is-3d {
    height: var(--th-sag2-h, 640px);
}

.th-sag2-chips {
    position: absolute;
    top: 64px;
    min-height: 34px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.th-sag2-rows {
    position: static;
    pointer-events: auto;
}

/* Telefon, 2D: štítek uchycení by zakryl kótu délky, uchycení je vidět na nákresu */
@media (max-width: 560px) {
    .th-vis-stage:not(.th-vis-is-3d) .th-sag2-mount {
        display: none;
    }
}

.th-vis-stage:not(.th-vis-is-3d) .th-sag2-rows {
    display: none;
}

.th-sag2-mount,
.th-sag2-goal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 8px;
    border-radius: 8px;
    background: rgba(20, 20, 20, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ddd;
    font-size: 12px;
    font-weight: bold;
}

.th-vis-stage:not(.th-vis-is-3d) .th-sag2-mount {
    margin-left: auto;
}

.th-sag2-live {
    flex-basis: 100%;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(20, 20, 20, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ddd;
    font-size: 12px;
    font-weight: bold;
}

.th-sag2-live.th-sag2-tiny {
    color: #4CAF50;
    border-color: rgba(76, 175, 80, 0.5);
}

.th-sag2-live[hidden],
.th-vis-stage:not(.th-vis-is-3d) .th-sag2-live {
    display: none;
}

.th-sag2-goal {
    flex-basis: 100%;
    padding-left: 12px;
    color: #f9c343;
}

.th-sag2-goal[hidden],
.th-sag2-risk[hidden] {
    display: none;
}

.th-sag2-risk {
    flex-basis: 100%;
}

.th-sag2-risk .th-calc-alert {
    margin: 0;
    padding: 8px 12px;
}

/* Piktogram uložení: bok (i), police (b), kolíček, šroub, drážka nebo podpěra (u) */
.th-sag2-mi {
    position: relative;
    flex: none;
    width: 34px;
    height: 22px;
}

.th-sag2-mi i,
.th-sag2-mi b,
.th-sag2-mi u {
    position: absolute;
    display: block;
    border-radius: 1px;
}

.th-sag2-mi i { left: 0; top: 0; width: 6px; height: 22px; background: #8d7a5c; }
.th-sag2-mi b { left: 9px; right: 0; top: 8px; height: 4px; background: #d9c3a0; }
.th-sag2-mi u { background: #f9c343; }

.th-sag2-mi-free u { left: 6px; top: 13px; width: 10px; height: 2px; }
.th-sag2-mi-fixed b { left: 6px; }
.th-sag2-mi-fixed u { left: 0; top: 9px; width: 16px; height: 2px; }
.th-sag2-mi-dado b { left: 3px; }
.th-sag2-mi-dado u { left: 2px; top: 6px; width: 4px; height: 8px; background: none; border: 1px solid #f9c343; border-right: 0; box-sizing: border-box; }
.th-sag2-mi-brackets i { width: 4px; }
.th-sag2-mi-brackets b { left: 4px; top: 5px; }
.th-sag2-mi-brackets u { left: 4px; top: 9px; width: 18px; height: 2px; box-shadow: -16px 0 0 0 transparent; }
.th-sag2-mi-middle i { display: none; }
.th-sag2-mi-middle b { left: 0; top: 4px; }
.th-sag2-mi-middle u { left: 15px; top: 8px; width: 4px; height: 14px; }

/* Pět voleb se na telefon do jedné řady nevejde: systémové karty zalomit po třech */
@media (max-width: 600px) {
    #expert-settings .th-option-cards {
        grid-auto-flow: row;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* Čtyři volby po dvou, ať nezůstane jedna sama na řádku */
    #expert-settings .th-option-cards:has(> :nth-child(4):last-child) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #expert-settings .th-option-cards .th-option-card {
        padding: 8px 3px;
    }

    #expert-settings .th-option-cards .th-option-title {
        font-size: 10px;
    }
}

/* Konzoly: šipka návratu na auto svisle na střed pole i na telefonu, odstup od další volby */
#th-sag2-inset .th-input-group {
    position: relative;
}

#th-sag2-inset .th-auto-reset {
    top: 50% !important;
    bottom: auto !important;
    margin: 0 !important;
}

#th-sag2-inset .th-sag2-wall-title {
    margin-top: 28px;
}

/* Zátěž spočítaná z obsahu: pole je jen ke čtení, posuvník zůstává a přepne na vlastní hmotnost */
.th-sag2-load-auto .th-spinners {
    display: none;
}

.th-sag2-load-auto input:not([type="range"]) {
    color: #9a9a9a !important;
    cursor: default;
}

.th-sag2-load-note {
    margin-top: 6px;
    color: #a8a8a8;
    font-size: 11px;
    line-height: 1.4;
}

.th-sag2-load-note[hidden] {
    display: none;
}

.th-sag2-load-note button {
    padding: 0;
    border: 0;
    background: none;
    color: #f9c343;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
