@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --custom-autocomplete-button: #1A202C;
    --custom-autocomplete-button-filter: #1A202C;
    --custom-autocomplete-background: #EDF2F7;
    --custom-autocomplete-background-input: #EDF2F7;
    --custom-autocomplete-button-hover-filter: #E2E8F0;
    --custom-autocomplete-button-hover: #E2E8F0;
    --custom-text-field: #4A5568;
    --custom-text-field-hover: #718096;
    --custom-filter-drawer-background: #CCECF9;
    --custom-tab-count-badge-background: #E0E0E0;
    --custom-only-button-color: #00568F;
    --custom-only-button-color-filled: #FFFFFF;
    --custom-activity-button: #D53F8C;
    --custom-row-hover: #ccecf9;
    --custom-row-border-color: #E2E8F0;
    --custom-chip-activity-topic-background: #00a0e1;
    --custom-contact-container-background: #edf2f7;
    --custom-color-fc: #edf2f7;
    --custom-kpi-grey: #CBD5E0;
    --custom-direction-button-hover: rgba(0, 0, 0, 0.04);
    --custom-linde-user-chip-color: #DD6B20;
    --custom-activities-avatar: #edf2f7;
    --custom-request-button: #534bde;
    --custom-secondary-color: #00A0E1;
}

:root.mud-theme-dark, .dark-mode {
    --custom-autocomplete-button: #CBD5E0;
    --custom-autocomplete-button-filter: #CBD5E0;
    --custom-autocomplete-background: #ffffff14;
    --custom-autocomplete-background-input: #2D3748;
    --custom-autocomplete-button-hover: #ffffff17;
    --custom-autocomplete-button-hover-filter: #ffffff17;
    --custom-text-field: #CBD5E0;
    --custom-text-field-hover: #E2E8F0;
    --custom-filter-drawer-background: #003355;
    --custom-tab-count-badge-background: #E2E8F029;
    --custom-only-button-color: #99BBD2;
    --custom-only-button-color-filled: #1A202C;
    --custom-activity-button: #FBB6CE;
    --custom-row-hover: #00405a;
    --custom-row-border-color: #00405a;
    --custom-chip-activity-topic-background: #00a0e199;
    --custom-contact-container-background: #E2E8F029;
    --custom-color-fc: #000000;
    --custom-kpi-grey: #2D3748;
    --custom-direction-button-hover: rgba(255, 255, 255, 0.116);
    --custom-linde-user-chip-color: rgba(251, 211, 141, 0.8);
    --custom-activities-avatar: #E2E8F029;
    --custom-request-button: #736de3;
}

html, body {
    font-family: LindeDax, Helvetica, sans-serif;
}

@font-face {
    font-family: LindeDax;
    font-style: normal;
    font-weight: 300;
    src: url('/fonts/lindedaxligweb.woff') format("woff")
}

@font-face {
    font-family: LindeDax;
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/lindedaxsemiligweb.woff') format("woff")
}

@font-face {
    font-family: LindeDax;
    font-style: normal;
    font-weight: 500;
    src: url('/fonts/lindedaxregweb.woff') format("woff")
}

@font-face {
    font-family: LindeDax;
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/lindedaxmedweb.woff') format("woff")
}

h1:focus {
    outline: none;
}

a, .btn-link {
    text-decoration: none !important;
}

ul {
    padding:0px !important;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
}

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

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aC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I2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    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: #e0e0e0;
    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");
}

.text-uppercase {
    text-transform: uppercase;
}

.text-lowercase {
    text-transform: lowercase;
}

.text-capitalize {
    text-transform: capitalize;
}


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

.fw-bold {
    font-weight: 700;
}

.fw-semibold {
    font-weight: 600;
}

.fw-medium {
    font-weight: 500;
}

.fs-extra-small {
    font-size: 0.75rem !important;
}

.fs-small {
    font-size: 0.875rem !important;
}

