﻿:root {
    /* Gather common stuff here */
    --button-bg-color: #61d29b;
    --button-plain-bg-color: white;
    --text-light-green-color: #C5DDC9;
    --bg-color-dark-green: #26493D;
    --bg-color-hover-dark-green: #3F3F4B;
    --bg-color-datagrid: #F4F9FC;
    --bg-color-menu-selected: #4A8D76;
    --border-radius-panel: 16px;
    --text-color-warning-red: #b91c1c;
}


.custom-textarea textarea {
    font-family: Courier New !important;
    font-size: 16px;
}




/*Devextreme overrides*/

.dx-button .dx-button-text {
    text-transform: none !important;
}

/*Should be fetched from dx.material.UnifiedLosen.css TODO */
.dx-button {
    background-color: var(--button-bg-color);
    border-radius: 20px;
}

    .dx-button.org-button {
        background-color: white;
        color: black;
        border: 1px solid gray;
        border-radius: 12px;
    }

        .dx-button.org-button:hover,
        .dx-button.org-button.dx-state-hover {
            background-color: #f0f0f0; /* Slightly gray on hover */
        }

        .dx-button.org-button.dx-state-active {
            background-color: #e0e0e0; /* Darker gray on click */
        }

        .dx-button.org-button.selected {
            background-color: #D9F3EA;
            color: black;
        }

    /* Plain button: white background, black text, no border and with border */
    /* Base style - shared */
    .dx-button.plain-button,
    .dx-button.plain-no-border-button {
        background-color: var(--button-plain-bg-color, white) !important;
        color: black;
        border-radius: 20px;
        box-shadow: none;
    }

    /* plain-button adds border */
    .dx-button.plain-button {
        border: 1px solid lightgrey;
    }

    /* plain-no-border-button removes border */
    .dx-button.plain-no-border-button {
        border: none;
    }

        /* HOVER: apply to the content for BOTH variants, with or without icon */
        .dx-button.plain-button:hover .dx-button-content,
        .dx-button.plain-button.dx-state-hover .dx-button-content,
        .dx-button.plain-no-border-button:hover .dx-button-content,
        .dx-button.plain-no-border-button.dx-state-hover .dx-button-content {
            background-color: whitesmoke !important;
        }

        /* ACTIVE */
        .dx-button.plain-button.dx-state-active .dx-button-content,
        .dx-button.plain-no-border-button.dx-state-active .dx-button-content {
            background-color: #f0f0f0 !important;
        }




/* Base: match all popup close buttons across themes/versions */
.dx-popup-wrapper .dx-closebutton.dx-button,
.dx-popup-wrapper .dx-popup-closebutton.dx-button,
.dx-popup-wrapper .dx-closebutton,
.dx-popup-wrapper .dx-popup-closebutton {
    background-color: white !important;
    color: black !important;
    border: none !important;
    box-shadow: none !important;
}

    /* Hover + active */
    .dx-popup-wrapper .dx-closebutton.dx-button:hover,
    .dx-popup-wrapper .dx-popup-closebutton.dx-button:hover,
    .dx-popup-wrapper .dx-closebutton.dx-state-hover,
    .dx-popup-wrapper .dx-popup-closebutton.dx-state-hover {
        background-color: #f9f9f9 !important;
    }

    .dx-popup-wrapper .dx-closebutton.dx-state-active,
    .dx-popup-wrapper .dx-popup-closebutton.dx-state-active,
    .dx-popup-wrapper .dx-closebutton.dx-button:active,
    .dx-popup-wrapper .dx-popup-closebutton.dx-button:active {
        background-color: #f0f0f0 !important;
    }

    /* Make sure the “X” icon inherits your color and isn’t dimmed by the theme */
    .dx-popup-wrapper .dx-closebutton .dx-icon,
    .dx-popup-wrapper .dx-popup-closebutton .dx-icon,
    .dx-popup-wrapper .dx-closebutton .dx-icon-close:before,
    .dx-popup-wrapper .dx-popup-closebutton .dx-icon-close:before {
        color: currentColor !important;
        opacity: 1 !important;
    }

.popup-close-button {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    padding: 0.25rem 0.5rem;
}


/* Make the datagrid itself transparent so wrapper styling is visible */
.dx-losen-datagrid .dx-datagrid {
    background-color: transparent !important;
    border-radius: 10px !important;
}

.dx-losen-datagrid .dx-datagrid-borders > .dx-datagrid-filter-panel,
.losen-datagrid .dx-datagrid-borders > .dx-datagrid-headers {
    border: none !important;
    background-color: var(--bg-color-datagrid);
}

.dx-losen-datagrid .dx-datagrid > .dx-datagrid-headers, .dx-datagrid > .dx-datagrid-rowsview, .dx-datagrid > .dx-datagrid-total-footer {
    background-color: var(--bg-color-datagrid);
    border-color: white;
    border-radius: 10px;
}

.dx-losen-datagrid .dx-datagrid .dx-row-lines > td {
    border-bottom: 1px solid transparent;
    border-color: white;
    border-width: 2px;
}

.dx-losen-datagrid .dx-datagrid-headers .dx-datagrid-table .dx-row > td {
    border-color: white;
    border-width: 2px;
}

/* Dialog button overrides - white background with black text */
.dx-button-mode-text.dx-button-default {
    background-color: white !important;
    color: black !important;
    box-shadow: none !important;
}

    .dx-button-mode-text.dx-button-default .dx-button-text,
    .dx-button-mode-text.dx-button-default .dx-icon {
        color: black !important;
    }

    /* Hover state */
    .dx-button-mode-text.dx-button-default:hover,
    .dx-button-mode-text.dx-button-default.dx-state-hover {
        background-color: #f5f5f5 !important;
    }

    /* Active/pressed state */
    .dx-button-mode-text.dx-button-default:active,
    .dx-button-mode-text.dx-button-default.dx-state-active {
        background-color: #e8e8e8 !important;
    }

    /* Focused state */
    .dx-button-mode-text.dx-button-default.dx-state-focused {
        background-color: #f5f5f5 !important;
    }

