﻿/* LOGIN */
.login-container {
    position: relative;
    padding: 2rem;
    margin: auto;
    margin-top: 100px;
    z-index: 0;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    pointer-events: none;
}

.moving-border {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    pointer-events: none;
    z-index: 1;
    padding: 4px;
    background: linear-gradient(270deg, #008EFF, #0088FF, #00D7E9, #00DCE5, #008EFF);
    background-size: 600% 600%;
    animation: smoothGradientMove 10s ease-in-out infinite;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    border-radius: 8px;
}

@keyframes smoothGradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* CNT */
.SdsCntPage {
    height: calc(100vh - var(--AppbarHeight) - var(--TabHeaderHeight) - 8px);
    overflow: auto;
    padding: 0px;
    background-size: auto 50px;
    background-position: top;
}

.SdsCntPage.Detail {
    display: inline-flex;
    width: 100%;
}

.SdsCnt.Standard {
    padding: 8px;
    width: calc(100% - 16px - 0px); /*0px era 8px*/
    height: auto; /*fit-content;*/
    margin: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.SdsCnt.Standard > :first-child {
    margin-bottom: 0px;
}

.SdsCntChild > :first-child {
    margin-top: 0px;
}

.SdsCntChild > * {
    margin-bottom: 8px;
    margin-top: 8px;
}

.SdsCntChild > :last-child {
    margin-bottom: 0px;
}

.SdsCnt.NoBorder {
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.SdsCnt.NoBorderWithMargin {
    width: calc(100% - 8px - 8px);
    height: fit-content;
    margin: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.SdsCnt.PageData {
    height: calc(100vh - var(--AppbarHeight) - var(--TabHeaderHeight) - 8px);
    overflow-y: auto;
    flex: 1;
}

.SdsCnt.PageDataMini {
    height: calc(100vh - var(--AppbarHeight) - var(--TabHeaderHeight) - 8px);
    overflow-y: auto;
    width: 32%;
}

.SdsCnt.MatchParentHeight {
    height: calc(100% - 16px);
    overflow-y: auto;
}

/* CONTATTI */
.SdsCntChild .mud-expand-panel-header {
    padding: 0px 16px;
}

/* SdsGridOptions */
.SdsCnt.PageAction {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    width: 240px;
}

/* GRUPPO */
.SdsCnt.Group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0px;
}

.SdsCnt.Group .SdsCnt.Standard {
    width: calc(50% - 16px);
}

@media only screen and (max-width: 600px) {
    .SdsCnt.Group .SdsCnt.Standard {
        width: 100%;
    }
}

.SdsTitle {
    font-weight: var(--mud-typography-subtitle2-weight);
    font-size: var(--mud-typography-subtitle2-size);
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.SdsTitle .mud-typography.mud-typography-body1 {
    text-transform: uppercase;
 }

.ContentMatchParentHeight {
    height: calc(100% - 16px - 26px);
    overflow-y: auto;
}

/* PAGES */
.SdsPage {
    height: calc(100vh - var(--AppbarHeight));
    overflow: auto;
    padding: 0px;
}

.SdsPageList {
    overflow-y: hidden;
}

/* GRID */
.SdsGrid {
    display: flex;
    flex-direction: row;
    background-size: auto 400px;
    background-position: top;
}

.Table {
    flex: 1;
    overflow-x: auto;
    margin: 8px 8px 0px 8px;
}

.SdsGridPaginator {
    height: var(--SdsGridPaginatorHeight);
}

.Filter {
    flex: 1;
    overflow-y: auto;
}

.Grouping {
    height: 30%;
    overflow-y: auto;
}

.FilterItems {
    gap: 8px;
    display: flex;
    flex-direction: column;
}

.FilterItems > :first-child {
    margin-bottom: 0px;
}

.GroupingItems {
    gap: 8px;
    display: flex;
    flex-direction: column;
    background: none;
}

.GroupingItems > :first-child {
    margin-bottom: 0px;
}

.SdsGridRow {
    cursor: pointer;
}
.SdsGridRow.Selected {
    background-color: var(--mud-palette-info-hover);
}
.SdsGridRow:hover {
    background-color: var(--mud-palette-info-hover);
}
.SdsGridRow.HighlightFirst {
    background-color: #C3FBBC;
}

/* NOTA */
.SdsNotaList {
    height: calc(100vh - var(--AppbarHeight) - var(--TabHeaderHeight) - 8px);
    display: flex;
    flex-direction: row;
    background-size: auto 400px;
    background-position: top;
}

.Nota {
    flex: 1;
    overflow-x: auto;
    margin: 0px;
}

.SdsNotaListOptions {
    width: 15%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.NotaList {
    flex: 1;
    overflow-y: auto;
}

.NotaListItemSel {
    border-left: 4px solid #0094fdff !important;
}

/* MEMO */
.SdsMemoField {
    height: 100%;
}

.SdsMemoField .mud-input-control-input-container {
    height: 100%;
}

.SdsMemoField .mud-input.mud-input-text.mud-input-underline.mud-shrink.mud-typography-subtitle1 {
    height: 100%;
}

.SdsMemoField .mud-input > textarea.mud-input-root {
    height: 100%;
}

/* TIMERFIELD */
.SdsTimerField {
    width: 110px;
    height: fit-content;
    display: inline-flex;
    align-items: baseline;
}

/* DATE PICKER E TIME PICKER */
.sds-date-input {
    flex: 0 0 120px;
    width: 120px;
}
.sds-date-input > * {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}
.sds-date-input-day {
    flex: 0 0 148px;
    width: 148px;
}
.sds-date-input-day > * {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}
.sds-time-input {
    flex: 0 0 80px;
    width: 80px;
}
.sds-time-input > * {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}

/* COSTANTI */
:root {
    --SdsGridPaginatorHeight: 44px;
    --AppbarHeight: 64px;
    --TabHeaderHeight: 48px;
    --DialogHeader: 192px;
    --SdsGridMargins: 16px;
    --SdsGridHeight: calc(100vh - var(--AppbarHeight) - var(--SdsGridPaginatorHeight) - 24px);
    --SdsGridHeightSub: calc(100vh - var(--AppbarHeight) - var(--TabHeaderHeight) - var(--SdsGridPaginatorHeight) - 24px);
    --SdsGridHeightRic: calc(100vh - var(--DialogHeader) - var(--SdsGridPaginatorHeight) - 24px);
    --SdsGridHeightDestinatario: calc(100vh - var(--DialogHeader) - var(--SdsGridPaginatorHeight) - 24px - 168px);
    --SdsGridHeightRichiesta: calc(100vh - var(--DialogHeader) - var(--SdsGridPaginatorHeight) - 24px);
}


@media only screen and (max-width: 600px) {

    :root {
        --SdsGridHeight: calc(100vh - 166px);
        --SdsGridHeightSub: calc(100vh - 218px);
        --SdsGridHeightRic: calc(100vh - 288px);
        --SdsGridHeightDestinatario: calc(100vh - 288px - 168px);
        --SdsGridHeightRichiesta: calc(100vh - 288px);
    }
}

/* ADORMENT */
.mud-input-adornment-icon-button.mud-no-activator {
    padding: 0px;
    margin-right: 0px;
}
.mud-input-adornment-icon-button.mud-no-activator:hover {
    background-color: transparent;
    color: var(--mud-palette-info) !important;
}
.mud-input-adornment-icon-button.mud-no-activator:focus-within {
    background-color: transparent;
    color: var(--mud-palette-info) !important;
}
.mud-input-adornment-icon-button.mud-no-activator:active {
    background-color: transparent;
}

/* DIALOG */
.sds-dialog-white {
    background-color: #ffffffff !important;
    color: #424242ff !important;
}

.sds-dialog-light .mud-dialog-content {
    background-color: #f2f9feff !important;
}

.sds-dialog-dark .mud-dialog-content {
    background-color: #32333dff !important;
}

.DlgRicerca .mud-dialog-content {
    border-radius: 0;
    margin: 0px;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.8);
}

.DlgRicerca .mud-dialog-title {
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 8px;
}

/* POPOVER */
.chatitem-hoverarea {
    cursor: pointer !important;
    background-color: var(--mud-palette-appbar-background);
    color: var(--mud-palette-appbar-text);
    transition: opacity 0.2s ease;
    opacity: .8;
}

/*GRID OPTIONS*/
.mud-button-root.mud-icon-button.mud-icon-button-size-small.filter-button {
    visibility: hidden;    
    width: 0px;
    margin: 0px;
    padding: 0px;
}

/* CHIPSET ORIZZONTALE */
.sdschip-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    height: 48px;
    width: 100%;
    box-sizing: border-box;
}

.sdschip-scroll {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    align-content: center;
}

.sdschip-searchbtn {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 1;
}

/* SELECT */
.sds-select .mud-chip-content {
    justify-content: flex-start !important;
}

.sds-select .mud-input-slot {
    height: 32px !important;
}

.sds-select-item {
    height: 40px;
    width: 100%;
}

.sds-select-chip {
    margin: 0;
    width: 100%;
    justify-content: flex-start !important;
}

/* FILTRO TESTO IN ELENCO */
.sds-input-slot {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sds-label-container {
    display: flex;
    justify-content: space-between;
    align-items: end;
    position: relative;
}

.sds-label {
    font-size: 0.77rem;
    color: var(--mud-palette-primary);
    transform: translateY(-4px);
    transition: color 0.3s ease;
}

.sds-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mud-palette-text-primary);
    display: flex;
    align-items: center;
    transition: color 0.3s ease, transform 0.2s ease;
}

.sds-search-btn:hover {
    color: var(--mud-palette-primary);
    transform: scale(1.1);
}

.sdschip-scroll-vertical {
    max-height: calc(3 * 40px);
    overflow-y: auto;
    flex: 1;
}

.sdschip-stack .mud-chip {
    width: calc(100% - 8px);
}

.sdschip-stack .mud-chip-content {
    display: flex !important;
    justify-content: space-between !important;
    width: 100%;
}

.sdschip-stack .sdschip-text {
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sds-underline {
    height: 2px;
    background-color: var(--mud-palette-primary);
    margin-top: 2px;
    width: 100%;
}

.sds-input-slot.blurred .sds-label {
    color: var(--mud-palette-text-primary);
}

.sds-input-slot.blurred .sds-underline {
    background-color: var(--mud-palette-lines-inputs);
    height: 1px;
}

.sds-input-slot.focused .sds-label {
    color: var(--mud-palette-primary);
}

.sds-input-slot.focused .sds-underline {
    background-color: var(--mud-palette-primary);
}

/* DATE PICKER */
.sds-date-picker-container {
    padding: 8px 20px 8px 20px;
    background-color: var(--mud-palette-primary);
    min-height: 88px;
}

.sds-date-picker-title {
    color: white;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    font-size: large;
}

.sds-date-picker-selectlbl {
    color: white;
    align-content: center;
}

.sds-date-picker-container .mud-input-slot,
.sds-date-picker-container .mud-input-label,
.sds-date-picker-container .mud-select-input svg {
    color: white !important;
}

/* COMPOSE AREA */
.sds-compose {
    border-radius: 10px;
    box-shadow: var(--mud-elevation-6);
    background: var(--mud-palette-surface);
    transition: all 200ms ease-in-out;
    height: 512px;
}

.sds-compose-minimized {
    position: fixed;
    right: 16px;
    bottom: 16px;
    height: 40px;
    width: 320px;
    z-index: 1025;
    padding: 8px 10px;
}

.sds-compose-normal {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: clamp(400px, 48vw, 800px);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1025;
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.sds-compose-maximized {
    position: fixed;
    inset: 0; 
    margin: auto;
    width: 70vw;
    max-width: 1152px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1035;
    padding: 14px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.sds-compose-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.sds-compose-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.4);
    z-index: 1030;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sds-compose-titlebar {
    margin-bottom: 8px;
}

.sds-compose-actionbtn {
    width: 48px;
    height: 48px;
}

.sds-compose-icon {
    padding: 12px;
    width: 48px;
    height: 48px;
    color: var(--mud-palette-action-default);
}

@media (max-width: 600px) {
    .sds-compose-normal .sds-compose-maximized {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        z-index: 1028;
        padding: 12px;
    }
}

.sdschip-evento .mud-chip-content {
    display: flex !important;
    justify-content: space-between !important;
    width: 100%;
}

.sdschip-evento .sdschip-text {
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* UPLOAD */
.file-upload-input {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 10;
    opacity: 0;
    cursor: pointer !important;
}

/* BADGE */
.sds-badge-container {
    position: relative;
    display: inline-block;
}

.sds-avatar {
    border: 1px solid #DCDCDC;
}

.sds-badge-icon {
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 20px;
    height: 20px;
    font-size: 14px;
    padding: 2px;
    border-radius: 50%;
    border: 1px solid #DCDCDC;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CUSTOM FIELDS */
.sds-field-container {
    position: relative;
    height: 40px;
    width: 100%;
    box-sizing: border-box;
}

.sds-field-chip {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 32px);
    white-space: nowrap;
    text-align: left !important;
    justify-content: flex-start !important;
    text-overflow: ellipsis;
}

.sds-field-actions {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.sds-field-action {
    color: rgba(0, 0, 0, 0.54);
    cursor: pointer;
    transition: color 0.2s ease;
}

.sds-field-action:hover {
    color: #2196F3 !important;
}

/*BTN 3 ICONE*/
.btn-enhanced .mud-button-label {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: none;
    padding: 0px !important;
}

.btn-enhanced-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* DX HTML EDITOR */
dxbl-adaptive-container.dxbl-btn-toolbar.dxbl-btn-plain-toolbar.dxbl-adaptive-container.dxbl-adaptive-state-no-text-seq {
    padding: 0;
}

.sds-sched-item-horiz {
    font-family: Urbanist, 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}
.sds-sched-item-vert {
    font-family: Urbanist, 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}
.sds-sched-item-subject {
    font-weight: bold !important;
}
.sds-sched-item-status {
    padding: 3px;
}
.sds-sched-item-desc {
    white-space: pre-line;   
}
.sds-sched-item-time {
    width: fit-content;
    margin: 0px;
    border-radius: 8px !important;
    height: 20px !important;
}
.sds-sched-item-time svg.mud-icon-root.mud-svg-icon.mud-icon-size-small.mud-chip-icon {
    font-size: 0.8rem;
}
.sds-sched-item-time .mud-chip-content {
    font-size: 10px;
    height: 18px !important;
}

/* RADIO */
.sds-radio-row {
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}
.sds-radio-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sds-radio-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    flex-shrink: 0;
}