:root {
    --tports-yellow: #F1CE00;
    --tports-yellow-rgb: 241, 206, 0;
    --tpga-root-bg-light: #ffffff;
    --tpga-root-bg-dark: #101010;
}

html * {
    /* Catch-all for elements not covered by kendo class */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Ensure app fills all available space */
html {
    height: 100vh;
    background-color: var(--tpga-root-bg-light);
}

html body {
    height: 100vh;
    margin-top:0;
    margin-bottom:0;
    background-color: var(--tpga-root-bg-light);
}

main.main-box,
#allcontent,
.main-container,
.main-content {
    background-color: var(--tpga-root-bg-light);
}

html[data-theme-resolved="dark"],
html[data-theme="dark"] {
    background-color: var(--tpga-root-bg-dark);
}

html[data-theme-resolved="dark"] body,
html[data-theme="dark"] body,
html[data-theme-resolved="dark"] main.main-box,
html[data-theme="dark"] main.main-box,
html[data-theme-resolved="dark"] #allcontent,
html[data-theme="dark"] #allcontent,
html[data-theme-resolved="dark"] .main-container,
html[data-theme="dark"] .main-container,
html[data-theme-resolved="dark"] .main-content,
html[data-theme="dark"] .main-content {
    background-color: var(--tpga-root-bg-dark);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="device"],
    html[data-theme="device"] body,
    html[data-theme="device"] main.main-box,
    html[data-theme="device"] #allcontent,
    html[data-theme="device"] .main-container,
    html[data-theme="device"] .main-content {
        background-color: var(--tpga-root-bg-dark);
    }
}

/*Force input font size to prevent iphone auto zoom*/
html input, html textarea {
    font-size: max(16px, 1em) !important;
}

/* App consists of header/content/footer within the main box. Establish fixed positioning and heights where required */
.main-box {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-box .row.header {
    flex: 0 1 auto;
}

.main-box .main-content {
    flex: 1 1 auto;
    overflow-y:scroll;
    overflow-x:hidden;
}

.main-box .main-header {
    z-index:50;
    height:auto;
    flex-shrink: 0;
}

#allcontent {
    flex: 1 1 auto;
    overflow: auto;
}

.main-box .main-footer {
    margin-bottom:30px;
    min-height:48px;
    z-index:50;
    overflow:visible;
    flex-shrink: 0;
}

/* Bound every dialog, including those created directly by pages, to the viewport.
   Only the content scrolls; titles and actions remain available at any size. */
html .k-dialog-wrapper {
    box-sizing: border-box;
    top: 0 !important;
    left: 0 !important;
    padding: 16px;
    height: 100vh;
    height: 100dvh;
}

html .k-window {
    box-sizing: border-box;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 32px) !important;
    max-height: calc(100dvh - 32px) !important;
}

html .k-dialog-wrapper .k-dialog {
    flex-shrink: 1;
}

html .k-window > .k-window-content,
html .k-dialog > .k-dialog-content {
    min-width: 0;
    min-height: 0;
    overflow: auto !important;
    overscroll-behavior: contain;
}

html .k-window > .k-window-titlebar,
html .k-dialog > .k-dialog-actions {
    flex-shrink: 0;
}


.main-container {
    display: contents;
    position:relative;
    width:100%;
}

.k-tabstrip:not(.not-centered) ul.k-reset {
    justify-content:center;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 450px;
}

.k-loading-panel {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 40;
}

.k-loading-panel-mask {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
}

.k-loading-panel-wrapper {
    position: relative;
    z-index: 2;
}

.k-loading-panel-text {
    margin-top: 20px;
    text-align: center;
}

/* Removed issue of selection borders on ios */
.k-tabstrip-top > div:focus {
    outline: none !important;
}

/* Removed issue with stepper line overlapping icons */
#stepper .k-step {
    z-index: 1;
}

#stepper div[data-role="progressbar"] {
    z-index: 0;
}

