
pos-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    grid-area: header;
}

pos-header #pos-search{
    width: 24.5rem;
}

pos-header header-title{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
}

pos-header header-title svg {
    font-size: 2.5em;
}

pos-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 90vh;
}
pos-body section{
    display: flex;
    flex-direction: column;
}
/*pos-body #products-and-categories {*/
/*    flex: 1;*/
/*}*/
pos-body #category-selection {
    display: flex;
    flex-direction: row;
    padding: 0 0.5rem;
    gap: 3rem;
    overflow-y: hidden;
    overflow-x: auto;
    align-items: center;
    grid-area: categories;
}

pos-body #product-selection {
    max-height: 100%;
    grid-area: products;
    overflow: hidden;
    box-shadow: var(--soft-container-inner-shadow);
    background-color: var(--deep-background-color);
    padding: 1.5rem;
    border-radius: 1rem;
    flex: 1;
}
pos-body #product-selection sl-tab-panel tab-header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

pos-body #product-selection sl-tab-panel {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}
pos-body #product-selection sl-tab-panel::part(base) {
    box-shadow: var(--container-inner-shadow);
    border-radius: 1rem;
    background-color: var(--deep-background-color);
}
products-container  {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    grid-template-rows: repeat(3, 1fr);
    /* implicit tracks: any rows beyond those three also get 1fr */
    grid-auto-rows: 1fr;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
}
pos-body sl-tab-group::part(base), pos-body sl-tab-group{
    height: 100%;
    max-height: 100%;
}

pos-body sl-tab-group::part(tabs) {
    border-bottom: none;
    background-color: var(--background-white);
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    padding: 1rem 1.25rem;
    /*border: var(--glass-container-border);*/
}

pos-body sl-tab::part(base){
    border-radius: 1rem;
    transition: background-color 0.5s;
}
pos-body sl-tab[active]::part(base){
    background-color: var(--glass-background);
    box-shadow: var(--soft-glass-container-shadow);
    border: var(--glass-container-border);
}

pos-body sl-tab-group::part(active-tab-indicator) {
    display: none;
}

pos-body sl-tab::part(base) {
    font-family: var(--global-font-family), serif;
    font-size: var(--font-size-normal);
    color: var(--global-font-color);
    margin-right: 1rem;
}

receipt-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--blue-gray);
    box-shadow: var(--soft-continer-outer-shadow);
    border-radius: 3rem;
}

receipt-header form-field{
    width: 50%;
}

receipt-header span {
    font-size: var(--font-size-small);
    color: var(--gray);
}

receipt-header dropdown-search::part(input-base) { 
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    align-items: center;
}
receipt-header dropdown-search::part(input-prefix) {
    background: transparent !important;
}
receipt-header dropdown-search::part(component) {
    margin-left: 1rem;
}
receipt-header dropdown-search::part(dropdown) {
    margin-top: 0.75rem;
}

receipt-body {
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    margin: 0.5rem 0;
    justify-content: space-between;
    height: 100%;
    min-height: 50%;
    background: var(--blue-gray);
    box-shadow: var(--soft-continer-outer-shadow);
}

receipt-body items-container {
    display: flex;
    height: 100%;
    overflow-y: auto;
    flex-direction: column;
    max-height: 100%;
}
    items-container:first-child {
        border-top-right-radius: 1rem;
        border-top-left-radius: 1rem;
    }

receipt-body items-container empty-receipt-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    flex: 1;
}
empty-receipt-placeholder h3 {
    margin-bottom: 3rem;
}

.net-weight-progress {
    --size: 3rem;
    --track-width: 3px;
    --indicator-color: var(--success-green);
    --track-color: var(--border-color);
}
.net-weight-progress::part(label) {
    font-size: var(--font-size-normal);
    color: var(--gray);
}

pos-body display-conditionally[display="true"] {
    display: flex;
}

pos-body display-conditionally {
    display: none;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

pos-body display-conditionally name-and-id{
    display: flex;
    flex-direction: column;
    margin-left: 1rem;
}

pos-body display-conditionally user-name {
    font-size: var(--font-size-medium);
    font-weight: 600;
    color: var(--global-font-color);
}

pos-body display-conditionally id-card {
    font-size: var(--font-size-small);
    color: var(--gray);
}


receipt-body receipt-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    background-color: var(--background-white);
    box-shadow: var(--soft-glass-container-shadow);
    border-radius: 0 0 1rem 1rem;
}

/* Add a before tag to make the glass background; this is done because the 
sticky position combined with the var(--glass-background) makes the items behind
the totals see-through */
 
receipt-body receipt-totals:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--blue-gray);
    z-index: -1;
    border-radius: 0 0 1rem 1rem;
}

receipt-body receipt-totals div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

receipt-body receipt-totals div span{
    font-size: var(--font-size-medium);
    color: var(--gray);
}

receipt-body receipt-totals div.total span{
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--global-font-color);
}

receipt-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: var(--blue-gray);
    box-shadow: var(--soft-continer-outer-shadow);
    border-radius: 1rem;
}

receipt-footer sl-radio-group.member-payment-method-buttons[separated-buttons] sl-radio-button::part(button) {
    width: 100%;
}
receipt-footer sl-radio-group.member-payment-method-buttons[separated-buttons]::part(button-group__base) {
    justify-content: space-between;
}

pos-main {
    height: 100%; 
    max-height: calc(100vh - var(--window-header-height) - 1rem);
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 1rem;
    flex: 1;
}

#products-and-categories {
    max-height: calc(100vh - var(--window-header-height) - 1rem);
}

#receipt {
    max-height: calc(100vh - var(--window-header-height) - 1rem);
    margin-right: 0.5rem;
}

@media screen and (max-width: 1200px) {
    pos-main {
        grid-template-columns: 60% 40%;
    }
}

.no-buzz-yet-placeholder {
    display: flex;
    background-image: url("/assets/no-buzz-yet.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-width: 12rem;
    aspect-ratio: 1;
    margin-top: auto;
    margin-bottom: auto;
    height: 16rem;
    filter: var(--img-icon-shadow);
}