@import '/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';

body {
    height: 100%;
    overflow: hidden;
}

.siteheader {
    background-color: var(--neutral-layer-4) !important;
    border-bottom: calc(var(--stroke-width) * 2px) solid var(--accent-fill-rest);
    margin-bottom: 0 !important;
}

    .siteheader .logo {
        grid-column: 1;
    }

    .siteheader .links {
        padding-right: 10px;
        display: flex;
        align-items: center;
    }

    .siteheader .notifications {
        padding-right: 6px;
        display: flex;
        align-items: center;
    }

    .siteheader .settings {
        padding-right: 6px;
        display: flex;
        align-items: center;
    }

    .siteheader .settings {
        padding-right: 10px;
        display: flex;
        align-items: center;
    }

[dir="rtl"] .siteheader .settings {
    padding: 0 0 0 6px;
}

[dir="rtl"] .siteheader .links {
    padding-left: 10px;
}

.body-stack {
    flex-direction: row;
}

.footer {
    display: flex !important;
    flex-direction: row !important;
    background: var(--neutral-layer-4);
    color: var(--neutral-foreground-rest) !important;
    padding: 10px 10px;
    margin-top: 0px !important;
}

    .footer .version a {
        color: var(--neutral-foreground-rest);
        text-decoration: none;
    }

        .footer .version a:focus {
            outline: 1px dashed;
            outline-offset: 3px;
        }

        .footer .version a:hover {
            text-decoration: underline;
        }

nav.sitenav {
    background-color: var(--neutral-layer-2);
    padding: 1.5rem 1rem;
    height: calc(100dvh - 90px);
    width: 14rem;
    overflow-y: auto;
}

nav h2 {
    font-size: var(--type-ramp-plus-1-font-size);
    line-height: var(--type-ramp-plus-1-line-height);
    padding: 15px 0;
    margin: 0;
    pointer-events: none;
}

nav h3 {
    font-size: var(--type-ramp-base-font-size);
    line-height: var(--type-ramp-minus-1-line-height);
    padding: 10px 0;
    margin: 0;
    pointer-events: none;
}

nav fluent-anchor {
    width: 100%;
    color: var(--fill-color);
}

    nav fluent-anchor::part(control) {
        justify-content: start;
        background: var(--accent-fill-rest);
    }

.content {
    display: flex;
    background-color: var(--neutral-layer-1);
}

article {
    border-right: 1px solid var(--neutral-stroke-divider-rest);
    margin: 0 0;
    overflow-x: hidden;
    transition: all 300ms ease-in-out;
    width: 100%;
    background-color: #fff;
    padding: 0.5rem 1rem;
    overflow-y: auto;
    height: calc(100dvh - 90px);
}

aside {
    padding: 1.5rem 1rem;
    top: 0px;
    height: 100vh;
    position: sticky;
    width: 18rem;
}

#navmenu-toggle {
    display: none;
}

.navmenu-icon {
    display: none;
}

#navmenu-toggle:checked > nav {
    width: 0px;
}

[dir="rtl"] #navmenu-toggle:checked ~ nav {
    right: 0px;
}

#color {
    margin-right: 10px;
    margin-left: 0;
}

[dir="rtl"] #color {
    margin-left: 10px;
    margin-right: 0;
}

label {
    color: var(--neutral-foreground-rest);
    cursor: pointer;
}

.shell, .sourceCode {
    background: var(--neutral-stroke-layer-rest);
    padding: 7px;
}

code {
    background: var(--neutral-stroke-layer-rest);
}

.demopanel {
    border: 1px dashed var(--accent-fill-rest);
    padding: 5px;
}