/* Match filter bubbles to the application's selected state in both themes. */
.filterDropdown.k-selected {
    background-color: var(--tports-yellow);
    border-color: var(--tports-yellow);
    color: #111;
}

html[data-theme-resolved="dark"] .k-menu-group[id^="filter"] {
    background-color: #1b1b1b;
    color: #fff;
}

html[data-theme-resolved="light"] .k-menu-group[id^="filter"] {
    background-color: #fff;
    color: #111;
}

.k-menu-group[id^="filter"] .k-menu-link-text {
    color: inherit;
}

html[data-theme-resolved] .k-menu-group[id^="filter"] .k-menu-item > .k-menu-link.k-selected {
    background-color: var(--tports-yellow);
    color: #111;
}

/* Panel Bar styling for templated "table" replacements */
.transactionBriefDetail {
    display: grid;
    column-gap: 0;
    row-gap: 2px;
    width:100%;
}

.transactionBriefDetail span:not(.k-switch, .k-switch-track, .k-switch-thumb-wrap, .k-switch-label-on, .k-switch-label-off, .k-switch-thumb) {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    padding-right: 10px;
    font-size: small;
}

.k-level-1 > span {
    padding-top: 0;
    padding-bottom: 0;
}

.k-level-1 h3 {
    margin: 0;
}

.k-level-1 .k-link {
    pointer-events: none;
    justify-content: space-evenly;
    padding: 0 !important;
    margin: 2% 0 2% 0;
}

.k-card div {
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: center;
}

/* Allow filter buttons to be scrollable in x without showing a scrollbar */
.filterDropdownDiv {
    white-space: nowrap;
    overflow-x: scroll;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 5px;
}

.filterDropdownDiv::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

li.k-panelbar-item.k-panelbar-header.k-level-0.k-highlight.k-active.k-expanded {
    border: 1px solid;
    border-color: var(--tports-yellow);
    border-radius:15px;
}

li.k-panelbar-header.k-level-0 .k-link {
    border-radius: 15px;
}

.k-switch-thumb.k-rounded-full::before {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    bottom: -3px;
    left: -3px;
    border: 3px ridge var(--tports-yellow);
    border-radius: 50%;
}


.collapse-and-hide {
    height: 0;
    visibility:hidden;
}
.k-bottom-nav-item{
    padding: 0 !important;
    min-width: 1px !important;
}

.k-card-header .k-card-title {
    font-weight:bold;
}

@media (max-width: 330px) {
    .k-bottom-nav-item {
        font-size: 10px !important;
    }
}

@media (max-width: 215px) {
    .k-bottom-nav-item .k-bottom-nav-item-text {
        display:none;
    }
}

.creationWizardStep h2 {
    margin:0;
}


.k-list-item-text {
    display: inline-flex;
}

.k-table-th {
    background-color: rgba(255,255,255,0.02);
}

.k-table-td {
    padding: 0 !important;
    text-align: center !important;
    justify-content: center !important;
}

#login-card-number > span.k-svg-icon > svg {
    fill: none;
}

.create-btn {
    flex:none !important;
}


.create-btn-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .8em;
    border: 1px solid var(--tports-yellow);
    border-radius: 50%;
    position: fixed;
    box-shadow: inset 0 0 0 2px var(--tports-yellow);
}

.create-btn-div {
    /*background: radial-gradient(circle, inherit 20%, var(--tports-yellow) 100%);*/ /* Gradient from dark gray to black */
    background-image: radial-gradient(circle, rgba(0,0,0,0) 20%, var(--tports-yellow) 100%);
}

.delivery-input-collection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}

#delivery-create-dialog input {
    text-align: center;
    width: 100%;
}

#delivery-create-dialog div label {
    padding-bottom: 0.1em;
}

#delivery-create-dialog div label:not(:first-of-type) {
    padding-top: 1em;
}

#delivery-create-dialog .k-tabstrip-items .k-link {
    font-size: x-large;
    font-weight: bold;
    padding-left: 8px;
    padding-right: 8px;
}

