/* --- 1. GLOBÁLNÍ SCHOVÁNÍ MAXIMALIZACE (NEFUNKČNÍ NA MOBILU) --- */
#btnFullscreen, #btn-fullscreen {
    display: none !important;
}

/* Zamezení uskakování (jitter) na mobilu je nyní vyřešeno korektní úpravou okrajů (row vs container) níže */

/* --- 2. MENU SCROLLOVÁNÍ NA MOBILU --- */
@media (max-width: 991px) {
    .navbar-collapse {
        height: calc(100vh - 70px);
        overflow-y: auto;
        background-color: #212529; /* Stejná barva jako bg-dark v hlavičce */
        padding-bottom: 30px;
    }
}

@media (max-width: 767.98px) {
    /* 8D Report Mobile Tables */
    .eight-d-step .table th:nth-child(1) {
        width: auto !important;
    }
    .eight-d-step .table th:nth-child(2) {
        width: 65px !important;
        min-width: 65px !important;
        word-break: break-all !important;
        hyphens: auto !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    .eight-d-step .table td:nth-child(2) textarea {
        word-break: break-all !important;
        hyphens: auto !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    .eight-d-step .table th:nth-child(3) {
        width: 75px !important;
        min-width: 75px !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }
    .eight-d-step .table td:nth-child(3) {
        padding-left: 2px !important;
        padding-right: 2px !important;
        vertical-align: middle;
    }
    .eight-d-step .table td:nth-child(3) input[type="date"] {
        -webkit-appearance: none !important;
        appearance: none !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 0.75rem !important;
        width: 100% !important;
        min-width: 70px !important;
        max-width: 85px !important;
        text-align: center;
        background-color: transparent;
        border: none !important;
    }
    .eight-d-step .table td:nth-child(3) input[type="date"]::-webkit-calendar-picker-indicator {
        display: none !important;
        -webkit-appearance: none !important;
    }
    .eight-d-step .table td:nth-child(3) input[type="date"]::-webkit-date-and-time-value {
        text-align: center;
        margin: 0;
        padding: 0;
    }

    /* --- MAXIMALIZACE ŠÍŘKY (FULL WIDTH) NA MOBILU --- */
    .container-fluid {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }
    .row {
        margin-left: -0.25rem !important;
        margin-right: -0.25rem !important;
    }
    
    .tool-container, 
    .card-body,
    .bg-white.p-4 {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        border-radius: 0 !important;
    }

    /* Roztáhnutí hlaviček 8D a prvků až do kraje */
    .eight-d-step {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* PC BUTTON — nad nástrojem */
    .mobile-pc-button-container {
        display: flex;
        justify-content: center;
        margin-bottom: 15px;
    }
    .mobile-pc-button {
        animation: mobile-btn-pulse 2.5s ease-in-out infinite;
    }
    @keyframes mobile-btn-pulse {
        0%, 100% { box-shadow: 0 4px 20px rgba(13,110,253,0.35); }
        50%       { box-shadow: 0 6px 30px rgba(13,110,253,0.65); }
    }

    /* ISHIKAWA — scrollovatelný diagram */
    .fishbone-wrapper { min-width: 680px; }
    #chartWrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
    #chartWrapper::after { /* gradient scroll hint */
        content: ''; position: absolute; bottom: 0; left: 0; right: 0;
        height: 55px; background: linear-gradient(to top, rgba(248,249,250,0.92), transparent);
        pointer-events: none;
    }

    /* FLOWCHART — stacking panelů */
    .main-workspace { flex-direction: column !important; height: auto !important; }
    .left-panel { flex: none !important; max-width: 100% !important;
                  border-right: none !important; border-bottom: 1px solid #dee2e6;
                  max-height: 45vh; overflow-y: auto; }
    .right-panel { min-height: 320px; }

    /* 8D REPORT */
    #btn-fullscreen { display: none !important; }

    /* 5-WHY */
    .why-row { flex-direction: column; }
    .why-row label { width: auto !important; padding-top: 0; margin-bottom: 4px; }

    /* LPA */
    .b2b-form-container { margin-top: 0 !important; }
}

/* Oprava kontrastu zlute barvy pro Google */
.capability-active { color: #d39e00 !important; }
@media (max-width: 991.98px) { .capability-active { color: #996515 !important; } }


/* Tmave zlute tlacitko (nahrazuje svitive outline-warning pro lepsi kontrast a stejny styl jako ostatni) */
.custom-warning-btn { color: #b8860b !important; border-color: #b8860b !important; }
.custom-warning-btn:hover { color: #fff !important; background-color: #b8860b !important; }

