@import url('./icons.css');
@import url('./app-shell.css');

html, body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    margin: 0;
}

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

.h-auto {
    height: auto !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

.text-danger {
    color: var(--dxds-color-content-danger-default-rest);
}

.text-success {
    color: var(--dxds-color-content-success-default-rest);
}

.alert {
    border: 1px solid var(--dxds-color-border-transparent-rest);
    border-radius: .25rem;
    margin-bottom: 1rem;
    padding: .75rem 1.25rem;
    position: relative;
}

.alert-danger {
    background-color: var(--dxds-color-surface-danger-subdued-rest);
    border-color: var(--dxds-color-border-danger-default-rest);
    color: var(--dxds-color-content-danger-default-rest);
}

.alert-warning {
    background-color: var(--dxds-color-surface-warning-subdued-rest);
    border-color: var(--dxds-color-border-warning-default-rest);
    color: var(--dxds-color-content-warning-default-rest);
}

.alert-success {
    background-color: var(--dxds-color-surface-success-subdued-rest);
    border-color: var(--dxds-color-border-success-default-rest);
    color: var(--dxds-color-content-success-default-rest);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--dxds-color-border-success-default-rest);
}

.invalid {
    outline: 1px solid var(--dxds-color-border-danger-default-rest);
}

.validation-message {
    color: var(--dxds-color-content-danger-default-rest);
}

.button-link {
    text-decoration: unset;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

.title.title-secondary {
    padding: 0.313rem 0 0;
    color: var(--dxds-color-content-secondary-default-rest);
}

.title-header-text {
    font-size: var(--dxds-font-size-headline-lg);
    font-weight: var(--dxds-font-weight-headline-default);
    letter-spacing: var(--dxds-letter-spacing-headline-lg);
    line-height: var(--dxds-line-height-headline-lg);
}

.title-content-text {
    font-size: var(--dxds-font-size-base-lg);
    font-weight: var(--dxds-font-weight-base-default);
    letter-spacing: var(--dxds-letter-spacing-base-lg);
    line-height: var(--dxds-line-height-base-lg);
}

.main-content {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

/* Full-width content pages (list/grid pages) - .main-content is a row-flex centering box meant for a
   single centered card (e.g. Login), so a title + a grid as two direct children end up side by side
   instead of stacked. Use this instead for pages with a title above a full-width grid. */
.page-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* Alternating (zebra) row style for DxGrid - see DxGrid.CustomizeElement usage in Users.razor /
   PrejetiRacuni.razor. */
.alt-item {
    --dxbl-grid-row-bg: var(--dxds-color-surface-neutral-subdued-rest);
}

/* Amount followed by a small drill-down icon (see PregledProjektov.razor). The icon is a plain <a> instead of
   a DxButton - a DxButton's own padding inflates the whole row's height, unlike a plain link which sits at
   normal text height. */
.grid-drilldown-cell {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.grid-drilldown-icon {
    color: var(--dxds-color-content-primary-rest, currentcolor);
    cursor: pointer;
    display: block;
    flex: none;
    height: 1.125rem;
    width: 1.125rem;
}

/* Coloured status value with a dot in the text colour in front of it (see the Uspesnost column in
   PregledProjektov.razor) - same look as the status/priority cells in the DevExpress CRM demo's task list. The
   colour comes from one of the modifier classes; the dot follows via currentcolor. space-between pins the dot
   to the left edge of the cell and the (right-aligned numeric) value to the right edge. */
.grid-status-cell {
    align-items: center;
    display: flex;
    gap: 0.375rem;
    justify-content: space-between;
}

.grid-status-cell::before {
    background-color: currentcolor;
    border-radius: 50%;
    content: "";
    flex: none;
    height: 0.6em;
    width: 0.6em;
}

.grid-status-positive {
    color: var(--dxds-color-content-utility-green-default-rest);
}

.grid-status-negative {
    color: var(--dxds-color-content-utility-red-default-rest);
}

.grid-status-neutral {
    color: var(--dxds-color-content-utility-gray-default-rest);
}

/* Soft background tint for a whole grid cell (set from DxGrid.CustomizeElement on the DataCell, see the
   "Zadnji izdani račun" column in PregledProjektov.razor). Subdued theme surfaces, so it stays gentle in both
   light and dark mode. */
.cell-tint-success {
    background-color: var(--dxds-color-surface-success-subdued-rest);
}

.cell-tint-danger {
    background-color: var(--dxds-color-surface-danger-subdued-rest);
}

.cell-tint-warning {
    background-color: var(--dxds-color-surface-warning-subdued-rest);
}

/* Header bands of the project overview (see PregledProjektov.razor): the band header cell gets a pastel tint
   (the theme's utility surface mixed 45% into the grid background, so it stays soft in light and dark mode) - it
   sets the header background variable the theme's own header rule reads, so no specificity fight. .grid-band-start triples the width of the (theme-coloured) left border of the
   first column of every band, to separate the bands. */
.grid-band-prejeti {
    --dxbl-grid-header-bg: color-mix(in srgb, var(--dxds-color-surface-utility-red-subdued-rest) 45%, var(--dxbl-grid-bg));
}

.grid-band-izdani {
    --dxbl-grid-header-bg: color-mix(in srgb, var(--dxds-color-surface-utility-green-subdued-rest) 45%, var(--dxbl-grid-bg));
}

.grid-band-ure {
    --dxbl-grid-header-bg: color-mix(in srgb, var(--dxds-color-surface-utility-blue-subdued-rest) 45%, var(--dxbl-grid-bg));
}

.dxbl-grid .dxbl-grid-table .grid-band-start {
    border-inline-start-width: calc(var(--dxbl-grid-border-width) * 3);
}

.block-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    height: auto;
    max-width: 100%;
    width: 31.25rem;
}

.or {
    align-items: center;
    display: flex;
    flex-direction: row;
    padding: 0.3125rem 0;
}

.or .or-line {
    opacity: 0.2;
    width: 100%;
    border-bottom: 1px solid var(--dxds-color-content-neutral-default-rest);
}

.or .or-text {
    padding: 0 0.625rem 0 0.625rem;
    font-size: var(--dxds-font-size-caption-md);
    line-height: var(--dxds-line-height-caption-md);
    color: var(--dxds-color-content-neutral-subdued-rest);
}

.links-container {
    align-items: center;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.links-container .dot {
    border-radius: 50%;
    height: 0.3125rem;
    margin: 0 0.1875rem;
    opacity: 0.7;
    width: 0.3125rem;
    background-color: var(--dxds-color-surface-neutral-default-rest);
}

.manage-layout {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.info-message {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 0.625rem 1rem 0.625rem 1rem;
    position: relative;
    background: var(--dxds-color-surface-info-subdued-rest);
}

.info-message.info-panel {
    margin-bottom: 0.625rem;
}

.manage-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.large-input {
    font-size: 1.875rem;
    height: 4.3125rem;
}

.title-content-text-secondary {
    font-size: var(--dxds-font-size-title-md);
    line-height: var(--dxds-line-height-title-md);
}

.button-group {
    display: flex;
    flex-direction: row;
    gap: 0.625rem;
}

.confirm-button {
    margin-top: 0.3125rem;
}

.display-desktop {
    display: block;
}

.display-mobile {
    display: none;
}

@media (max-width: 768px) {
    .display-desktop {
        display: none;
    }

    .display-mobile {
        display: block;
    }
}
