﻿@import url('open.iconic/font/css/open-iconic-bootstrap.min.css');
@import url('icons/materialicons.css');
@import url('icons/materialsymbols.css');
@import url('icons/appIcons.css');
@import url('layout.css');

/*#region Basic layout rules */
:root {
    --global-size: 1rem;
    --panelMargin: 1rem;
    --global-size-default: 1rem;
}

html, body {
    font-family: 'Segoe UI',Helvetica Neue, Helvetica, Arial, sans-serif;
    height: 100%;
    font-size: var(--global-size);
}

.dx-gridlayout-item {
    background-color: inherit;
}

.px-42 {
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.page {
    background-color: var(--bs-pageBackground);
}

* {
    scrollbar-width: thin;
}

/*#endregion*/

/*#region Exception handling */
@media (max-width: 500px) {
    #blazor-error-ui {
        width: 100%;
    }
}

@media (min-width: 500px) {
    #blazor-error-ui {
        width: 327px;
    }
}

#blazor-error-ui {
    background: white;
    bottom: 0;
    box-shadow: 0 -1px 10px 2px rgba(255, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    z-index: 2000;
    animation-name: exceptionDivAnimation;
    animation-duration: 1500ms;
    animation-fill-mode: backwards;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
        font-weight: bold;
        color: var(--bs-light);
    }

    #blazor-error-ui .reload {
        font-weight: bold;
        color: blue;
        margin-left: auto;
        margin-right: auto;
        display: table;
        cursor: pointer;
    }

@keyframes exceptionDivAnimation {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}
/*#endregion*/

/*#region General site rules */
.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

a {
    text-decoration: none !important;
}

thead th {
    text-transform: unset !important;
}
/*#endregion*/

/*#region Dev express component rules */
.MyCheckbox.modified.valid {
    outline: none;
}

.dxbl-badge {
    margin-right: 0.5rem !important;
}

    .dxbl-badge.dxbl-text {
        background-color: var(--bs-primary);
        color: floralwhite;
    }

/*#endregion*/

/*#region Application rules */
.XmlPopup {
    min-width:60% !important;
}

.searchIconClass, .tagSearchIconClass, .moneySearchIconClass {
    position: absolute;
    left: 7px;
    top: 4px;
}

.PanelExtraStyles {
    background: var(--bs-appBackground) !important;
    border-color: var(--bs-panelBorder) !important;
}

.DateIntervalSelectCombobox {
    padding-top: 4px;
    border: none;
}

.DateIntervalSelectCombobox .dxbl-edit-btn-dropdown {
    border-left: none;
}

.MiscFilterSelectCombobox {
    padding-top: 4px;
    border: none;
}

.FilterSearchBox {
    width: 13rem;
    padding: 0 !important;
    margin-top: 4px;
}

.MiscFilterSelectCombobox .dxbl-edit-btn-dropdown {
    border-left: none;
}

.SpecificDateIntervalSelectBox {
    padding-top: 6px;
    margin-left:0.5rem;
    opacity: 0.6;
    font-size: 12px;
    margin-bottom: 0;
}

.PagingPanel {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: 0.5rem 0.5rem;
}

.dxbl-grid .dxbl-grid-table .dxbl-grid-detail-cell {
    padding: 1rem;
}

.dxbl-grid .dxbl-grid-table .dxbl-grid-detail-cell > * {
    margin-block: 0;
}

.inspectEntityText {
    color: cornflowerblue;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline !important;
}

.Grid-clip-cell-content {
    text-overflow: ellipsis;
    white-space: nowrap;
    height: calc(var(--global-size)/var(--global-size-default)*43px);
}

.Grid-clip-cell-content-shorter {
    text-overflow: ellipsis;
    white-space: nowrap;
    height: calc(var(--global-size)/var(--global-size-default)*29px);
}

.Grid-filter-cell-properties {
    height: calc(var(--global-size)/var(--global-size-default)*34px);
}

/* LookupComboBox drop-down header row (DropDownCssClass="lookup-no-headers"). Keep it here: a <style> rendered by LookupComboBox becomes a sibling of the editor in the grid filter cell and breaks the DevExpress ":only-child" rule that removes the editor's side borders */
.lookup-no-headers .dxbl-list-box-table-header-row {
    display: none;
}