@media (max-width: 500px) {
    #tpga-create-chooser-dialog {
        width: 70vw !important;
        max-width: calc(100vw - 32px) !important;
    }

    #delivery-create-dialog .k-tabstrip-items .k-link {
        padding-left: 3px;
        padding-right: 3px;
    }
}

@media (max-width: 440px) {
    #delivery-create-dialog .k-tabstrip-items .k-link {
        font-size: large;
        padding-left: 2px;
        padding-right: 2px;
    }
}

@media (max-width: 330px) {
    #delivery-create-dialog .k-tabstrip-items .k-link {
        font-size: small;
        font-weight: normal;
        padding-left: 2px;
        padding-right: 2px;
    }
}

.k-tabstrip-item .k-link.section-invalid span.k-i-error {
    display:block !important;
}

#sideMenu li:not(:hover):not(.k-selected) {
    color:unset !important;
}
#sideMenu li:not(:hover):not(.k-selected) .k-menu-link-text {
    color: unset !important;
}

#sideMenu li:hover {
    background: rgba(128,128,128,0.4);
}

#delivery-form .k-tabstrip .k-tabstrip-content .k-form-error {
    display: none;
}


.side-menu-label {
    display: flex;
    align-items: center;
}

#summary-tile-container .k-card {
    background: rgba(255, 255, 255, .1);
}

#summary-tile-container .k-card span:nth-of-type(2n+1):not(:first-of-type) {
    padding-top:15px
}

.k-grid thead * {
    text-align: center;
    white-space: normal;
}

.k-grid th {
    vertical-align:middle !important;
}

.tpga-lg-input::placeholder {
    font-size: small;
    opacity: 75% !important;
    font-style: italic;
}

.tpga-lg-input {
    padding: 4% 0;
    width: 100%;
    box-shadow: none;
    border: 1px solid;
    border-radius: 5px;
    outline: 0;
    background-color: inherit;
    text-align: center;
    color: inherit;
}

.tpga-lg-input:focus {
    background-color: rgba(128, 128, 128, 0.1);
}

.tpga-lg-button-padding {
    max-width: 75% !important;
    width: 75%;
    padding: 3% 0;
}

.tpga-wide-bordered-div {
    box-shadow: none;
    border: 1px solid;
    border-radius: 5px;
    outline: 0;
    background-color: inherit;
    text-align: center;
    color: inherit;
    padding: 3%;
    justify-self:center;
}

.tpga-row-item {
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content: space-evenly;
    gap:5%;
    padding-top:3%;
}

.tpga-row-item > * {
    width:auto;
}

.tpga-stripped-anchor {
    text-decoration: none;
    color: inherit;
    display: block;
    font-size: small;
    text-align: center;
}

.tpga-user-information {
    display: block;
    font-size: 0.95em;
    text-align: center;
    padding: 2vh 0;
}

.tpga-privacy-information {
    display: block;
    font-size: 0.8em;
    text-align: center;
    padding: 2vh 0;
}

.tpga-validated-input {
    flex-direction: column !important;
    align-items: center !important;
}

.header-user-info {
    background-color: rgba(128, 128, 128, 0.1);
    border-radius: 5px;
    padding: 5px 0;
    margin: 5px 0;
    position: relative;
    overflow: hidden;
}

.tpga-context-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    border: 1px solid rgba(var(--tports-yellow-rgb), 0.55);
    font: inherit;
    line-height: 1.4;
    text-align: center;
}

.tpga-context-banner-action {
    cursor: pointer;
    transition: background-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
}

.tpga-context-banner-action:hover,
.tpga-context-banner-action:focus-visible {
    background-color: rgba(var(--tports-yellow-rgb), 0.16);
    box-shadow: inset 0 0 0 1px var(--tports-yellow);
    outline: none;
}

.tpga-context-banner-warning {
    border-style: dashed;
}

.tpga-location-reference {
    white-space: nowrap;
}