.highlighted-row {
    background-color: var(--neutral-fill-secondary-hover);
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
    color: var(--neutral-foreground-rest);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    border: 1px dashed var(--error);
    background: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nNDgnIGhlaWdodD0nNDgnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycgeG1sbnM6eGxpbms9J2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnIG92ZXJmbG93PSdoaWRkZW4nIGZpbGw9JyNCQzJGMzInPjxwYXRoIGQ9J00yNCA0YTIwIDIwIDAgMSAwIDAgNDAgMjAgMjAgMCAwIDAgMC00MFptMCA5Yy42OSAwIDEuMjUuNTYgMS4yNSAxLjI1djEyLjVhMS4yNSAxLjI1IDAgMSAxLTIuNSAwdi0xMi41YzAtLjY5LjU2LTEuMjUgMS4yNS0xLjI1Wm0wIDIxYTIgMiAwIDEgMSAwLTQgMiAyIDAgMCAxIDAgNFonPjwvcGF0aD48L3N2Zz4=") no-repeat 1rem/1.8rem;
    padding: 1rem 1rem 1rem 3.7rem;
}

    .blazor-error-boundary::before {
        content: "An error has occurred: "
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var( --neutral-fill-layer-rest);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

@media (max-width: 767px) {
    .siteheader {
        display: none;
    }

        .siteheader .logo {
            display: none;
        }

        .siteheader .profile {
            padding-right: 30px;
        }

    .body-stack {
        flex-direction: column !important;
    }

    nav.sitenav {
        width: 100%;
        height: calc(100dvh - 50px);
    }

    .navmenu {
        width: 100%;
    }

    #navmenu-toggle {
        appearance: none;
    }

    .navmenu-icon {
        cursor: pointer;
        z-index: 10;
        display: block;
        position: absolute;
        top: 15px;
        left: unset;
        right: 20px;
        width: 20px;
        height: 20px;
        border: none;
    }

    [dir="rtl"] .navmenu-icon {
        left: 20px;
        right: unset
    }

    #navmenu-toggle ~ nav {
        display: none;
    }

    #navmenu-toggle:checked ~ nav {
        display: block;
    }

    #navmenu-toggle ~ article {
        display: block;
    }

    #navmenu-toggle:checked ~ article {
        display: none;
    }

    .content {
        flex-direction: column;
    }

    article {
        padding: 0rem;
        width: 100%;
    }

    aside {
        padding: 1em 0.75em;
        width: 100%;
    }

    .footer {
        display: grid;
        grid-template-columns: 10px auto 10px;
    }

        .footer .version {
            grid-column: 2;
            justify-content: start;
        }

        .footer .copy {
            grid-column: 2;
            grid-row: 2;
            justify-self: end;
        }

    @media screen and (max-width: 767px) and (orientation: landscape) {
        nav {
            padding: 25px 40px;
        }

            nav ul {
                margin: 0 0;
            }

                nav ul li {
                }
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    aside {
        padding: 1.5em 0.75em 1em 0.75em;
        width: 12rem;
    }

    article {
        padding: 0.5rem 1rem;
        width: 100%;
    }
}

/* Surface Duo specific styling */
@media (horizontal-viewport-segments: 2) {
    .siteheader {
        display: none;
    }

        .siteheader a {
            display: none;
        }

        .siteheader .logo {
            display: none;
        }

    main {
        display: grid;
        grid-template-columns: env(viewport-segment-width 0 0) 1fr;
        grid-template-rows: repeat(0, 1fr);
    }

    nav {
        grid-column: 1;
        width: env(viewport-segment-width 0 0) !important;
    }

    .content {
        display: grid;
        grid-template-columns: auto;
    }

    aside {
        grid-area: 2 / 2 / 3 / 3;
        padding: 1.5em 0.75em 1em 0.75em;
        margin-inline-start: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); /* hinge width */
        margin-inline-end: calc(100% - env(viewport-segment-left 1 0));
        width: auto;
    }

    article {
        grid-area: 1 / 2 / 2 / 3;
        padding: 0rem;
        margin-inline-start: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0)); /* hinge width */
        margin-inline-end: calc(100% - env(viewport-segment-left 1 0));
        width: auto;
    }
}

/* Actions Bar Container */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
}

/* Action Buttons Group */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Search Bar Styling */
.search-bar {
    flex: 1 1 300px;
    max-width: 400px;
    width: 100%;
}