/* Lookup grids inside DxDropDownBox: the popup is sized to the initial content, so a sub-pixel width change after a search must not create a horizontal scroll */
.LookupDropdownGrid .dxbl-scroll-viewer-content {
    overflow-x: hidden !important;
}

.LookupDropdownGrid .dxbl-scroll-viewer-hor-scroll-bar {
    display: none !important;
}

.Grid-inactive-row {
    text-decoration: line-through;
    opacity: 0.65;
}

.cell-wrap {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
}

.OperationToolbarHeaderStart {
    margin-left: -2rem;
}

.dxbrv-gridlayout-side-bar-content {
    background: var(--bs-appBackground);
}

.BoldCaption {
    font-weight: 600 !important;
}

/* DevExpress form layout captions are single-line and clip long text; this lets them wrap */
.WrapCaption {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
}

.BlueCaption {
    color: mediumblue !important;
}

.text-bg-success {
    color: #fff !important;
    background-color: RGBA(var(--bs-success-rgb), var(--bs-bg-opacity, 1)) !important;
}

.InvoiceLinkDrawer > dxbl-drawer-panel {
    margin-top: calc(80px + (var(--global-size) - 16px) * 3);
}

.DrawerForm {
    padding: 0 0.75rem;
}

.DrawerFormTabs {
    padding: 0rem;
}

@media screen and (width <= 800px)
{
    .InvoiceLinkDrawer > dxbl-drawer-panel {
        margin-top: 0 !important;
    }
}

.sales-document-preview-drawer .base-drawer-panel > div:last-child {
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

/*#region Management Grids*/
.NoToolbarGrid > .dxbl-grid-toolbar-container {
    display: none;
}

.DrawerEnergeiesBox {
    display: flex;
    justify-content: space-between;
}

.ActionButtons {
    opacity: 0.9;
    font-size: calc(0.9 * var(--global-size));
}

.UtilityListBox {
    border: none !important;
    margin-top: 1rem;
}

/* Grows the list box to fit all its items (DevExpress fixes it at 200px), so it fills the drawer
   instead of scrolling inside a short box; the drawer body scrolls when the screen is shorter */
.UtilityListBox.FullHeightListBox {
    height: auto;
}

.ActionsDropdownButton {
    border: none;
    font-weight: 400;
    opacity: 0.9;
}


.ReadOnlyDataEditor {
    border-color: transparent;
}

.ReadOnlyDataEditor > .dxbl-btn-group-right {
    display: none;
}


.RightAlignedInput > input {
    text-align: end !important;
    padding-right: 1rem !important;
}

.BoldInput > input {
    font-weight: 500 !important;
    font-size: calc(1.2 * var(--global-size)) !important;
}

.BigInput > input {
    font-weight: 500 !important;
    font-size: calc(1.8 * var(--global-size)) !important;
}

.BoldTextboxInput {
    font-weight: 600 !important;
    padding-left: 0.1rem !important;
    padding-bottom: 0.1rem !important;
    padding-top: 0.1rem !important;
}

.SameColorPlaceholder {
    --dxbl-text-edit-placeholder-color: var(--dxds-color-content-neutral-default-rest);
}

.padded-icon {
    padding-right: 24px;
    background-color: var(--bs-introductionTextColor) !important;
    opacity: 0.7;
    mask-size: 100% 100%;
    width: var(--baseIconSize);
    height: var(--baseIconSize);
}

.blockedColumn {
    background-color: lightcoral !important;
    pointer-events: none;
}

.NoBorder {
    border: none;
}

.two-line-text {
    --lines: 2;
    --line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: var(--lines);
    line-clamp: var(--lines);
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: var(--line-height);
    height: calc(var(--line-height) * 1em * var(--lines));
    min-width: 0;
}

/*#endregion*/

/*#endregion*/

/*#region Visual bugfixes*/

/* DevExpress opens a drop-down at its default spot (below the editor) and only then flips it to fit the viewport.
   That first frame overflows the page, so html/body show scrollbars that stay painted until the next scroll.
   The app scrolls inside its own containers, so the page itself never needs to scroll while a drop-down is open.
   Currently only applying for .PrismaWebDropDownBodyCssClass. SEE #68011.
*/
html:has(.PrismaWebDropDownBodyCssClass),
html:has(.PrismaWebDropDownBodyCssClass) body {
    overflow: hidden;
}

/*#endregion*/