.tpga-location-reference .k-icon {
    margin-inline-end: 0.15rem;
}

.disabled-not-really {
    outline: none;
    cursor: default;
    opacity: .6;
    filter: grayscale(0.1);
    box-shadow: none;
}

.info-overlay {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background: linear-gradient(135deg, hsla(48, 100%, 4%, 0), hsla(48, 80%, 8%, 1), hsla(48, 100%, 4%, 0));
}

.info-overlay.show {
    opacity: 1;
}

.info-overlay-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.info-overlay-target-hidden {
    visibility: hidden;
}

.account-status-header-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0.15rem 0.65rem;
    border-radius: 4px;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #4f3e00;
    background: linear-gradient(90deg, rgba(241, 206, 0, 0), rgba(241, 206, 0, 0.28), rgba(241, 206, 0, 0));
}

.account-status-header-overlay-text {
    display: inline-block;
}

html[data-theme-resolved="dark"] .account-status-header-overlay,
html[data-theme="dark"] .account-status-header-overlay {
    color: #ffd400;
    background: linear-gradient(90deg, rgba(241, 206, 0, 0), rgba(241, 206, 0, 0.2), rgba(241, 206, 0, 0));
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85);
}

.pulsing-text {
    font-weight: bold;
    color: hsla(50, 100%, 60%, 100%);
    animation: pulseGlow 3s 750ms linear infinite;
}

@keyframes pulseGlow {
    0% {
        color: hsl(50, 100%, 80%);
        text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.2), 0 0 0.125em hsla(320, 100%, 60%, 0.3), -1em -0.125em 0.5em hsla(40, 100%, 60%, 0), 1em 0.125em 0.5em hsla(200, 100%, 60%, 0);
    }

    30% {
        color: hsl(50, 100%, 90%);
        text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.5), 0 0 0.125em hsla(320, 100%, 60%, 0.5), -0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2), 0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4);
    }

    40% {
        color: hsl(50, 100%, 95%);
        text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.5), 0 0 0.125em hsla(320, 100%, 90%, 0.5), -0.25em -0.125em 0.125em hsla(40, 100%, 60%, 0.2), 0.25em 0.125em 0.125em hsla(200, 100%, 60%, 0.4);
    }

    70% {
        color: hsl(50, 100%, 90%);
        text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.5), 0 0 0.125em hsla(320, 100%, 60%, 0.5), 0.5em -0.125em 0.25em hsla(40, 100%, 60%, 0.2), -0.5em 0.125em 0.25em hsla(200, 100%, 60%, 0.4);
    }

    100% {
        color: hsl(50, 100%, 80%);
        text-shadow: 0 0 1em hsla(320, 100%, 50%, 0.2), 0 0 0.125em hsla(320, 100%, 60%, 0.3), 1em -0.125em 0.5em hsla(40, 100%, 60%, 0), -1em 0.125em 0.5em hsla(200, 100%, 60%, 0);
    }
}

.tpga-banded-rows > *:nth-child(2n - 1){
    background-color: rgba(128,128,128,0.1);
}

@media (hover: hover) and (pointer: fine) {
    .tpga-banded-rows > div:hover {
        filter: drop-shadow(8px 8px 10px black) invert(0.25);
    }
}

/* PBI-1008 batch 1: shared authenticated-route parity baseline */
.warehouse-page,
.transactions-page,
.transfer-create-page,
.payees-page,
.tpga-site-manager {
    background: transparent !important;
    color: inherit !important;
    min-height: auto !important;
    padding: 0.6rem 0.35rem 1.1rem !important;
}

.warehouse-shell,
.transactions-shell,
.transfer-create-shell,
.payees-shell,
.tpga-site-manager {
    margin: 0 auto !important;
    max-width: 100% !important;
}