.fs-medium {
    font-size: 1rem !important;
}

.fs-large {
    font-size: 1.25rem !important;
}

.fc-secondary {
    color: var(--custom-secondary-color);
}

.fc-black {
    color: black !important;
}

.color-white {
    color: white !important;
}

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

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

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

.width-auto {
    width: auto !important;
}

.max-width-350 {
    max-width: 350px !important;
}

.max-width-200 {
    max-width: 200px !important;
}

.text-center {
    text-align: center;
}

.lb-anywhere {
    line-break: anywhere;
}

.opacity-100 {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.opacity-30 {
    opacity: 0.3;
    transition: opacity 0.3s ease-in-out;
}

.truncate {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tab styles */
.tab-header {
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: capitalize;
}

.tab-count-badge {
    background-color: var(--custom-tab-count-badge-background);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Bold text for selected tabs */
.mud-tabs-rounded .mud-tabs-toolbar .mud-tabs-toolbar-wrapper .mud-tabs-toolbar-inner .mud-tab-active span {
    font-weight: 700 !important;
}

.mud-tab-active .tab-header span {
    font-weight: 700 !important;
}

.contact-detail-tabs .mud-tab-active {
    border-bottom: 2px solid var(--mud-palette-primary);
    margin-bottom: -1px;
}

.filter-button {
    white-space: nowrap;
    border-radius: 5px;
    height: 40px;
    text-transform: none !important;
    color: var(--custom-color-fc) !important;
}

.filter-button .mud-icon-root.mud-svg-icon {
    fill: var(--custom-color-fc) !important;
}

.custom-filter-drawer {
    --mud-drawer-width: 56rem;
}

.custom-divider {
    height: 2rem;
}

/* Styles added from MainLayout.razor.css */
.custom-autocomplete-button {
    color: var(--custom-autocomplete-button) !important;
    background: var(--custom-autocomplete-background) !important;
    border-radius: 0.375rem !important;
    font-weight: bold !important;
    font-size: medium;
}

.custom-autocomplete-button:hover {
    background: var(--custom-autocomplete-button-hover) !important;
}

/* Styles added from MainLayout.razor.css */
.custom-autocomplete-button-filters {
    color: var(--custom-autocomplete-button-filter) !important;
    background: var(--custom-autocomplete-background) !important;
    border-radius: 0.375rem !important;
    font-weight: bold !important;
    font-size: small;
}

.custom-autocomplete-button:hover-filters {
    background: var(--custom-autocomplete-button-hover-filter) !important;
}

.custom-autocomplete .mud-input {
    height: 3rem !important;
    width: 42rem;
    background: var(--custom-autocomplete-background-input) !important;
    border-radius: 0.4rem !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
}

.custom-text-field .mud-input, .custom-mud-input .mud-input {
    height: 2.5rem !important;
    border-radius: 0.4rem;
    font-size: 1rem !important;
}

/* Additional styles from MainLayout.razor.css */
.custom-chip {
    color: var(--mud-palette-black) !important;
    font-size: 0.75rem !important;
    margin-left: 0 !important;
    font-weight: 500 !important;
}

.custom-chip-compact {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-chip-dark {
    color: var(--mud-palette-text-primary) !important;
    background: #E2E8F029 !important;
}

.custom-chip-activity-topic {
    background-color: var(--custom-chip-activity-topic-background);
    color: #ffffff;
    border-radius: 0.375rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-calendar-chip {
    background-color: var(--custom-chip-activity-topic-background);
    width: 100%;
    color: #ffffff;
    border-radius: 0.375rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-contact-container {
    background-color: var(--custom-contact-container-background);
    border-radius: 2rem;
    padding-right: 8px;
}

.custom-structure-container {
    background-color: var(--custom-contact-container-background);
    border-radius: 0.375rem;
    padding-left: 8px;
    padding-right: 8px;
    width: auto;
    margin-left: 0px;
}

.custom-text-field-dark .mud-input {
    background: #2D3748 !important;
}

.custom-icon-structure-detail {
        width: 20px;
        height: 20px;
        margin-top: 2px;
}

.custom-button {
    padding: 1rem !important;
    height: 2.5rem !important;
    border-radius: 0.375rem !important;
    text-transform: none !important;
    font-weight: 600 !important;
}

.custom-tertiary {
    color: #1A202C !important;
    background: #EDF2F7 !important;
}

.custom-tertiary:hover {
    background: #E2E8F0 !important;
}

.custom-button-default-color {
    transition: all ease-in-out !important;
    color: var(--mud-palette-dark) !important;
    background: #EDF2F7 !important;
}

.custom-button-default-color:hover {
    background: #e2e8f0 !important;
}

.custom-activity-button {
    max-width: 250px;
    background: var(--custom-activity-button) !important;
}

.custom-activity-button-bg {
    background: var(--custom-activity-button) !important;
}
.custom-edit-button {
    max-width: 250px !important;
}

.custom-request-button {
    max-width: 250px !important;
    background: var(--custom-request-button) !important;
}

.custom-toggle-group {
    height: 2.5rem !important;
}

.custom-color-titles {
    color: var(--mud-palette-text-secondary) !important;
}

.custom-row-entity {
    transition: all ease-in-out;
    border-color: var(--custom-row-border-color);
}

.custom-row-entity:hover {
    border: 1px solid #00a0e1;
    border-radius: 0.75rem;
    background-color: var(--custom-row-hover);
    cursor: pointer;
}

.custom-row-timeline {
    transition: all ease-in-out;
    border-color: var(--custom-row-border-color);
    min-height: 6rem;
    height: auto;
}

.custom-timeline-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

.custom-timeline-activities {
    min-width: 70%;
}

.timeline-box {
    flex: 1 1 auto;
    height: 100%;
    padding: 0.5rem;
    border-radius: 0.5rem;
    max-width: 5rem;
}

.custom-timeline-box-tooltip {
    top: 2px;
    right: 1px;
}

.custom-timeline-activity-row:hover {
    border-radius: 0.75rem;
    background-color: var(--mud-palette-action-default-hover);
    cursor: pointer;
}

.custom-activity-date-cell {
    text-align: center;
    align-self: anchor-center;
}

.custom-activity-description {
    min-height: 2.4em;
    line-height: 1.2em;
}

.custom-toggle-text {
    text-transform: lowercase;
}

.custom-button-gray {
    background-color: var(--custom-contact-container-background);
    color: var(----custom-autocomplete-button);
}

.mud-button-outlined.mud-button-outlined-primary {
    color: var(--mud-palette-text-secondary) !important;
}

.mud-button-outlined .mud-button-outlined-primary {
    border: var(--mud-palette-text-secondary) !important;
    border-color: var(--mud-palette-text-secondary) !important;
}

.mud-border-primary {
    border-color: var(--mud-palette-text-secondary) !important;
}

.mud-drawer {
    height: auto;
    top: auto;
    width: 100%;
    background: var(--custom-filter-drawer-background);
}

.small-icon-button {
    align-self: center !important;
    border-color: #E2E8F0 !important;
}

.small-icon-button-dark {
    color: var(--mud-palette-tertiary) !important;
    border-color: #ffffff29 !important;
}

.custom-select .mud-input {
    height: 2.5rem !important;
    border-color: #e5e5e5 !important;
    border-radius: 0.375rem !important;
}

.custom-divider-activity {
    border-style: dotted;
    border-color: #00a0e1;
    opacity: 0.6;
    background-color: transparent;
}

.custom-select-dark .mud-select-input .mud-icon-root.mud-svg-icon {
    color: var(--mud-palette-tertiary) !important;
}

.custom-only-button {
    font-size: 0.875rem;
    text-transform: none !important;
    border-radius: 0.375rem !important;
}

    .custom-only-button.mud-button-outlined {
        border-color: var(--custom-only-button-color);
        color: var(--custom-only-button-color) !important;
    }

    .custom-only-button.mud-button-filled {
        background-color: var(--custom-only-button-color) !important;
        color: var(--custom-only-button-color-filled) !important;
    }

.activities-avatar {
    background-color: var(--custom-activities-avatar);
}

.custom-loading-spinner-desktop {
    display: inline-flex;
}

.custom-loading-spinner-mobile {
    display: none;
}

.activities-avatar-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.custom-activity-row-left-section {
    width: 250px;
}

.mud-dialog .mud-dialog-content {
    padding: 0 !important;
    margin: 0 !important;
}

.mud-overlay .mud-overlay-content {
    top: 0px !important;
    position: fixed !important;
}

/* KPI Color Classes for Treatment Color Maps */
.kpi-color-grey {
    background-color: var(--custom-kpi-grey) !important;
}

.kpi-color-blue {
    background-color: #00a0e1 !important;
}

.kpi-color-green {
    background-color: #38a169 !important;
}

.kpi-color-red {
    background-color: #e53e3e !important;
}

/* Sort Direction Button Styles */
.custom-direction-button {
    min-width: 40px;
    height: 40px;
}

    .custom-direction-button:hover {
        background-color: var(--custom-direction-button-hover);
    }

/* Sort direction icon styles */
.sort-direction-icon {
    width: 24px;
    height: 24px;
    color: var(--mud-palette-secondary);
}

.lindeUserChip {
    color: var(--custom-linde-user-chip-color);
    background: transparent;
    border: 1px solid var(--custom-linde-user-chip-color);
    border-radius: 0.375rem !important;
}

.custom-request-patient-trc-chip {
    background: transparent !important;
    border-radius: 0.375rem !important;
}

@media only screen and (max-width: 900px) {
    .custom-filter-drawer {
        --mud-drawer-width: 95vw;
    }

    .custom-datetime-picker {
        width: 85vw;
    }
}

/* Full width on narrow screens (column layout) */
@media only screen and (max-width: 960px) {
    .custom-divider-activity {
        border-width: 1px 0px 0px 0px;
        width: 100%;
        height: 1px;
        min-height: 1px;
    }
    .custom-timeline-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    .custom-loading-spinner-mobile {
        display: inline-flex !important;
    }
    .custom-loading-spinner-desktop {
        display: none !important;
    }
}

/* Full height on wide screens (row layout) */
@media only screen and (min-width: 961px) {
    .custom-divider-activity {
        border-width: 0px 0px 0px 1px;
        width: 1px;
        min-width: 1px;
        margin-left: 8px;
        margin-right: 8px;
        align-self: stretch;
        flex-shrink: 0;
    }
    .custom-activity-actions {
        max-width: 15%;
    }
}

@media only screen and (min-width: 1024px) and (max-width: 1280px) {
    .custom-timeline-activities {
        min-width: 60%;
    }
}

@media only screen and (max-width: 960px) {
    .width-sm-auto {
        width: auto !important;
    }

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

@media only screen and (max-width: 1400px) {
    .graph-scroll-x {
        overflow-x: auto;
        position: relative;
        max-width: 100%;
    }
}

@media only screen and (max-width: 768px) {
    .custom-sorting-bar {
        flex-direction: column;
    }

    .custom-timeline-row {
        flex-direction: column !important;
    }

    .custom-autocomplete .mud-input {
        width: 85vw !important;
    }
    .custom-activity-button {
        max-width: auto;
    }
}

@media only screen and (max-width: 680px) {

    .mud-cal-toolbar {
        display: flex;
        gap: 1rem;
        flex-direction: column;
        align-items: baseline;
    }

    .custom-structure-container {
        max-width: 250px !important;
    }
}

@media only screen and (min-width: 769px) and (max-width: 960px) {
    .custom-sorting-bar {
        flex-direction: column;
    }
}