/* Shared portal headings and record toolbars. Keep the centre slot independent
   of tab label length; below 1440px the search gets its own centred row. */
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content { scrollbar-gutter: stable; scrollbar-width: thin !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content::-webkit-scrollbar { display: block !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .nk-block-head:has(.page-title) {
    min-height: 0; margin: 0 !important; padding: 0 0 24px !important;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-block-head:has(.page-title) + .nk-block { margin-top: 0 !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-block-head .page-title {
    font-size: var(--portal-title-size) !important; line-height: 1.25 !important; margin: 0 !important;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-block-head .cx-page-title-stack .nk-block-desc { margin: 4px 0 0 !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-block-head .cx-page-title-stack .nk-block-desc p {
    font-size: 13px !important; line-height: 20px !important; margin: 0 !important;
}
/* The Events count belongs alongside its heading, not in a third title row. */
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-title-layout {
    display: flex; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-title-block { width: 100%; max-width: none; min-width: 0; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-head-row:not(:has(.cx-table-search-block)):not(:has(.nk-block-tools > *)) { display: block !important; min-height: 0; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-record-count { flex: none; margin: 0 !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-record-count p { margin: 0; font-size: 12px !important; line-height: 20px !important; white-space: nowrap; }

.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar {
    display: grid; grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: 44px 44px; align-items: center; gap: 8px 16px;
    box-sizing: border-box; min-width: 0; min-height: 121px;
    margin: 0; padding: 12px 16px; background: var(--portal-surface);
    border-bottom: 1px solid var(--portal-border);
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-events-toolbar__actions { display: contents; }
/* A bar with only a search (Invoices) is one row: no empty tab row above the search. */
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(:has(:is(nav,.cx-fin-tabs,.cx-events-toolbar__create))) {
    grid-template-rows: 44px; min-height: 69px;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(:has(:is(nav,.cx-fin-tabs,.cx-events-toolbar__create))) .cx-fin-search { grid-row: 1; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar > :is(nav,.cx-fin-tabs) {
    grid-column: 1; grid-row: 1; min-width: 0; max-width: 100%; width: auto;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs {
    display: flex; flex-wrap: nowrap; align-items: stretch; gap: 16px;
    height: 44px; min-height: 44px; margin: 0 !important; padding: 0 !important;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; border: 0;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs::-webkit-scrollbar { display: none; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs .nav-item { flex: 0 0 auto; margin: 0 !important; padding: 0 !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs .nav-link {
    display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px;
    box-sizing: border-box; height: 44px !important; min-height: 44px !important;
    margin: 0 !important; padding: 12px 0 !important; border: 0;
    font: 700 13px/20px 'Satoshi Variable','Satoshi',sans-serif !important;
    white-space: nowrap; text-transform: none; letter-spacing: normal;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs .nav-link > span { display: inline !important; font: inherit !important; margin: 0 !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs .nav-link > .icon { display: inline-block !important; font-size: 18px !important; width: 18px; height: 18px; margin: 0 !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs .nav-link::after { bottom: 0; height: 3px !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar .cx-fin-search {
    grid-column: 1 / -1; grid-row: 2; justify-self: center;
    width: min(320px,100%); min-width: 0; max-width: 100%; height: 44px;
    margin: 0 !important;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-search input {
    box-sizing: border-box; height: 44px; min-height: 44px; width: 100%;
    border: 1px solid #474747; border-radius: 8px; background: var(--portal-surface-raised);
    padding: 10px 44px 10px 36px; font: 400 16px/22px 'Satoshi Variable','Satoshi',sans-serif;
    color: var(--portal-text); letter-spacing: normal;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-search > .icon { left: 12px; font-size: 16px; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-search-clear { top: 0; right: 0; width: 44px; height: 44px; padding: 0; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-events-toolbar__create { grid-column: 2; grid-row: 1; justify-self: end; height: 44px; min-height: 44px; margin: 0 !important; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-review-tabs {
    box-sizing: border-box; min-height: 69px; align-items: center; padding: 12px 16px; gap: 20px; background: var(--portal-surface);
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-review-tabs a { min-height: 44px; height: 44px; padding: 12px 0 !important; font-size: 13px !important; line-height: 20px !important; }
@media(max-width:575.98px) {
    /* Felix 2026-10-17 (U33): the button keeps its words on phones ("Create event", "New enquiry"),
       never a lone "+". The search box beside it takes the rest of the row. */
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-events-toolbar__create { width: auto; padding: 0 14px !important; justify-content: center; white-space: nowrap; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-block-head .cx-page-title-stack .nk-block-desc { min-height: 40px; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-title-layout { position: relative; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-title-main { min-width: 0; width: 100%; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-title-main .page-title { padding-right: 76px; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-table-record-count { position: absolute; right: 0; top: 0; padding-top: 2px; }
}
@media(min-width:768px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-search input { font-size: 13px; }
}
@media(min-width:992px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar,
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-review-tabs { padding-inline: 24px; }
}
@media(min-width:1440px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar {
        grid-template-columns: minmax(0,1fr) 240px minmax(0,1fr);
        grid-template-rows: 44px; column-gap: 16px; min-height: 69px;
    }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar .cx-fin-search { grid-column: 2; grid-row: 1; width: 240px; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-events-toolbar__create { grid-column: 3; }
}

@media(min-width:1600px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar { grid-template-columns: minmax(0,1fr) 320px minmax(0,1fr); }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar .cx-fin-search { width: 320px; }
}

.nk-body:is(.portal-booker,.portal-entertainer) [data-quote-search]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Tabs must read as controls before someone tries hovering. The same geometry
   is retained in selected, hover and keyboard states so the search never moves. */
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content :is(.cx-fin-tabs, .cx-review-tabs) { gap: 8px; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content :is(.cx-fin-tabs .nav-link, .cx-review-tabs a),
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs [role="tab"] {
    border: 1px solid #656565 !important; border-radius: 8px;
    background: var(--portal-section-surface, #303030); padding: 10px 12px !important;
    color: var(--portal-text) !important; cursor: pointer; text-decoration: none;
    min-height: 44px; box-sizing: border-box;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content :is(.cx-fin-tabs .nav-link, .cx-review-tabs a):hover,
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs [role="tab"]:hover {
    background: #3A3A3A; border-color: #A9A9A9 !important;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content :is(.cx-fin-tabs .nav-link, .cx-review-tabs a):is(.active, .is-active, [aria-selected="true"], [aria-current="page"]),
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs [role="tab"][aria-selected="true"] {
    background: #304034; border-color: #9DBCA2 !important; box-shadow: inset 0 -3px #9DBCA2;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content :is(.cx-fin-tabs .nav-link, .cx-review-tabs a)::after { display: none; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content :is(.cx-fin-tabs .nav-link, .cx-review-tabs a):focus-visible,
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs [role="tab"]:focus-visible {
    outline: 2px solid #C8E0CC; outline-offset: -4px;
}
@media (max-width: 575.98px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar {
        grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 64px 44px;
        column-gap: 8px; min-height: 141px;
    }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar > :is(nav,.cx-fin-tabs) { grid-column: 1 / -1; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs { height: 64px; gap: 4px; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs .nav-item { flex: 1 0 auto; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs .nav-link {
        display: flex; flex-direction: column; justify-content: center; gap: 4px;
        height: 64px !important; padding: 6px !important; width: 100%;
    }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar .cx-fin-search { grid-column: 1; width: 100%; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-events-toolbar__create { grid-column: 2; grid-row: 2; }
}
/* Listings uses a mobile heading variant; keep its title/count on the shared
   baseline, with the creation action beside them rather than an extra row. */
@media(max-width:575.98px) {
    .nk-body.nk-body.portal-entertainer .cx-listings-head-mobile { position: relative; min-height: 65.25px; }
    .nk-body.nk-body.portal-entertainer .cx-listings-head-mobile__row { padding-right: 60px; }
    .nk-body.nk-body.portal-entertainer .cx-listings-head-mobile__count { margin-top: -10.75px; font-size: 13px; line-height: 20px; }
    .nk-body.nk-body.portal-entertainer .cx-listings-head-mobile__cta { position: absolute; top: 0; right: 0; width: 44px; margin: 0; }
    .nk-body.nk-body.portal-entertainer .cx-listings-head-mobile__cta .btn { width: 44px !important; min-width: 44px; height: 44px; padding: 0 !important; }
    .nk-body.nk-body.portal-entertainer .cx-listings-head-mobile__cta .btn .icon { margin: 0 !important; font-size: 18px; }
    .nk-body.nk-body.portal-entertainer .cx-listings-head-mobile__cta .btn span { display: none; }
}
/* Four or more record tabs stay visible on phones, without a hidden last tab. */
@media (max-width: 575.98px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(.cx-settings-tabbar):has(.cx-fin-tabs > .nav-item:nth-child(4)) { grid-template-rows: auto 44px; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabs:not(.cx-settings-tabs):has(> .nav-item:nth-child(4)) {
        display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); height: auto; overflow: visible;
    }
}

/* Settings is navigation only: do not reserve the record toolbar's search and
   creation columns or its empty second row. Keep overflow inside the tab list. */
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar.cx-settings-tabbar {
    grid-template-columns: minmax(0,1fr); grid-template-rows: auto; min-height: 0;
}
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-settings-tabbar > .cx-settings-tabs {
    grid-column: 1 / -1; width: 100%;
}

/* Batch 1 (style guide v3 s.6): the search never covers the tabs. From 1440px the tab
   column is at least as wide as its tabs, so four tabs (Bookings) push the search right
   instead of sliding underneath it. Settings has no search and keeps its own layout. */
@media(min-width:1440px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(.cx-settings-tabbar):has(.cx-fin-search) {
        grid-template-columns: minmax(max-content,1fr) 240px minmax(0,1fr);
    }
}
@media(min-width:1600px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(.cx-settings-tabbar):has(.cx-fin-search) {
        grid-template-columns: minmax(max-content,1fr) 320px minmax(0,1fr);
    }
}

/* Phones: the search box spans the full width of the filter buttons above it.
   Only Events keeps a 44px slot beside it for its "+" create button. */
@media (max-width: 767.98px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(.cx-settings-tabbar) .cx-fin-search { justify-self: stretch; width: 100%; }
}
@media (max-width: 575.98px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(.cx-settings-tabbar):not(:has(.cx-events-toolbar__create)) .cx-fin-search { grid-column: 1 / -1; }
}
/* Tablet and small desktop: the search sits under the filter buttons, lined up with their left edge
   (not floating in the middle of its own row). From 1440px it moves up beside the tabs. */
@media (min-width: 768px) and (max-width: 1439.98px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .nk-content .cx-fin-tabbar:not(.cx-settings-tabbar) .cx-fin-search { justify-self: start; }
}

/* Felix 2026-10-17: the second row of tabs (ABN / Banking / Superannuation, and the My team tabs) had
   old spacing on top of the standard tab look: 20px extra after each tab, a line under the row and a
   second green line under the selected tab. They now space and look like every other tab set. */
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs { gap: 8px; flex-wrap: wrap; justify-content: flex-start; border-bottom: 0; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs [role="tab"] { margin: 0 !important; gap: 8px; font-size: 13px; letter-spacing: 0; }
.nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs [role="tab"]::after { display: none; }
/* Phones: the same shape as the main tabs above them (icon over the word, 64px tall, sharing the row). */
@media (max-width: 575.98px) {
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs { gap: 8px; }
    .nk-body.nk-body:is(.portal-booker,.portal-entertainer) .cx-financial-tabs [role="tab"] {
        flex: 1 1 auto; flex-direction: column; justify-content: center; gap: 4px;
        min-height: 64px; padding: 8px 6px !important; text-align: center;
    }
}
.cx-portal-module-title-row { display: flex; align-items: center; gap: .75rem; }
.cx-portal-module-title { margin-bottom: 0; }
