/* Bridge styles for the Laravel shell: pieces the prototype did not need
   (heading wrapper, action-row wrapping). Loaded after style.css. */

/* ---- Legacy wrappers kept inside the new content area ----
   Older pages target .smt-content (e.g. "padding: 0" for full-width queues). The wrapper stays so those
   selectors still match; the spacing itself now comes from .content, so it adds none of its own. */
.content > .smt-content { padding: 0; margin: 0; max-width: none; }
.content > .smt-content > .smt-page-card { max-width: none; }

/* Width the fixed sub-order footer (suborder.css) leaves for the sidebar, follows the collapsed rail */
:root { --admin-nav-width: var(--sidebar-w, 198px); }
body:has(.sidebar.collapsed) { --admin-nav-width: var(--sidebar-collapsed, 64px); }
@media (max-width: 760px) { :root, body:has(.sidebar.collapsed) { --admin-nav-width: 0px; } }

/* ---- Print: hide the new chrome like the old one was hidden ---- */
@media print {
    .sidebar, .sidebar-mobile-scrim, .mobile-rail-toggle, .page-top { display: none !important; }
    .main { margin-left: 0 !important; }
    .content { padding: 0 !important; }
}

/* Sub-menu links with a count (e.g. All Orders > Calling 1): label left, count right.
   The prototype only styled the count where its pool menu was injected by script. */
.nav-subitem { justify-content: space-between; gap: 8px; }
.nav-subcount { color: var(--sb-text-strong); font-size: 10.5px; font-weight: 600; }
.nav-subitem.active .nav-subcount { color: var(--sb-active-text); }

/* The prototype's .content clips with overflow:hidden, which stops position:sticky (settings save bar) from working.
   'clip' hides horizontal overflow the same way without creating a scroll container. */
.content { overflow-x: clip; overflow-y: visible; }

/* Sidebar brand: a logo when one is uploaded (small logo / initial on the collapsed rail), otherwise mark + name */
/* The logo uses the full width of the sidebar header, keeping its proportions; only very tall logos are capped in height */
.brand-logo { display: block; flex: 1 1 auto; width: 100%; min-width: 0; max-width: 100%; height: auto; max-height: 64px; object-fit: contain; object-position: left center; }
.brand-mark-mini { display: none; }
.sidebar.collapsed .brand-logo { display: none; }
.sidebar.collapsed .brand-mark-mini { display: grid; }

/* Sidebar search: legacy theme CSS styles every <input> (white box, 38px, border). Pin the prototype's look, so it also
   works on the dark and tinted sidebars (colours come from the --sb-* tokens that each sidebar style redefines). */
.sidebar .sidebar-search input[type="search"] {
    width: 100%; min-width: 0; height: auto; margin: 0; padding: 0;
    border: 0; border-radius: 0; outline: 0; box-shadow: none;
    background: transparent !important; color: var(--sb-text-strong) !important;
    font-size: 12px; line-height: 1.2;
    -webkit-appearance: none; appearance: none;
}
.sidebar .sidebar-search input[type="search"]::placeholder { color: var(--sb-search-text); opacity: 1; }
.sidebar .sidebar-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* With a logo the header does not need the room made for the small mark: logo sits near the top, button stays beside it */
/* Same top line as the page header (the content area uses the same variable), at any density */
.sidebar-head.has-logo { padding-top: var(--content-pad-y); }
.sidebar-head.has-logo .collapse-button { top: calc(var(--content-pad-y) + 8px); }
.sidebar.collapsed .sidebar-head.has-logo .collapse-button { top: 27px; }

/* Account menu items that have no feature yet */
.mini-menu-item.is-soon { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--n-400, #98a2b3); cursor: default; }
.mini-menu-item.is-soon:hover { background: transparent; }
.mini-menu-item.is-soon em { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .02em; padding: 1px 6px; border-radius: 999px; background: var(--n-100, #f2f4f7); color: var(--n-700, #475467); }

/* One gap between the page header and whatever the page starts with (KPI strip, tabs, hero, table...), the same on every page.
   The prototype set this per element; here the wrapper owns it and the first child's own top margin is ignored. */
.page-top + .smt-content { margin-top: 18px; }
.smt-page-content > :first-child { margin-top: 0 !important; }
