/*
 * TechPortal compact UI
 * v0.6.3-ui90
 *
 * Target: approximately 90% of previous UI dimensions.
 *
 * Do not scale the document with zoom/transform:
 * ProseMirror/table coordinates must remain native.
 */

/* ---------------------------------------------------------
   Global typography
   16px -> 14.4px
   --------------------------------------------------------- */

html {
    font-size: 90%;
}

/*
 * Some legacy TechPortal rules use absolute px font sizes.
 * Normalize the most visible UI components.
 */

body {
    font-size: 1rem;
}


/* ---------------------------------------------------------
   Bootstrap controls
   --------------------------------------------------------- */

.btn {
    --bs-btn-padding-y: .34rem;
    --bs-btn-padding-x: .68rem;
    --bs-btn-font-size: .925rem;
    --bs-btn-border-radius: .34rem;
}

.btn-sm {
    --bs-btn-padding-y: .225rem;
    --bs-btn-padding-x: .45rem;
    --bs-btn-font-size: .84rem;
    --bs-btn-border-radius: .28rem;
}

.form-control,
.form-select {
    min-height: 2.4rem;
    padding-top: .34rem;
    padding-bottom: .34rem;
    font-size: .925rem;
}

.form-control-sm,
.form-select-sm {
    min-height: 2.1rem;
    padding-top: .225rem;
    padding-bottom: .225rem;
    font-size: .86rem;
}

.input-group-text {
    padding-top: .34rem;
    padding-bottom: .34rem;
    font-size: .925rem;
}

.dropdown-menu {
    font-size: .925rem;
}

.dropdown-item {
    padding: .34rem .84rem;
}


/* ---------------------------------------------------------
   Main navigation
   --------------------------------------------------------- */

.tp-main-navbar {
    min-height: 2.9rem !important;
}

.tp-main-navbar .navbar-brand,
.tp-main-navbar .nav-link {
    font-size: .925rem;
}

.tp-main-navbar .nav-link {
    padding-top: .40rem;
    padding-bottom: .40rem;
}

.tp-main-navbar .btn {
    min-height: 2.1rem;
}


/* ---------------------------------------------------------
   Breadcrumbs / page actions
   --------------------------------------------------------- */

.breadcrumb {
    margin-bottom: .7rem;
    font-size: .88rem;
}

.tp-breadcrumb-actions .btn {
    min-height: 1.9rem !important;
    padding: .225rem .62rem !important;
    font-size: .80rem !important;
    line-height: 1.3 !important;
}


/* ---------------------------------------------------------
   Generic tables
   --------------------------------------------------------- */

.table {
    font-size: .925rem;
}

.table > :not(caption) > * > * {
    padding: .45rem .62rem;
}


/* ---------------------------------------------------------
   Article tables
   Keep geometry/colgroup widths untouched.
   --------------------------------------------------------- */

.article-content th,
.article-content td {
    padding: .45rem .68rem;
}

.article-content {
    font-size: 1rem;
}


/* ---------------------------------------------------------
   Admin editor
   --------------------------------------------------------- */

.techportal-editor-toolbar {
    min-height: 42px !important;
    padding: 6px 7px !important;
    gap: 3px;
}

.techportal-editor-toolbar .btn {
    min-height: 28px;
    padding: 3px 7px;
    font-size: .78rem;
    line-height: 1.3;
}

.techportal-editor-toolbar .tp-toolbar-label {
    font-size: .78rem;
}

.techportal-editor-toolbar .dropdown-menu {
    font-size: .86rem;
}

.techportal-editor-toolbar .dropdown-item {
    padding: .36rem .58rem;
}

.techportal-editor-toolbar .tp-admonition-menu,
.techportal-editor-toolbar .tp-table-menu,
.techportal-editor-toolbar .tp-table-actions-menu {
    font-size: .86rem;
}


/* ---------------------------------------------------------
   Editor header/actions
   --------------------------------------------------------- */

.tp-editor-header-actions .btn {
    min-height: 2.1rem;
    padding: .225rem .56rem;
    font-size: .86rem;
}

.editor-mode-switch .btn {
    padding: .225rem .56rem;
    font-size: .86rem;
}


/* ---------------------------------------------------------
   Visual editor content
   Do not transform/zoom ProseMirror.
   --------------------------------------------------------- */

.techportal-tiptap {
    font-size: 1rem;
}

.techportal-tiptap th,
.techportal-tiptap td {
    padding: .45rem .68rem;
}


/* ---------------------------------------------------------
   Cards / list groups / admin tables
   --------------------------------------------------------- */

.card-header,
.card-footer {
    padding: .68rem .90rem;
}

.card-body {
    padding: .90rem;
}

.list-group-item {
    padding: .62rem .90rem;
}


/* ---------------------------------------------------------
   Modal
   --------------------------------------------------------- */

.modal-header,
.modal-footer {
    padding: .72rem .90rem;
}

.modal-body {
    padding: .90rem;
}


/* ---------------------------------------------------------
   Keep interaction geometry usable.
   Intentionally NOT scaled:
     - ProseMirror resize handles
     - selectedCell overlays
     - scrollbar widths
     - borders
   --------------------------------------------------------- */