/* Data Grid Container */
.data-grid-container {
    overflow: auto;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

    .pagination .ellipsis {
        margin: 0 5px;
    }

@media (max-width: 600px) {
    .pagination {
        flex-direction: row;
        align-items: flex-start;
    }

        .pagination .ellipsis,
        .pagination .fluent-button,
        .pagination .fluent-number-field {
            margin-bottom: 5px;
        }
}

/* Responsive Adjustments */
@media (min-width: 600px) {
    .actions-bar {
        flex-wrap: nowrap;
    }

    .search-bar {
        margin-top: 0;
        margin-left: 1rem;
    }
}

/* Additional Responsiveness for Export Buttons */
@media (max-width: 480px) {
    .action-buttons fluent-search {
        flex: 1 1 100%;
    }

    .action-buttons fluent-button {
        flex: 1 1 100%;
    }

    .action-buttons {
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .actions-bar {
        justify-content: flex-start;
    }
}

.fluent-dialog-header, .fluent-dialog-footer {
    position: sticky;
    z-index: 1;
    background-color: var(--neutral-layer-1);
    top: 0;
}

.fluent-dialog-footer {
    bottom: 0;
    border-top: 1px solid var(--neutral-stroke-divider-rest);
}

form {
    margin: 0.5rem;
}

fluent-text-field::part(control)::placeholder, fluent-number-field::part(control)::placeholder {
    font-weight: 100;
    font-style: italic;
    font-size: 14px;
}

.fluent-input-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px !important;
}

.symbol-container {
    display: flex;
    flex-direction: column;
    position: relative;
    bottom: -30px;
    right: 40px;
    width: 0px;
    cursor: inherit;
}

.symbol-container-disabled {
    display: flex;
    flex-direction: column;
    position: relative;
    bottom: -30px;
    right: 40px;
    width: 0px;
    cursor: not-allowed;
    color: darkgray;
}

.custom-combo-on {
    position: relative;
    opacity: 1;
    visibility: visible;
    bottom: 0px;
    transition: opacity 0.2s ease, bottom 0.2s ease-out;
}

.custom-combo-off {
    position: relative;
    opacity: 0;
    visibility: hidden;
    bottom: -30px;
    transition: opacity 0.2s ease, transform 0.2s ease-in;
}

.custom-checkbox {
    align-content: end;
    padding: 4px;
    padding-bottom: 7px !important;
}

    .custom-checkbox fluent-checkbox::part(label) {
        font-size: 12px;
        width: max-content;
    }

/* Clothing card */
.clothing-card {
    width: 100%;
    user-select: none;
    text-align: center;
    padding: 10px;
    border-radius: calc(var(--control-corner-radius)* 1px);
    cursor: grab;
    height: calc(var(--dragdrop-item-height) - 14px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: 0.5s;
}

    .clothing-card:not(.clothing-card-template):hover {
        background: #5f9ea080 !important;
        box-shadow: 0 0 10px cadetblue;
    }

    .clothing-card:active {
        cursor: grabbing;
    }

    .clothing-card:not(.clothing-card-template) {
        border: solid 1px var(--neutral-stroke-input-active);
    }

    .clothing-card.clothing-card-dummy {
        cursor: unset;
        border-color: transparent !important;
    }

    .clothing-card.clothing-card-template {
        cursor: unset;
        font-weight: 200;
        text-align: left;
    }

.clothing-card-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Clothing section end */

/* Drag and Drop */
.dragdrop-conainer {
    display: flex;
    user-select: none;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow: auto;
    height: calc(100dvh - 260px);
    margin-top: 1rem;
    --dragdrop-item-height: 170px;
    --dragdrop-item-width: 180px
}

.dragdrop-column {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: var(--dragdrop-item-width);
    height: max-content;
    min-height: 100%;
}

    .dragdrop-column.dragdrop-template {
        position: sticky;
        left: 0;
        z-index: 3;
        background-color: white;
    }

@media(width < 500px) {
    .dragdrop-column.dragdrop-template {
        display: none;
    }
}

.dragdrop-column-label {
    flex: 0 0 auto;
    font-weight: bold;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px;
    width: 100%;
    height: 2rem;
    text-align: center;
}

    .dragdrop-column-label.dragdrop-template {
        border-color: transparent !important;
    }

.dragdrop-item {
    flex: 0 0 auto;
    --fluent-sortable-list-filtered: unset !important;
    border: dashed 2px var(--neutral-stroke-input-active) !important;
    min-height: var(--dragdrop-item-height) !important;
}

    .dragdrop-item.dragdrop-template {
        border-color: transparent !important;
    }

    .dragdrop-item .sortable-item {
        padding: 0px !important;
        --fluent-sortable-list-item-height: auto;
        border-color: transparent !important;
        min-height: calc(var(--dragdrop-item-height) - 13px);
    }
/* Drag and Drop end */

/* History */
.history-title {
    border-bottom: 1px solid black;
    margin-bottom: 10px;
}

.history-list {
}

.history-list-item {
}

.history-date {
    font-style: italic;
}

.history-list-prop {
    font-weight: 700;
}

.history-list-value {
    font-style: italic;
}

/* History end */

/* Tri-state checkbox styles */
.tri-state-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.tri-state-checkbox {
    width: 24px;
    height: 24px;
    border: 1px solid #333;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: background-color 0.2s ease;
}

    .tri-state-checkbox:hover {
        background-color: rgba(0, 121, 110, 0.1);
    }

    .tri-state-checkbox .icon {
        color: #0078D4;
        font-size: 16px;
    }

.tri-state-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
/* Tri-state checkbox end */

.hardness-label {
    display: block;
    /*    font-weight: 600;*/
    margin-bottom: 4px;
}

.hardness-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0px;
}

.hardness-number {
    flex: 1; /* allow it to grow */
    min-width: 70px
}

    .hardness-number > * {
        width: 100% !important; /* force the CustomNumberField to fill its container */
    }

.hardness-unit {
    flex: 0 0 30px; /* fixed width for dropdown */
    margin-top: -3px; /* adjust as needed for proper vertical alignment */
}

/* Multipicker */

.custom-multi-picker {
    position: relative;
    display: block;
}

.custom-multi-picker__trigger {
    width: 100%;
    justify-content: space-between;
    gap: .5rem;
}

.custom-multi-picker__placeholder {
    color: var(--neutral-foreground-hint);
}

.custom-multi-picker__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.custom-multi-picker__chip {
    display: inline-flex;
    align-items: center;
}

.custom-multi-picker__header,
.custom-multi-picker__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .75rem;
}

