/* css/manual.css
   Instrukcja (manual) – proste zakładki + czytelna typografia.
   Cel: brak „ramek jak w aplikacji", dużo czytelności jak w dokumentacji.
*/

/* Hide topbar/footer when opened in modal (iframe) */
html.modal-mode .topbar,
html.modal-mode .footer {
    display: none !important;
    visibility: hidden !important;
}
html.modal-mode .wrap {
    padding-top: 0 !important;
}

.manual-body {
    background: var(--bg);
    color: #fff
}

.page-title {
    margin: 20px 0 12px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase
}

.page-subtitle {
    margin: 0 0 12px;
    opacity: .82;
    font-size: 13px;
    letter-spacing: .04em;
    font-weight: 800;
}

.mobile-only-tab-subtitle {
    display: none;
}

.topbar-close-slot {
    display: none;
    width: 42px;
    min-width: 42px;
    height: 40px;
    border-radius: 12px;
}

.simple-tabs,
.modal-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin: 0 0 18px
}

.simple-tabs .tab,
.modal-tabs .tab {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.06);
    color: #fff;
    font-weight: 900;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .15s ease,color .15s ease,border-color .15s ease,transform .05s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.simple-tabs .tab:hover {
    background: rgba(255,255,255,.12)
}

.simple-tabs .tab:active {
    transform: translateY(1px)
}

.simple-tabs .tab.active,
.modal-tabs .tab.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold)
}


.tab-page {
    display: none;
    padding: 0;
    border: 0;
    background: 0 0;
    min-height: 0
}

.tab-page.active {
    display: block
}

.tab-panel{display:none}
.tab-panel.active{display:block}

.m-doc {
    width: 100%;
    max-width: 100%
}

.m-p {
    margin: 0 0 14px;
    line-height: 1.65;
    font-size: 16px;
    color: rgba(255,255,255,.92)
}

.m-h2,.m-h3 {
    font-weight: 1000;
    text-transform: uppercase
}

.m-h2 {
    margin: 18px 0 8px;
    font-size: 13px;
    letter-spacing: .08em;
    color: var(--gold)
}

.m-h3 {
    margin: 14px 0 6px;
    font-size: 12px;
    letter-spacing: .06em;
    opacity: .95
}

.m-ol,.m-ul {
    margin: 0 0 14px 18px;
    line-height: 1.6;
    color: rgba(255,255,255,.92)
}

.m-ol li,.m-ul li {
    margin: 6px 0
}

.tab-page a {
    text-decoration: underline;
    text-underline-offset: 3px
}

.m-strong {
    font-weight: 1000;
    color: #fff
}

.m-muted {
    color: rgba(255,255,255,.75)
}

.m-muted.m-block {
    margin-top: 10px
}

.m-note,.m-warn {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 16px;
    color: rgba(255,255,255,.95)
}

.m-note {
    border: 1px solid rgba(255,234,166,.28);
    background: rgba(255,234,166,.1)
}

.m-note b,.tab-page a {
    color: var(--gold)
}

.m-warn {
    border: 1px solid rgba(255,120,120,.35);
    background: rgba(255,120,120,.1)
}

.m-box,.m-code,.m-pre {
    border: 1px solid var(--line2)
}

.m-box {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(0,0,0,.18);
    color: rgba(255,255,255,.92)
}

.m-code,.m-pre {
    font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(0,0,0,.22)
}

.m-pre {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 16px;
    overflow: auto;
    line-height: 1.55;
    color: rgba(255,255,255,.92)
}

@media (max-width:900px) {
    .mobile-only-tab-subtitle {
        display: block;
    }
}

/* ── m-table (tabele skrótów klawiszowych) ── */
.m-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.1);
}

.m-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    white-space: nowrap;
}

.m-table th {
    padding: 8px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    background: rgba(0,0,0,.2);
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.m-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: rgba(255,255,255,.88);
}

.m-table tr:last-child td {
    border-bottom: none;
}

.m-table td:not(:first-child) {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    color: var(--gold);
    opacity: .9;
}

.m-table tr:hover td {
    background: rgba(255,255,255,.04);
}

@media (max-width:600px) {
    .m-p {
        font-size: 15px;
        line-height: 1.7
    }

   .mobile-only-tab-subtitle {
      display: block;
   }

   .simple-tabs,
   .modal-tabs {
      display: flex;
      flex-wrap: wrap;
   }
}


body.manual-in-control-modal .topbar-section-1{ gap:10px; }
body.manual-in-control-modal .topbar-section-4{ margin-left:auto; }
body.manual-in-control-modal .wrap{ width: min(1200px, 96vw); }

html.manual-in-control-modal, body.manual-in-control-modal { height: 100%; }
body.manual-in-control-modal { background: var(--bg); }
body.manual-in-control-modal .topbar-close-slot{ display:block; }
body.manual-in-control-modal .topbar { position: sticky; top: 0; z-index: 5; }
body.manual-in-control-modal .m-wrap { padding-bottom: 16px; }
