@import '_content/DWGViewer/DWGViewer.jixhch5pgn.bundle.scp.css';

/* /Pages/Home.razor.rz.scp.css */
.dwg-app[b-k8exp4188v] {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #1e1e1e;
    color: #e6e6e6;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.toolbar[b-k8exp4188v] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #2b2b2b;
    border-bottom: 1px solid #3d3d3d;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

    .toolbar button[b-k8exp4188v] {
        padding: 0.4rem 0.8rem;
        background: #3a3a3a;
        color: #e6e6e6;
        border: 1px solid #4d4d4d;
        border-radius: 4px;
        cursor: pointer;
    }

        .toolbar button:disabled[b-k8exp4188v] {
            opacity: 0.5;
            cursor: default;
        }

        .toolbar button:not(:disabled):hover[b-k8exp4188v] {
            background: #474747;
        }

.file-open-group[b-k8exp4188v] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.file-input[b-k8exp4188v] {
    color: #e6e6e6;
    font: inherit;
    max-width: 220px;
}

    .file-input[b-k8exp4188v]::file-selector-button {
        padding: 0.4rem 0.8rem;
        margin-right: 0.5rem;
        background: #3a3a3a;
        color: #e6e6e6;
        border: 1px solid #4d4d4d;
        border-radius: 4px;
        cursor: pointer;
    }

        .file-input[b-k8exp4188v]::file-selector-button:hover {
            background: #474747;
        }

.privacy-hint[b-k8exp4188v] {
    font-size: 0.75rem;
    color: #9a9a9a;
    max-width: 220px;
}

.mode-toggle[b-k8exp4188v] {
    display: flex;
    gap: 0.25rem;
}

    .mode-toggle button.active[b-k8exp4188v] {
        background: #2f6fdb;
        border-color: #4a86e8;
        color: #fff;
    }

        .mode-toggle button.active:not(:disabled):hover[b-k8exp4188v] {
            background: #3a7be0;
        }

.url-input[b-k8exp4188v] {
    flex: 1 1 220px;
    min-width: 160px;
    padding: 0.35rem 0.5rem;
    background: #1e1e1e;
    color: #e6e6e6;
    border: 1px solid #4d4d4d;
    border-radius: 4px;
}

.layout-select[b-k8exp4188v],
.sample-select[b-k8exp4188v] {
    padding: 0.35rem 0.5rem;
    background: #1e1e1e;
    color: #e6e6e6;
    border: 1px solid #4d4d4d;
    border-radius: 4px;
    max-width: 220px;
}

    .layout-select:disabled[b-k8exp4188v],
    .sample-select:disabled[b-k8exp4188v] {
        opacity: 0.5;
    }

.status-text[b-k8exp4188v] {
    margin-left: auto;
    font-size: 0.85rem;
    color: #b5b5b5;
    white-space: nowrap;
}

    .status-text.error[b-k8exp4188v] {
        color: #ff6b6b;
        font-weight: 600;
    }

.body[b-k8exp4188v] {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.viewer-area[b-k8exp4188v] {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.entity-toast[b-k8exp4188v] {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    max-width: 280px;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid #4d4d4d;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.toast-close[b-k8exp4188v] {
    float: right;
    background: none;
    border: none;
    color: #e6e6e6;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    margin-left: 0.5rem;
}

.side-panel[b-k8exp4188v] {
    display: flex;
    flex: 0 0 300px;
    border-left: 1px solid #3d3d3d;
    background: #262626;
    position: relative;
}

    .side-panel.collapsed[b-k8exp4188v] {
        flex-basis: 28px;
    }

.panel-toggle[b-k8exp4188v] {
    flex: 0 0 28px;
    background: #2b2b2b;
    color: #e6e6e6;
    border: none;
    border-right: 1px solid #3d3d3d;
    cursor: pointer;
}

.panel-content[b-k8exp4188v] {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0.5rem;
    overflow: hidden;
}

.tabs[b-k8exp4188v] {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

    .tabs .tab[b-k8exp4188v] {
        flex: 1 1 auto;
        padding: 0.4rem;
        background: #333;
        color: #cfcfcf;
        border: 1px solid #4d4d4d;
        border-radius: 4px 4px 0 0;
        cursor: pointer;
    }

    .tabs .tab.active[b-k8exp4188v] {
        background: #1e1e1e;
        color: #fff;
        border-bottom-color: #1e1e1e;
    }

.tab-pane[b-k8exp4188v] {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
}

    .tab-pane button[b-k8exp4188v] {
        padding: 0.4rem 0.6rem;
        background: #3a3a3a;
        color: #e6e6e6;
        border: 1px solid #4d4d4d;
        border-radius: 4px;
        cursor: pointer;
    }

        .tab-pane button:disabled[b-k8exp4188v] {
            opacity: 0.5;
            cursor: default;
        }

.search-input[b-k8exp4188v] {
    padding: 0.35rem 0.5rem;
    background: #1e1e1e;
    color: #e6e6e6;
    border: 1px solid #4d4d4d;
    border-radius: 4px;
}

.scope-checks[b-k8exp4188v] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
}

    .scope-checks label[b-k8exp4188v] {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

.result-table-wrap[b-k8exp4188v] {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid #3d3d3d;
    border-radius: 4px;
}

.result-table[b-k8exp4188v] {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

    .result-table th[b-k8exp4188v], .result-table td[b-k8exp4188v] {
        padding: 0.3rem 0.4rem;
        border-bottom: 1px solid #3d3d3d;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .result-table thead th[b-k8exp4188v] {
        position: sticky;
        top: 0;
        background: #2b2b2b;
    }

    .result-table tbody tr[b-k8exp4188v] {
        cursor: pointer;
    }

        .result-table tbody tr:hover[b-k8exp4188v] {
            background: #333;
        }

.empty-hint[b-k8exp4188v] {
    padding: 0.5rem;
    color: #888;
    font-size: 0.8rem;
    text-align: center;
}

/* ------------------------------------------------------------------------
 * Narrow/portrait phone layout, copied verbatim from the MAUI demo's
 * Home.razor.css (src/DWGViewer.Maui/Components/Pages/Home.razor.css) so the
 * public demo gets the same touch-friendly, non-scrolling toolbar/panel
 * behavior on narrow viewports. ~700px is comfortably below a typical
 * phone's landscape width but covers portrait on essentially every phone.
 *
 * Two structural changes:
 *   1. Toolbar controls become touch-friendly (min-height ~44px) and stack
 *      onto their own full-width rows instead of being squeezed into one
 *      cramped, horizontally-scrolling row.
 *   2. The side panel (Attributes/Search) stops permanently eating viewer
 *      width - it becomes a bottom-sheet overlay (position:absolute,
 *      max-height ~60vh, scrollable) that slides over the viewer instead of
 *      sharing space with it, toggled by the same collapse button. The
 *      viewer keeps the full viewport width/height behind it - #canvas's
 *      container (.viewer-area) is untouched by these rules, so the
 *      ResizeObserver-driven canvas sizing chain is unaffected.
 * ------------------------------------------------------------------------ */
@media (max-width: 700px) {
    .toolbar[b-k8exp4188v] {
        gap: 0.4rem;
        padding: 0.5rem;
    }

        .toolbar > button[b-k8exp4188v] {
            flex: 1 1 auto;
            min-height: 44px;
        }

    .file-open-group[b-k8exp4188v],
    .sample-select[b-k8exp4188v],
    .url-input[b-k8exp4188v],
    .layout-select[b-k8exp4188v] {
        flex: 1 1 100%;
        max-width: none;
        min-height: 44px;
        box-sizing: border-box;
    }

    .file-input[b-k8exp4188v]::file-selector-button {
        min-height: 44px;
    }

    .mode-toggle[b-k8exp4188v] {
        flex: 1 1 100%;
    }

        .mode-toggle button[b-k8exp4188v] {
            flex: 1 1 auto;
            min-height: 44px;
        }

    .status-text[b-k8exp4188v] {
        margin-left: 0;
        flex: 1 1 100%;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .entity-toast[b-k8exp4188v] {
        max-width: calc(100% - 1.5rem);
        box-sizing: border-box;
    }

    .body[b-k8exp4188v] {
        position: relative; /* anchor for the side-panel overlay below */
    }

    /* .viewer-area keeps flex: 1 1 auto (unchanged) and therefore the full
       width/height of .body - the side panel no longer reserves a flex-basis
       column, it overlays on top instead. */

    .side-panel[b-k8exp4188v] {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 20;
        flex: 0 0 auto;
        flex-direction: column;
        width: 100%;
        max-height: 60vh;
        border-left: none;
        border-top: 1px solid #3d3d3d;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
    }

        .side-panel.collapsed[b-k8exp4188v] {
            max-height: 2.5rem;
        }

    .panel-toggle[b-k8exp4188v] {
        flex: 0 0 2.5rem;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #3d3d3d;
    }

    .panel-content[b-k8exp4188v] {
        max-height: calc(60vh - 2.5rem);
        overflow-y: auto;
    }
}