.custom-multi-picker__actions {
    display: inline-flex;
    gap: .25rem;
}

.custom-multi-picker__body {
    display: grid;
    gap: .5rem;
    padding: .5rem .75rem;
    width: min(300px, 90vw);
}

.custom-multi-picker__list {
    max-height: 250px;
    overflow: auto;
    padding-inline: .125rem;
}

.custom-multi-picker__row {
    display: flex;
    align-items: center;
    padding: .25rem 0;
}

/* Multipicker end */

/* Sites multi line editor */

.sites-editor {
    display: grid;
    gap: .5rem;
}

.sites-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sites-empty {
    color: var(--neutral-foreground-hint);
    padding: .25rem 0;
}

.sites-rows {
    display: grid;
    gap: .25rem;
}

.sites-row {
    border: 1px solid var(--neutral-stroke-1-rest);
    border-radius: .5rem;
    padding: .5rem;
}

    .sites-row.editing {
        background: var(--neutral-layer-1);
    }

.sites-row-grid {
    display: grid;
    grid-template-columns: 30% 1fr auto;
    gap: .5rem;
    align-items: center;
}

    .sites-row-grid.readonly .sites-name-field, .sites-row-grid.readonly .sites-address-field {
        padding: .125rem 0;
    }

.sites-text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sites-validation-msg {
    color: #c62828;
    font-size: .85rem;
    margin-top: .25rem;
}

/* Sites multi line editor end */
