/* Custom classes */

.cc-inactiveLink {
    pointer-events: none;
    cursor: default;
}

.cc-hide {
    visibility: hidden
}

.sticky-top.cc-under-header {
    top:120px;
}

input::-webkit-outer-spin-button.cc-disguise-input ,
input::-webkit-inner-spin-button.cc-disguise-input {
    -webkit-appearance: none;
    margin: 0;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicatsor {
    display: none;
    -webkit-appearance: none;
}

input[type=number].cc-disguise-input {
    -moz-appearance: textfield;
}

input.cc-disguise-input {
    box-shadow:0 0 0 0 #0000 !important;
    border-bottom: #0000 !important;
    background-color: #0000 !important;
    font-weight: 600;
    color: #1a1a1a;
    opacity: 0.65;
}

.form-check [type="checkbox"].cc-create-check:checked + label::after {
    border-color: rgb(0, 128, 85) !important;
    background-color: rgb(0, 128, 85) !important;
}

.form-check [type="checkbox"].cc-delete-check:not(:checked) + label::after {
    border-color: hsl(350deg, 60%, 50%) !important;
}

body{
    overflow-x: clip;
}

form[disabled] {
    opacity: 0.65;
    pointer-events: none;
}

.cc-bg-image-full {
    background-position: center center;
    background-repeat: no-repeat;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
}

.cc-bg-dark {
    background-color: #222!important;
}

.cc-mx-background-top-linear {
    background: -webkit-linear-gradient(100deg, hsl(160deg, 100%, 24%) 70%, #f9f9f5 70.1%);
    background: -webkit-linear-gradient(right, hsl(160deg, 100%, 24%) 70%, #f9f9f5 70.1%);
    background: linear-gradient(100deg, hsl(160deg, 100%, 24%) 70%, #f9f9f5 70.1%);
}

.cc-hr-blurry {
    height: 1px;
    border: 0;
    background-image: linear-gradient(to left, transparent, #000, transparent);
}
 
.form-check.form-check-group>label.cc-export-radio::before {
    left: 0px;
    top: 6px;
}

.form-check.form-check-group>label.cc-export-radio::after {
    left: 0px;
    top: 6px;
}
.form-check.form-check-group>label.cc-export-radio {
    padding-left: 40px;
}
.card::after {
    margin: 0 !important;
}

.table input,
.table select {
    box-shadow: inset 0 -15px 15px -15px rgba(0, 0, 0, 0.1); 
    border-radius: 5px;
}

.cc-grayscale-0 {
    transition: 0.5s;
    filter: grayscale(0%) opacity(100%);
}

.cc-grayscale-1 {
    transition: 0.5s;
    filter: grayscale(10%) opacity(95%);
}

.cc-grayscale-2 {
    transition: 0.5s;
    filter: grayscale(20%) opacity(90%);
}

.cc-grayscale-3 {
    transition: 0.5s;
    filter: grayscale(30%) opacity(85%);
}

.cc-grayscale-4 {
    transition: 0.5s;
    filter: grayscale(40%) opacity(80%);
}

.cc-grayscale-5 {
    transition: 0.5s;
    filter: grayscale(50%) opacity(75%);
}

.cc-grayscale-6 {
    transition: 0.5s;
    filter: grayscale(60%) opacity(70%);
}

.cc-grayscale-7 {
    transition: 0.5s;
    filter: grayscale(70%) opacity(65%);
}

.cc-grayscale-8 {
    transition: 0.5s;
    filter: grayscale(80%) opacity(60%);
}

.cc-grayscale-9 {
    transition: 0.5s;
    filter: grayscale(90%) opacity(55%);
}

.cc-grayscale-10 {
    transition: 0.5s;
    filter: grayscale(100%) opacity(50%);
}

.cc-floating {
    
    position: fixed;
    bottom: 28px;
    right: 32px;
    z-index: 99;
    transition: all 0.2s ease-in-out;
    
    display: flex;
    flex-direction: row;
    gap: 8px;
    flex-wrap: nowrap;
    
    .btn {
        border: 4px solid #FFF;
        border-radius: 8px;
        box-sizing: border-box;
        translate: 0px 0px;
        transition: all 0.2s ease-in-out;


        span {
            margin-right: 8px;
        }
        
    }
    
    .btn::before {
        z-index: 98;
        background-color: #fff !important;
    }

    .btn:hover {
        translate: 0px -2px;
    }

    @media (max-width: 768px) {
        /* md */
        
        .btn {
    
            width: 48px !important;
            height: 48px !important;
            padding: 0px;
            margin-bottom: -4px !important;
            border-radius: 50%;
            
            display: flex;
            align-items: center;
            justify-content: center;
            
            .icon {
                margin: 0px !important;
            } 

            span {
                display: none;
            }
            
        }

    }

}


.cc-floating.cc-back-to-top,
.cc-floating.fab
{
    right: 104px;
}

body:not(.fullscreen) .cc-floating.cc-back-to-top.with-users-list {
    right: calc(var(--sidebar-width) + 104px);
}

.back-to-top {
    box-shadow: 0 0 0 4px var(--bs-white) !important;
}

@media (max-width: 1400px) {
    body:not(.fullscreen) .cc-floating.cc-back-to-top.with-users-list
    {
        right: 72px;
    }
}

body:not(.fullscreen) .cc-floating.with-users-list {
    right: calc(var(--sidebar-width) + 32px);
}

@media (max-width: 1400px) {
    body:not(.fullscreen) .cc-floating.with-users-list {
        right: 32px;
    }
}
body:not(.fullscreen) .back-to-top.with-users-list,
body:not(.fullscreen) .fab.with-users-list
{
    right: calc(var(--sidebar-width) + 32px);
}

@media (max-width: 1400px) {
    body:not(.fullscreen) .back-to-top.with-users-list,
    body:not(.fullscreen) .fab.with-users-list {
        right: 16px;
    }
}

@media (max-width: 1200px) {

    .cc-floating {
        bottom: 16px;
        right: 16px;
    }
    
    .cc-floating.cc-back-to-top {
        right: 72px;
    }
    
    .cc-floating .btn {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        transition: all 0.2s ease-in-out;
    }

}

.table td {
    transition: border-color 0.2s
}

.table .table-borderless td {
    border-bottom-color: #fff0 !important;
}

.table.cc-disabled-success tr:not(:last-child) {
    input:disabled,
    .select2-selection[aria-disabled="true"] {
        background-color: #00805522 !important; 
    }
}

.datepicker-cell.selected,
.datepicker-cell.selected:hover {
  background-color: hsl(210deg, 100%, 40%);
}

.popover {
    --bs-popover-max-width: 450px !important;
}


.cc-bar-round-start {
    border-top-left-radius: 50em;
    border-bottom-left-radius: 50em;
}

.cc-bar-round-end {
    border-top-right-radius: 50em;
    border-bottom-right-radius: 50em;
}

.cc-bar-giornaliera-bar {
    height: 12px;
    margin-top: 3px;
    margin-bottom: 3px;
    transition: all 0.2s ease;
}

.cc-bar-giornaliera-bar:hover {
    height: 20px !important;
    margin-top: 0px !important; 
    margin-bottom: 0px !important;
    padding-bottom: 2px;
}

label.force-active {
    transform: translateY(-75%);
    font-size: 0.777rem;
    color: #1a1a1a;
}
/* Select2 classes */

input.select2 {
    box-shadow: none !important; 
    border: 1px solid #ced4da;
    color: #212529 !important;
    height: calc(1.5em + 0.75rem + 2px);
    font-weight: 400;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #fff;
}


.select2-container .select2-selection--single {
    overflow: hidden !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    overflow: hidden !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    display:inline-block;
}

li.select2-results__option[role="option"] {
    font-size: 0.8rem !important;
    padding-left: 1.25rem !important;
    overflow-wrap: anywhere;
    hyphens: auto;
}

strong.select2-results__group {
    line-height: 2rem !important;
}
.select2-hidden-accessible {
    width: 100% !important;
}
input.select2:disabled {
    background-color: #e9ecef;
}

.select2-results__group {
    color: #06c !important;
}

/*Select2 ReadOnly Start*/

select[readonly].select2-hidden-accessible + .select2-container {
    pointer-events: none;
    touch-action: none;
}

.select-wrapper:has(select[readonly].select2-hidden-accessible + .select2-container) {
    cursor: not-allowed;
}

select[readonly].select2-hidden-accessible + .select2-container .select2-selection {
    background-color: #fff0;

    border-radius: 0%;

    border-top: 0px solid #fff0;
    border-left: 0px solid #fff0;
    border-right: 0px solid #fff0;
    border-bottom: 1px solid rgb(93, 112, 131);

    box-shadow: none;
}

select[readonly].select2-hidden-accessible + .select2-container .select2-selection .select2-selection__rendered {
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--bs-body-font-family);
    color: #5d7083;
}


select[readonly].select2-hidden-accessible + .select2-container .select2-selection__arrow, select[readonly].select2-hidden-accessible + .select2-container .select2-selection__clear {
    display: none;
}
.select2-results__option--group:not(:has(li:not(.select2-results__option--disabled))) {
    display: none;
}

.select2-results__options>.select2-results__option--group {
    position: relative !important;
    
    .select2-results__group {
        position: sticky;
        top: -3px;

        text-overflow: ellipsis;
        white-space: nowrap;
        
        /*background: white;*/
        box-shadow: 0 0 0 0 black;
        width:auto;
        padding-right: 1rem !important;
        border-bottom-right-radius: 1rem;
        z-index: 0;
        
        
        &:before {
            position: absolute;
            z-index: -1;
            top: 3px;
            left: 0px;
            bottom: 0px;
            right: 0px;
            border-bottom-right-radius: 1rem;
            content: '';
            padding: 3px;
            background: white;
        }
        
        &:after {
            position: absolute;
            z-index: -2;
            top: 3px;
            left: 0px;
            bottom: -3px;
            right: -3px;
            border-bottom-right-radius: calc(1rem + 3px);
            content: '';
            padding: 3px;
            background: linear-gradient(
                -11.25deg,
                var(--bs-primary),
                white,
                white
            );
        }
    }
}
/*Select2 ReadOnly End*/

input[type="checkbox"][readonly]{
    pointer-events: none;
    cursor: default;
}

input[type="checkbox"][readonly] + label{
    pointer-events: none;
    cursor: default;
    opacity: 0.65;
}


input.select2:focus {
  border-color: #86b7fe !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection, .select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: #86b7fe !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected, .select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true]:not(.select2-results__option--highlighted) {
    background-color: hsl(210deg, 100%, 40%);
}

.select2-option--single {
    border: 1px solid #ced4da66 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0'%3e%3cpath fill='black' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1' d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e") !important;
    /*pointer-events: none !important;*/
    cursor: default !important;
}

/* Bootstrap Italia classes */

.accordion {
    --bs-accordion-bg: #fff0;
}
.form-group.form-check label.active {
    transform: translateY(0) !important;
}

.toggles label input[type="checkbox"] + .lever.left {
    float: left !important;
}

.chip-label {
    overflow: clip;
    overflow-clip-margin: 0.5rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    display: inline-block;
}

.chip.chip-primary .icon {
    fill: hsl(210, 100%, 40%);
    transition: color 0.1s;
}
.chip.chip-secondary .icon {
    fill: hsl(210deg, 17%, 44%);
    transition: color 0.1s;
}
.chip.chip-success .icon {
    fill: hsl(160deg, 100%, 25%);
    transition: color 0.1s;
}
.chip.chip-danger .icon {
    fill: hsl(350deg, 60%, 50%);
    transition: color 0.1s;
}
.chip.chip-warning .icon {
    fill: hsl(36deg, 100%, 30%);
    transition: color 0.1s;
}

.chip:hover .icon {
    fill: hsl(210, 0%, 100%);
    transition: color 0.1s;
}

.btn .icon {
    transition: fill 0.1s;
}

.btn.btn-primary .icon {
    fill: hsl(210, 0%, 100%);
}
.btn.btn-secondary .icon {
    fill: hsl(210, 0%, 100%);
}
.btn.btn-success .icon {
    fill: hsl(210, 0%, 100%);
}
.btn.btn-danger .icon {
    fill: hsl(210, 0%, 100%);
}
.btn.btn-warning .icon {
    fill: hsl(210, 0%, 100%);
}

.btn.btn-outline-primary .icon {
    fill: var(--bs-primary);
}
.btn.btn-outline-secondary .icon {
    fill: var(--bs-secondary);
}
.btn.btn-outline-success .icon {
    fill: var(--bs-success);
}
.btn.btn-outline-danger .icon {
    fill: var(--bs-danger);
}
.btn.btn-outline-warning .icon {
    fill: var(--bs-warning);
}

.bg-primary .btn-primary {
    background-color: var(--bs-white);
    color: var(--bs-primary);
}

.bg-primary .btn-secondary {
    background-color: var(--bs-white);
    color: var(--bs-secondary);
}

.bg-primary .btn-danger {
    background-color: var(--bs-white);
    color: var(--bs-danger);
}

.popover-body .btn-primary {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.popover-body .btn-secondary {
    background-color: var(--bs-secondary);
    color: var(--bs-white);
}

.popover-body .btn-danger {
    background-color: var(--bs-danger);
    color: var(--bs-white);
}

.accordion-button .cc-accordion-success {
    --bs-accordion-color: white !important;
    --bs-accordion-bg: #1f9c70 !important;
    --bs-accordion-active-color: white;
}

.accordion-button.cc-centered-text::after {
    margin-left: 12px;
    text-align: center;
}

.page-item:not(.disabled) {
    cursor: pointer;
}

textarea.form-control {
    border: 1px solid #5b6f82;
    border-radius: 4px;
}
.form-control::file-selector-button {
    background-color: var(--bs-primary);
    color: var(--bs-white);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.form-control::file-selector-button:active, input[type="file"]::-webkit-file-upload-button:active {
    background-color: #0053a5;
    color: #fff;
    border-color: #004d99;
}

[disabled]:not(.select2) {
    opacity: 0.65;
    pointer-events: none;
}

@media (max-width: 576px) {
    /* sm */
    .text-truncate-sm {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block !important;
        max-width: 10vw;
    }
    
}

@media (max-width: 768px) {
    /* md */
    .text-truncate-md {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block !important;
        max-width: 10vw;
    }
    
}

@media (max-width: 992px) {
    /* lg */
    .text-truncate-lg {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block !important;
        max-width: 10vw;
    }
    
}

@media (max-width: 1200px) {
    /* xl */
    .text-truncate-xl {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block !important;
        max-width: 10vw;
    }
    
}

@media (max-width: 1400px) {
    /* xxl */
    .text-truncate-xxl {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block !important;
        max-width: 10vw;
    }
    
}

.fade:not(.show) {
    pointer-events: none;
}

.bootstrap-table .cc-header-secondary thead tr {
    background-color: var(--bs-secondary) !important;
    color: white;
}

.fixed-table-body {
    border-top-left-radius: 4px !important;
    border-top-right-radius: 4px !important;
}
.bootstrap-table .cc-header-secondary thead th .sortable {
    cursor: pointer;
    background-position: right;
      background-position-x: right;
      background-position-y: center;
    background-repeat: no-repeat;
    padding-right: 30px !important;
    color: white;
}

.bootstrap-table .cc-header-secondary .fixed-table-container .table thead th .asc {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='12' viewBox='0 0 16 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m 9,7 -4,4 -4,-4' fill='white' fill-opacity='0.33'/%3E%3Cpath d='m 1,5 4,-4 4,4' fill='white' fill-opacity='1.0'/%3E%3C/svg%3E") !important;
    
}

.bootstrap-table .cc-header-secondary .fixed-table-container .table thead th .desc {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='12' viewBox='0 0 16 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m 9,7 -4,4 -4,-4' fill='white' fill-opacity='1.0z'/%3E%3Cpath d='m 1,5 4,-4 4,4' fill='white' fill-opacity='0.33'/%3E%3C/svg%3E") !important;
}

.bootstrap-table .cc-header-secondary .fixed-table-container .table thead th .both {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='12' viewBox='0 0 16 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m 9,7 -4,4 -4,-4' fill='white' fill-opacity='0.5'/%3E%3Cpath d='m 1,5 4,-4 4,4' fill='white' fill-opacity='0.5'/%3E%3C/svg%3E");
}

.bootstrap-table .fixed-table-pagination .pagination .page-item.active {
    background-color: var(--bs-primary) !important;
    border-radius: 4px !important;
}

.bootstrap-table .fixed-table-pagination .pagination .page-item.active>.page-link {
    color: white !important;
}

.bootstrap-table .fixed-table-pagination .page-list .dropdown-item.active {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

.cc-scroll-shadow, 
.popover .popover-body {

    background:
    /* Shadow Cover TOP */
    linear-gradient(
      white 30%,
      rgba(255, 255, 255, 0)
    ) center top,
    
    /* Shadow Cover BOTTOM */
    linear-gradient(
      rgba(255, 255, 255, 0), 
      white 70%
    ) center bottom,
    
    /* Shadow TOP */
    radial-gradient(
      farthest-side at 50% 0,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0)
    ) center top,
    
    /* Shadow BOTTOM */
    radial-gradient(
      farthest-side at 50% 100%,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0)
    ) center bottom;
  
  background-repeat: no-repeat;
  background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  background-attachment: local, local, scroll, scroll;
  
}

.deleted {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(75%) brightness(0.9) blur(1px) !important;
    box-shadow: inset 0 0 8px 0px rgba(255, 255, 255, 1) !important;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* To be used as follows: 

    <element class="row cc-wide-active-container cc-animated"> - Animated is buggy
    …
        <element class="col cc-wide-active-item">
        …
            <element class="active"> - optional
            …
                <element class="cc-wide-active-text"> - to hide part of the item

*/

/* lg */
@media (min-width: 768px) {
    
    .cc-wide-active-container:not(:hover):not(:has(.active)) .cc-wide-active-item {
        flex: 1 0 0%;
    }

    .cc-wide-active-container.cc-animated .cc-wide-active-item, 
    .cc-wide-active-container.cc-animated .cc-wide-active-text {
        transition: all 0.25s ease;
    }

    .cc-wide-active-container:not(.cc-show-all).cc-wide-active-text,
    .cc-wide-active-container:not(.cc-show-all) .cc-wide-active-item
    {
        flex: 0 0 auto;
    }

    .cc-wide-active-container:not(.cc-show-all).cc-wide-active-text:not(.active):not(:hover),
    .cc-wide-active-container:not(.cc-show-all) .cc-wide-active-item:not(.active):not(:hover)
    {
        min-width: 0px;
    }

    .cc-wide-active-container.cc-short .cc-wide-active-text,
    .cc-wide-active-container.cc-short .cc-wide-active-item
    {
        overflow: hidden;
    }

    .cc-wide-active-container:not(.cc-show-all):not(.cc-animated) .cc-wide-active-text:not(.text-truncate) {
        display:none;
    }

    .cc-wide-active-container:not(.cc-show-all):not(.cc-animated) .cc-wide-active-text.text-truncate {
        display:block-inline;
        overflow: hidden;
        white-space: nowrap;
        max-width: 0px;
        padding-left: 0px;
        padding-right: 0px;
    }

    .cc-wide-active-container:not(.cc-show-all) .cc-wide-active-text {
        display: block-inline;
        overflow: hidden;
        white-space: nowrap;
        max-width: 0px;
        padding-left: 0px;
        padding-right: 0px;
    }

    .cc-wide-active-container:not(.cc-show-all) .cc-wide-active-item {
        flex: 1 0 0%;
    }

    .cc-wide-active-container.cc-short .cc-wide-active-item,
    .cc-wide-active-container.cc-minwidth .cc-wide-active-item {
        flex: 0 0 auto;
        width: auto;
    }

    .cc-wide-active-container:not(.cc-show-all):not(:hover) .cc-wide-active-item .active .cc-wide-active-text,
    .cc-wide-active-container:not(.cc-show-all) .cc-wide-active-item:hover .cc-wide-active-text {
        display:initial;
        flex: 1 0 0%;
        background-size: 128px 128px;
    }

    .cc-wide-active-container:not(.cc-minwidth):not(:hover) .cc-wide-active-item:has(.active),
    .cc-wide-active-container:not(.cc-minwidth) .cc-wide-active-item:hover {
        flex: 1 0 0%;
    }

    .cc-wide-active-container:not(:hover) .cc-wide-active-item .active .cc-wide-active-text,
    .cc-wide-active-container .cc-wide-active-item:hover .cc-wide-active-text {
        max-width: 20vw;
    }

    .cc-wide-active-container .row:has(.cc-wide-active-item) {
        flex-wrap: nowrap !important;
    }

}


/* Floating cards */

.cc-floating-card.card-wrapper {
    perspective: 1000px;
}

a .cc-floating-card.card-wrapper .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s cubic-bezier(0.39, 0.575, 0.565, 1);
    transform-style: preserve-3d;
}

a:hover .cc-floating-card.card-wrapper .card {
    transform: translateY(-5px) rotateX(8deg);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s cubic-bezier(0.12, 0, 0.39, 0);
    opacity: 0.925;
}

a:not(:hover) .cc-floating-card.card-wrapper .card {
    opacity: 1;
}

a:hover .cc-floating-card.card-wrapper.cc-small .card  {
    transform: translateY(-2px) rotateX(8deg);
}

a .cc-floating-card.card-wrapper.cc-small .card {
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

a.disabled .cc-floating-card.card-wrapper .card {
    margin-top: 8px;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
}

a:not(.complete).disabled .cc-floating-card.card-wrapper .card {
    background-color: #fff0;
}

a.disabled:has(.cc-floating-card) {
    pointer-events: auto;
    cursor: default
}

a:hover:not(.disabled) .cc-floating-card.card-wrapper.cc-small .card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


.card-wrapper.cc-hover-card .card {
    transition: all 0.3s ease;
    z-index: 1;
}

.card-wrapper.cc-hover-card:hover .card,
.btn-group:has(input[required] + .btn-danger):hover::after
{
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Card highlight */

a:has(.cc-floating-card) {
    text-decoration: none;
}

a.active .cc-floating-card .card {
    background-color: var(--bs-primary) !important;
}

a .cc-floating-card .card {
    transition: opacity 0.3s ease-in-out;
    background-image: linear-gradient(to right, #fff0, #fff2, #fffb, #ffff, #fffb, #fff2, #fff0);
    background-size: calc(100vw) 8px;
    background-repeat: no-repeat;
    background-position-y: calc(100% - 8px);
    background-position-x: calc(-100vw);
}

a.complete .cc-floating-card .card {
    background-color: var(--bs-success);
    background-position-x: calc(200vw);
    transition: all 0.3s ease, opacity 0.3s ease-in-out, background-position 1s ease-in-out;
}

a .cc-floating-card .card::after,
.btn-group:has(input[required] + .btn-danger)::after {
    content: "";
    display: block;
    position: absolute;
    top: -12px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: var(--bs-danger);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' fill-rule='evenodd' d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0M7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.553.553 0 0 1-1.1 0z'/%3E%3C/svg%3E");
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position-x: 4px;
    background-position-y: 4px;
    box-shadow: -0px 5px 5px #0000, 0px 0px 32px #f440;
    transition: all 0.3s ease-out;
    opacity: 0;
}

a.invalid .cc-floating-card .card::after,
.btn-group:has(input[required] + .btn-danger)::after {
    content: "";
    color: #fff0;
    text-align: left;
    text-wrap: nowrap;
    font-size: 1rem;
    overflow: clip;
    display: block;
    position: absolute;
    top: -8px;
    box-shadow: -0px 3px 3px #0004, 0px 0px 32px #f448;
    padding-left: 32px;
    padding-top: 3px;
    opacity: 1;
    z-index: 10;
}


a.invalid:hover .cc-floating-card .card::after,
.btn-group:has(input[required] + .btn-danger):hover::after {
    content: "Incompleto";
    color: white;
    display: block;
    position: absolute;
    top: -16px;
    right: -11px;
    width: 128px;
    height: 36px;
    border-radius: 8px;background-size: 32px 32px;
    background-position-x: 2px;
    background-position-y: 2px;
    box-shadow: -0px 10px 8px #0001, 0px 0px 32px 2px #f008;
}

a.invalid[data-bs-toggle="tab"]:not(:has(.cc-floating-card))::after {
    content: "!";
    background: var(--bs-danger);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    align-content: center;
    box-shadow: 0px 4px 2px #0001, 0px 0px 8px 2px #f002;
    margin-left: 8px;
    /*padding-left: 10px;*/
    color: var(--bs-white);
}

a.complete.disabled .cc-floating-card .card {
    opacity: 0.65;
}

a .cc-floating-card .card::before {
    transition: all 0.75s ease-in-out;
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/assets/icons/check.png');
    background-size: 128px 128px;
    background-position: left top;
    background-position-x: -10px;
    background-position-y: -20px;
    background-repeat: no-repeat;
    opacity: 0;
}


a.complete .cc-floating-card .card::before {
    background-size: 80px 80px;
    background-position-x: 0;
    background-position-y: 0;
    opacity: 0.5;
}

a.complete:hover .cc-floating-card .card::before {
    background-size: 128px 128px;
    background-position-x: -16px;
    background-position-y: -16px;
    opacity: 0.8;
    transition: all 0.5s ease;
}

a.active .cc-floating-card .card span,
a.complete .cc-floating-card .card span
{
    color: white;
}

a.active .cc-floating-card .card svg {
    fill: white !important;
}

a.active .cc-floating-card .card svg[stroke="white"] {
    stroke: var(--bs-primary) !important;
}


/* Small collapse disabled if screen is big */

@media (min-width: 992px) {
    .accordion-button.cc-small::after {
        content: none;
    }
    .accordion-button.cc-small {
        pointer-events: none;
    }
}

/* buttons changing color on hover */

button.rounded-pill.btn-outline-primary:hover {
    color: var(--bs-white);
    background-color: var(--bs-primary);
    box-shadow: inset 0 0 0 2px var(--bs-primary);
}

button.rounded-pill.btn-outline-secondary:hover {
    color: var(--bs-white);
    fill: var(--bs-white);
    background-color: var(--bs-secondary);
    box-shadow: inset 0 0 0 2px var(--bs-secondary);
}

button.rounded-pill.btn-outline-success:hover {
    color: var(--bs-white);
    background-color: var(--bs-success);
    box-shadow: inset 0 0 0 2px var(--bs-success);
}

button.rounded-pill.btn-outline-danger:hover {
    color: var(--bs-white);
    background-color: var(--bs-danger);
    box-shadow: inset 0 0 0 2px var(--bs-danger);
}

button.rounded-pill.btn-outline-warning:hover {
    color: var(--bs-white);
    background-color: var(--bs-warning);
    box-shadow: inset 0 0 0 2px var(--bs-warning);
}

button.rounded-pill.btn-outline-info:hover {
    color: var(--bs-white);
    background-color: var(--bs-info);
    box-shadow: inset 0 0 0 2px var(--bs-info);
}

button.rounded-pill.btn-outline-light:hover {
    color: var(--bs-black);

    .icon {
        fill: var(--bs-black) !important;
    }

    background-color: var(--bs-light);
    box-shadow: inset 0 0 0 2px var(--bs-light);
}

button.rounded-pill.btn-outline-dark:hover {
    color: var(--bs-white);
    background-color: var(--bs-dark);
    box-shadow: inset 0 0 0 2px var(--bs-dark);
}

button.rounded-pill:hover .icon {
    fill: var(--bs-white) !important;
}

/* Invalid doc input button */
input.is-invalid + .btn {
    border-color: var(--bs-danger);
    background-color: var(--bs-danger);
    color: var(--bs-white);
    box-shadow: inset 0 0 0 2px var(--bs-danger);
}

input.is-invalid:focus + .btn,
input.is-invalid:active + .btn {
    box-shadow: inset 0 0 0 2px var(--bs-danger);
}


input[hidden].is-invalid ~ .form-feedback {
    display: none;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle) + .btn {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group > .btn:not(:first-child):not(.dropdown-toggle) ~ .btn {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Animated loading dots 
    https://martinwolf.org/before-2018/blog/2015/01/pure-css-savingloading-dots-animation/
*/

@keyframes blink {
    /**
     * At the start of the animation the dot
     * has an opacity of .2
     */
    0% {
      opacity: .2;
    }
    /**
     * At 20% the dot is fully visible and
     * then fades out slowly
     */
    20% {
      opacity: 1;
    }
    /**
     * Until it reaches an opacity of .2 and
     * the animation can start again
     */
    100% {
      opacity: .2;
    }
}

.loading-dots span {
    /**
     * Use the blink animation, which is defined above
     */
    animation-name: blink;
    /**
     * The animation should take 1.4 seconds
     */
    animation-duration: 1.4s;
    /**
     * It will repeat itself forever
     */
    animation-iteration-count: infinite;
    /**
     * This makes sure that the starting style (opacity: .2)
     * of the animation is applied before the animation starts.
     * Otherwise we would see a short flash or would have
     * to set the default styling of the dots to the same
     * as the animation. Same applies for the ending styles.
     */
    animation-fill-mode: both;
}

.loading-dots span:nth-child(2) {
    /**
     * Starts the animation of the third dot
     * with a delay of .2s, otherwise all dots
     * would animate at the same time
     */
    animation-delay: .2s;
}

.loading-dots span:nth-child(3) {
    /**
     * Starts the animation of the third dot
     * with a delay of .4s, otherwise all dots
     * would animate at the same time
     */
    animation-delay: .4s;
}

.badge {
    transition: all 0.3s ease;
}
.badge.cc-clickable-badge {
    cursor: pointer;
}

.badge.cc-clickable-badge:hover {
    transform: translateY(-2px);
}

.callout.callout-highlight.cc-right {
  text-align: right;
  padding-left: 0;
  padding-right: 2.222rem;
  border-left: none;
  border-right: 2px solid #5d7083;
}

.callout.callout-highlight.success {
    border-color: #008055;
}
.callout.callout-highlight.warning {
    border-color: #995c00;
}
.callout.callout-highlight.danger {
    border-color: #cc334d;
}
.callout.callout-highlight.important {
    border-color: #008055;
}
.callout.callout-highlight.note {
    border-color: #06c;
}
#names-list_scrollarea {

    --names-list-scrollarea-bg: var(--bs-primary);
    --names-list-scrollarea-color: white;
    --names-list-scrollarea-border-color: #fff0;

    .list-item.active,
    .accordion-item:has(.accordion-collapse .list-item.active) .accordion-header {
        border-right: solid 5px var(--bs-primary);
        color: var(--bs-primary)
    }

}

.sidebar-linklist-wrapper {

    .link-list-wrapper .list-item {
        padding-left: 24px;
    }
    .link-sublist .list-item {
        padding-left: 48px;
    }

    li:has(.link-sublist a.list-item.active)>.list-item,
    a.list-item.active {
        border-left: solid 5px var(--bs-primary);

        span:not(.badge) {
            color: var(--bs-primary) !important;
            text-decoration: none !important;
        }
    }
    
    a.list-item.active::after {
        background-color: #FFF0 !important;
    }

}

.avatar-wrapper.left .size-xl .avatar-presence {
    left: 60px;
}

.avatar-wrapper.left .size-bg .avatar-presence {
    left: 24px;
}

.avatar-wrapper.left .size-sm .avatar-presence {
    left: 16px;
}


  /*
    paper fold corner
  */

  .fold {
    transition: all ease .5s;
  }
    
  .fold-wrapper {
    transition: filter ease .5s;
  }

  .fold-wrapper:has(.fold.shadow-sm) {
    filter: drop-shadow(0 .125rem .25rem rgba(0,0,0,.075));
  }

  .fold-wrapper:has(.fold.shadow) {
    filter: drop-shadow(0 .5rem 1rem rgba(0,0,0,.15));
  }

  .fold-wrapper:has(.fold.shadow-lg) {
    filter: drop-shadow(0 1rem 3rem rgba(0,0,0,.175));
  }

  .fold-wrapper:has(.fold.shadow-sm):hover {
    filter: drop-shadow(0 .625rem .5rem rgba(0,0,0,.075));
  }

  .fold-wrapper:has(.fold.shadow):hover {
    filter: drop-shadow(0 1rem 1.5rem rgba(0,0,0,.15));
  }

  .fold-wrapper:has(.fold.shadow-lg):hover {
    filter: drop-shadow(0 1.5rem 3.5rem rgba(0,0,0,.175));
  }

  .fold.shadow,
  .fold.shadow-sm,
  .fold.shadow-lg {
    box-shadow: none !important;
  }

  .fold-sm {
    --fold-size: 50px !important;
  }

  .fold {
    --fold-size: 75px;
  }

  .fold-lg {
    --fold-size: 100px !important;
  }

  .fold {
    clip-path: polygon(0 0, calc(100% - var(--fold-size)) 0, 100% var(--fold-size), 100% 100%, 0 100%);
  }

  .fold:hover {
    clip-path: polygon(0 0, calc(100% - var(--fold-size) * 1.5) 0, 100% calc(var(--fold-size) * 1.5), 100% 100%, 0 100%);
  }

  .fold.rounded:before,
  .fold.rounded-2:before {
    border-bottom-left-radius: var(--bs-border-radius);
  }
  
  .fold.rounded-1:before {
    border-bottom-left-radius: var(--bs-border-radius-sm);
  }
  
  .fold.rounded-3:before {
    border-bottom-left-radius: var(--bs-border-radius-lg);
  }
  
  .fold.rounded-4:before {
    border-bottom-left-radius: var(--bs-border-radius-xl);
  }
  
  .fold.rounded-5:before {
    border-bottom-left-radius: var(--bs-border-radius-2xl);
  }
  
  .fold:before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    border-style: solid;
    border-bottom-left-radius: var(--fold-size);
    border-width: 0 var(--fold-size) var(--fold-size) 0;
    border-color: #fff8 var(--fold-bg, var(--bs-white));
    transition: all ease .5s;
    box-shadow: 
        -64px 64px 64px -48px #0004,
        -32px 32px 32px -24px #0002,
        -16px 16px 16px -12px #0001,
        -8px 8px 8px -6px #00000008,
        -4px 4px 4px -3px #00000004,
        -2px 2px 2px -2px #00000002
        ;
    z-index: 2;
  }
  
  .fold:hover:before {
    border-width: 0 calc(1.5 * var(--fold-size)) calc(1.5 * var(--fold-size)) 0;
    border-color: #fffb var(--fold-bg, var(--bs-white));
  }
  
/* Radio Buttons */

label:has( + .btn-group[role="group"]) {
    font-weight: bold;
    margin-right: 16px;
}

.btn-group[role="group"]:has(input[type="radio"]) {
    overflow: hidden;
    border-radius: 100px;
}

.btn-group[role="group"].disabled {

    label.btn {
        cursor: default;
    }

    input:not(:checked) + label.btn {
        display: none;
    }

    input:checked + label.btn {
        border: none !important;
    }
    
}

label.btn.btn-primary {
    --radio-bs-accent: var(--bs-primary);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-secondary {
    --radio-bs-accent: var(--bs-secondary);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-success {
    --radio-bs-accent: var(--bs-success);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-danger {
    --radio-bs-accent: var(--bs-danger);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-warning {
    --radio-bs-accent: var(--bs-warning);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-info {
    --radio-bs-accent: var(--bs-info);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-light {
    --radio-bs-accent: var(--bs-light);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-dark {
    --radio-bs-accent: var(--bs-dark);
    --radio-bs-secondary: var(--bs-white);
}

label.btn.btn-primary-b7 {
    --radio-bs-accent: #1f2933;
    --radio-bs-secondary: var(--bs-white);
}

input + label.btn {
    position: relative;
    color: var(--radio-bs-accent) !important;
    fill: var(--radio-bs-accent) !important;
    background-color: rgba(0, 0, 0, 0) !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

input.disabled + label.btn {
    opacity: 0.65;
    pointer-events: none;
}

input:checked + label.btn {
    background-color: #0000 !important;
    border-color: var(--radio-bs-accent) !important;
    color: var(--radio-bs-secondary) !important;
}

.btn-group[role="group"].outline input:checked + label.btn {
    background-color: #0000 !important;
    border-color: var(--radio-bs-accent) !important;
    color: var(--radio-bs-accent) !important;
}

.btn-group input:checked + label.btn::before {
    content: '';
    position: absolute;
    background-color: var(--radio-bs-accent);
    z-index: -1;
    transition: all 0.2s ease;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
}

.btn-group[role="group"] input:checked + label.btn::before {
    border-radius: 100px;
    @media (max-width: 768px) {
        top: 2px;
        left: 2px;
        right: 2px;
        bottom: 2px;
    }
    @media (min-width: 768px) {
        top: 4px;
        left: 4px;
        right: 4px;
        bottom: 4px;
    }
}

.btn-group input[type='checkbox']:checked:first-of-type + label.btn::before {
    border-top-left-radius: 100px;
    border-bottom-left-radius: 100px;
}

.btn-group input[type='checkbox']:checked:last-of-type + label.btn::before {
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
}

input.disabled:checked + label.btn::before {
    opacity: 0.65;
}

.btn-group[role="group"].outline input:checked + label.btn::before {
    content: '';
    position: absolute;
    @media (max-width: 768px) {
        top: 2px;
        left: 2px;
        right: 2px;
        bottom: 2px;
    }
    @media (min-width: 768px) {
        top: 4px;
        left: 4px;
        right: 4px;
        bottom: 4px;
    }
    /*border-radius: 100px;*/
    border: 2px solid var(--radio-bs-accent);
    background-color: var(--radio-bs-secondary);
    z-index: -1;
    transition: all 0.2s ease;
}
.btn-group[role="group"].changed input:checked + label.btn::before {
    box-shadow: 0 0 128px 32px var(--radio-bs-accent);
}

input:checked + label.btn:hover::before {
    background-color: color-mix(in hsl, var(--radio-bs-accent), black 15%);
}

input[type="checkbox"] + label.btn {
    border: 2px solid var(--radio-bs-accent) !important;
}

.btn-group:not([role="group"]) > input:not(:first-child) + label.btn {
    margin-left: -2px; 
}

.btn-group {
        
    input + label.btn {
        border-top: 2px solid var(--radio-bs-accent) !important;
        border-bottom: 2px solid var(--radio-bs-accent) !important;
    }

    input:first-child + label.btn {
        border-left: 2px solid var(--radio-bs-accent) !important;
    }
    
    input + label.btn:last-child {
        border-right: 2px solid var(--radio-bs-accent) !important;
    }

    input[type="radio"]:first-child + label.btn,
    input[type="checkbox"]:first-child + label.btn
     {
        border-top-left-radius: 100px !important;
        border-bottom-left-radius: 100px !important;
    }
    
    input[type="radio"] + label.btn:last-child,
    input[type="checkbox"] + label.btn:last-child 
    {
        border-top-right-radius: 100px !important;
        border-bottom-right-radius: 100px !important;
    }

    input:not(:first-child) + label:not(:last-child).btn {
        border-radius: 0px !important;
    }

}

.info-tooltip {


    .icon {
        border-radius: 50%;
        transition: all 0.2s ease;
    }

    &:hover {
        .icon {
            box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.5);
        }
    }
    
    &[aria-describedby] {
        
        .icon {
            background-color: var(--bs-primary);
            color: white !important;
            fill: white !important;
        }
        
    }
}

@media (max-width: 768px) {
    .btn-responsive {
        padding: 6px 4px;
    }
}

@media (max-width: 992px) {
    @media (min-width: 768px) {
        .btn-responsive {
            padding: 12px 16px;
        }
    }
}

@media (max-width: 992px) {
    .it-header-center-wrapper {
      height: 54px !important;
    }
}

@media (max-width: 768px) {
    .popover .popover-body {
        overflow-y: auto;
        overflow-x: clip;
        max-height: 400px;
        margin-top: 16px;
        margin-bottom: 16px;
    }
}