.warehouse-context,
.warehouse-panel,
.transactions-tab-panel,
.transactions-summary-list,
.transactions-detail-card,
.transfer-header,
.transfer-section,
.transfer-result,
.payees-list-shell,
.payee-row,
.payees-dialog,
.tpga-site-manager__panel,
.tpga-site-manager__site {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(128, 128, 128, 0.45) !important;
    border-radius: 0.25rem !important;
    box-shadow: none !important;
}

.warehouse-title,
.transactions-page h1,
.transfer-title,
.payees-heading,
.tpga-site-manager h1 {
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    margin-bottom: 0.45rem !important;
}

.warehouse-page h2,
.transactions-page h2,
.transfer-create-page h2,
.payees-page h2,
.tpga-site-manager h2 {
    font-size: 1.08rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.45rem !important;
}

.warehouse-action,
.warehouse-filter-button,
.warehouse-filter-link,
.transactions-filter-button,
.transactions-tab-button,
.transfer-link,
.transfer-button,
.payees-button,
.payees-button-secondary,
.tpga-site-manager .btn {
    border-radius: 0.25rem !important;
    font-size: 0.95rem !important;
    min-height: 2.2rem !important;
    padding: 0.4rem 0.7rem !important;
}

.warehouse-filter-select,
.transactions-filter-select,
.transfer-create-page input,
.transfer-create-page select,
.transfer-create-page textarea,
.payees-dialog input,
.tpga-site-manager input,
.tpga-site-manager textarea,
.tpga-site-manager select {
    border-radius: 0.2rem !important;
    min-height: 2.1rem !important;
    padding: 0.35rem 0.55rem !important;
}

.warehouse-context-pill,
.transactions-metadata span,
.transfer-meta span {
    border: 1px solid rgba(128, 128, 128, 0.45) !important;
    border-radius: 0.2rem !important;
    padding: 0.35rem 0.55rem !important;
}

.warehouse-table th,
.warehouse-table td,
.transactions-table th,
.transactions-table td,
.transfer-stock-table th,
.transfer-stock-table td {
    font-size: 0.84rem !important;
    padding: 0.36rem 0.5rem !important;
}

.warehouse-table th,
.transactions-table th,
.transfer-stock-table th {
    text-transform: none !important;
}

.warehouse-filter-form,
.transactions-filter-form,
.transfer-form-grid,
.transfer-recipient-grid,
.transactions-summary-row,
.transactions-grade-row,
.transfer-summary-grid {
    gap: 0.45rem !important;
}

.warehouse-tabs,
.transactions-tab-nav {
    gap: 0.18rem !important;
}

.warehouse-tab-link {
    border-radius: 0.25rem 0.25rem 0 0 !important;
    padding: 0.45rem 0.75rem !important;
}

@media (max-width: 900px) {
    .warehouse-page,
    .transactions-page,
    .transfer-create-page,
    .payees-page,
    .tpga-site-manager {
        padding: 0.45rem 0.2rem 5.2rem !important;
    }

    .warehouse-title,
    .transactions-page h1,
    .transfer-title,
    .payees-heading,
    .tpga-site-manager h1 {
        font-size: 1.35rem !important;
    }
}

.tpga-primary-gradient {
    background: linear-gradient(to bottom, var(--tports-yellow), #917c09) !important;
}

.k-column-menu .k-menu-link-text {
    color: inherit;
}

.k-tabstrip-content:has(.k-loading-panel) {
    min-height:150px;
}

.k-filter-menu.k-popup .k-filter-menu-container .k-actions button[type="submit"] span {
    display:none;
}

.k-filter-menu.k-popup .k-filter-menu-container .k-actions button[type="submit"]::after {
    content: 'OK';
    text-indent: 0;
    display: block !important;
    line-height: initial;
    position: relative;
    opacity: inherit;
}

.k-bottom-nav-item.k-selected {
    color: var(--tports-yellow);
}

#userInfoDiv {
    margin: auto;
}

.k-checkbox:not(.k-invalid) {
    outline: 1px solid white;
}

.tpga-adminonly-hidden {
    display: none;
}