/* END devextreme overrides */


.text-gray-60 {
    color: rgba(0, 0, 0, 0.60);
}

.text-gray-87 {
    color: rgba(0, 0, 0, 0.87);
}


.text-login-right {
    color: var(--text-light-green-color);
    font-style: normal;
    font-feature-settings: 'liga' off;
}


/* Used as a byline under title */
.title1-sub {
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
}

.title1 {
    font-variant-numeric: lining-nums proportional-nums;
    font-feature-settings: 'liga' off;
    font-size: 48px;
    font-style: normal;
    font-weight: 800;
    line-height: 120%; /* 57.6px */
}

.title2 {
    font-variant-numeric: lining-nums proportional-nums;
    font-size: 24px;
    font-weight: 700;
    line-height: 140%; /* 33.6px */
}

.title3 {
    font-weight: 700;
    font-size: 20px;
    leading-trim: NONE;
    line-height: 160%;
    letter-spacing: 0.15px;
}

.title4 {
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: 16px;
    font-weight: 600;
    line-height: 175%; /* 28px */
    letter-spacing: 0.15px;
}


.title5 {
    font-feature-settings: 'liga' off, 'clig' off;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 160%; /* 32px */
    letter-spacing: 0.15px;
}



.body-text {
    font-size: 14px;
    font-weight: var(--Font-weight-regular, 400);
    line-height: 150%; /* 24px */
    color: inherit;
    opacity: 0.8;
}

.footer-text {
    font-size: 11px;
    opacity: 0.5;
}


.text-link {
    color: inherit; /* same color as surrounding text */
    text-decoration: none; /* removes underline */
}

    .text-link:hover {
        text-decoration: underline; /* optional: add underline on hover */
    }

.bg-color-dark-green {
    background-color: var(--bg-color-dark-green);
}

.rounded-right {
    border-top-right-radius: var(--border-radius-panel);
    border-bottom-right-radius: var(--border-radius-panel);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.rounded-left {
    border-top-left-radius: var(--border-radius-panel);
    border-bottom-left-radius: var(--border-radius-panel);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.collapse-button {
    margin-left: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 20px;
    background-color: transparent;
    color: var(--text-light-green-color) !important
}

/*below isindex a filler from Devextreme, set to 0 to move icons to left */
.dx-treeview-expander-icon-stub {
    width: 0;
}

/*borrowed from BFStat*/
.layout-body {
    flex: 1;
    height: 100%;
    min-height: 0;
}

    .layout-body .menu-container {
        height: 100%;
        width: 200px;
    }

    .layout-body .content {
        flex-grow: 1;
        height: 100%;
        line-height: 1.5;
    }

        .layout-body .content h2 {
            font-size: 30px;
            font-weight: 300;
            letter-spacing: -.5px;
        }

    .layout-body .content-block {
        margin-left: 20px;
        margin-right: 20px;
        margin-top: 20px;
    }

    .layout-body .content-footer {
        display: block;
        color: rgba(0,0,0,.609);
        border-top: 1px solid rgba(0,0,0,.1);
        padding-top: 20px;
        padding-bottom: 24px;
    }

    .layout-body .responsive-paddings {
        padding: 20px;
    }

.layout-body-hidden {
    visibility: hidden;
}

@media screen and (min-width: 600px) {
    .layout-body .content-block {
        margin-left: 40px;
        margin-right: 40px;
    }
}

@media screen and (min-width: 1280px) {
    .layout-body .responsive-paddings {
        padding: 40px;
    }
}

.menu-container .dx-widget {
    color: var(--text-light-green-color);
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
}

.menu-container .dx-treeview {
    white-space: nowrap;
}

    .menu-container .dx-treeview .dx-treeview-item {
        padding-left: 0;
        padding-right: 0;
    }

        .menu-container .dx-treeview .dx-treeview-item .dx-icon {
            width: 60px !important;
            margin: 0 !important;
        }

    .menu-container .dx-treeview .dx-treeview-node {
        padding: 0 0 !important;
    }

    .menu-container .dx-treeview .dx-treeview-toggle-item-visibility {
        right: 10px;
        left: auto;
    }

    .menu-container .dx-treeview .dx-rtl .dx-treeview-toggle-item-visibility {
        left: 10px;
        right: auto;
    }

    /*    .menu-container .dx-treeview .dx-treeview-node[aria-level="1"] {
        font-weight: bold;
        border-bottom: 1px solid #515159;
    }*/

    .menu-container .dx-treeview .dx-treeview-node[aria-level="2"] .dx-treeview-item-content {
        font-weight: normal;
        padding: 0 60px;
    }

    .menu-container .dx-treeview .dx-treeview-node-container .dx-treeview-node.dx-state-selected:not(.dx-state-focused) > .dx-treeview-item {
        background: transparent;
        background-color: var(--bg-color-menu-selected);
    }

    .menu-container .dx-treeview .dx-treeview-node-container .dx-treeview-node.dx-state-selected > .dx-treeview-item * {
        color: var(--text-color-menu-selected);
    }

    .menu-container .dx-treeview .dx-treeview-node-container .dx-treeview-node:not(.dx-state-focused) > .dx-treeview-item.dx-state-hover {
        background-color: var(--text-light-green-color);
    }
