﻿/* The components both hosts share with the theme: cards, form labels, disabled buttons and the
   compact header of narrow screens. Moved from Online so that the client portal looks the same. */

.card {
    padding: 0 !important;
    --rz-card-shadow: none;
    border: var(--rz-border-width) solid var(--rz-base-600);
}

/* The Card component fills its column unless told otherwise: unlike rz-w-100, which is
   !important, a width given by its Style (the face-to-face card, 640px at most) wins. */
.card--fill {
    width: 100%;
}

/* A disabled button stays legible. Radzen fades it to 20 %, which left a white label on a pale
   violet: a filled one turns grey instead, a text or outlined one keeps its colour, dimmed. */
.rz-button.rz-state-disabled {
    opacity: 0.55;
}

.rz-button.rz-state-disabled:not(.rz-variant-text):not(.rz-variant-outlined) {
    opacity: 1;
    background-color: var(--rz-base-300);
    color: var(--rz-base-700);
    box-shadow: none;
}

.card-header {
    background-color: var(--rz-primary-100);
    border-top-left-radius: var(--rz-card-border-radius);
    border-top-right-radius: var(--rz-card-border-radius);
    border-bottom: var(--rz-border-width) solid var(--rz-base-600);
}

.card-footer {
    background-color: var(--rz-base-light);
    border-bottom-left-radius: var(--rz-card-border-radius);
    border-bottom-right-radius: var(--rz-card-border-radius);
    border-top: var(--rz-border-width) solid var(--rz-base-600);
}

/* Form label - one style app-wide: caption size, 600, uppercase */
.rz-label {
    font-weight: 600;
    color: var(--rz-base-700);
    text-transform: uppercase;
    font-size: 0.8rem;
}

/* The layout header only carries the menu toggle: Radzen folds the sidebar away at 768 px and
   below, so the header shows there and nowhere else. Same breakpoint as the theme's. */
.rz-header.compact-header {
    display: none;
}

@media (max-width: 768px) {
    .rz-header.compact-header {
        display: flex;
        align-items: center;
        padding: 0 0.5rem;
    }
}

/* Field errors, the same in both hosts: the validation message, and the control turned red. */
.validation-message {
    color: var(--rz-danger);
    font-size: small;
}

/* Invalid field: Radzen tags the control with .invalid but the theme only turns it red on
   the login screen. Same signal everywhere instead, on the control and on the form field
   wrapper that draws the border for floating-label inputs. */
.rz-textbox.invalid,
.rz-textarea.invalid,
.rz-dropdown.invalid,
.rz-multiselect.invalid,
.rz-numeric.invalid,
.rz-colorpicker.invalid,
.mask.invalid,
.rz-datepicker.invalid > .rz-inputtext,
.rz-datepicker > .rz-inputtext.invalid,
.rz-selectbar.invalid,
.rz-form-field-content:has(.invalid) {
    border-color: var(--rz-danger);
}

    /* The segmented bar draws a tinted background too, so the border alone reads weak. */
    .rz-selectbar.invalid {
        background: var(--rz-danger-lighter);
    }

    .rz-textbox.invalid:focus,
    .rz-textarea.invalid:focus,
    .rz-numeric.invalid:focus-within,
    .rz-dropdown.invalid.rz-state-focused,
    .rz-multiselect.invalid.rz-state-focused {
        --rz-input-focus-shadow: inset 0 0 0 1px var(--rz-danger);
        border-color: var(--rz-danger);
    }

/* Segmented RadzenSelectBar - the app has a single select bar style */
.rz-selectbar {
    padding: 4px;
    background: var(--rz-primary-100);
    border: var(--rz-border-width) solid var(--rz-primary-200);
    --rz-selectbar-border-radius: var(--rz-border-radius-2);
    gap: 4px;
}

    .rz-selectbar > .rz-button {
        flex-grow: 1;
        border-radius: var(--rz-border-radius-2);
        opacity: 1 !important;
        border: none;
        background-color: transparent;
        color: var(--rz-primary-darker);
        font-weight: 500;
    }

        .rz-selectbar > .rz-button:hover:not(.rz-state-active):not(.rz-state-disabled) {
            background-color: rgb(255 255 255 / 45%);
        }

        .rz-selectbar > .rz-button.rz-state-active {
            background-color: var(--rz-primary) !important;
            color: var(--rz-on-primary) !important;
            border: none;
        }

/* The sidebar of both hosts: the bordered shortcut buttons and the profile button at the bottom,
   which opens the account menu. */
.alert-buton {
    border-radius: 8px !important;
    border: 1px solid var(--rz-primary);
    position: relative;
}

.alert-buton-badge {
    position: absolute;
    right: 10px;
    top: 5px;
}

.profil-button {
    border-radius: 8px !important;
    border: 1px solid var(--rz-primary);
    padding: 0.5rem;
}

.profil-button .rz-button-box {
    width: 100%;
}
