:root {
    --primary: #007bff;
    --primary-dark: #006fe6;
    --primary-light: #1b89ff;
    --secondary: #FFB200;
    --secondary-dark: #FC8017;
    --secondary-light: #fcbc28;
    --bs-success-rgb: 199, 212, 41;
}

.table-fixed {
    table-layout: fixed
}

.table-fixed tr th {
    width: 250px;
}

.aside+.content .container,
.aside+.content .container-lg,
.aside+.content .container-md,
.aside+.content .container-sm,
.aside+.content .container-xl,
.aside+.content .container-xxl {
    max-width: none;
}

.fw-900 {
    font-weight: 900 !important;
}

.aside header {
    padding-top: calc(var(--bs-gutter-x)*.5) !important;
    /* padding-left: 0 !important;
    padding-right: 0 !important; */
    margin-top: 0.5rem !important;
}

.aside+.col {
    padding-bottom: 150px;
}

.logo,
.slogan {
    max-width: 200px;
}

.logo--square {
    display: none;
    max-width: 40px;
    margin: auto;
}

.page-platform-referrals-create .matrix thead th:first-of-type,
.page-platform-referrals-edit .matrix thead th:first-of-type {
    width: 120px;
}

.page-platform-referrals-create .matrix tbody th.no-border:last-of-type,
.page-platform-referrals-edit .matrix thead th.no-border:last-of-type {
    width: 40px;
}

.page-platform-referrals-create .matrix textarea,
.page-platform-referrals-edit .matrix textarea {
    height: auto !important;
}

#screen-modal-asyncEditContactModal div[data-controller="listener"] fieldset {
    margin-bottom: -1.5rem !important;
}

#screen-modal-type-asyncEditActivityModal,
#screen-modal-type-asyncQuickView {
    max-width: 1300px !important;
}

#screen-modal-form-asyncEditIndividualSessionModal .layout-wrapper>[data-async]>fieldset,
#screen-modal-form-asyncEditGroupClientSessionModal .layout-wrapper>[data-async]>fieldset {
    margin-bottom: 0 !important;
}

#screen-modal-form-asyncEditIndividualSessionModal .layout-wrapper>[data-async]>fieldset>div,
#screen-modal-form-asyncEditGroupClientSessionModal .layout-wrapper>[data-async]>fieldset>div {
    padding-bottom: 0 !important;
}

label[for="phones"]+.matrix tr:not(.add-row) th:first-of-type {
    display: none;
}

label[for="phones"]+.matrix thead th:nth-of-type(3),
label[for="phones"]+.matrix thead th:nth-of-type(4),
label[for="phones"]+.matrix thead th:nth-of-type(5) {
    width: 100px;
}

label[for="phones"]+.matrix tbody th:nth-of-type(4),
label[for="phones"]+.matrix tbody th:nth-of-type(5) {
    padding-left: 1em !important;
}

label[for="question_answers"]+.matrix thead th:nth-of-type(2),
label[for="question_answers"]+.matrix thead th:nth-of-type(3) {
    width: 80px;
}

label[for="question_answers"]+.matrix tbody th:nth-of-type(1) .form-control {
    max-width: none;
}

label[for="question_answers"]+.matrix tbody th:nth-of-type(4) {
    width: 60px;
}

label[for="questionnaire_aggregations"]+.matrix thead th:nth-of-type(1),
label[for="questionnaire_aggregations"]+.matrix thead th:nth-of-type(2) {
    width: 200px;
}

label[for="questionnaire_aggregations"]+.matrix tbody th:nth-of-type(4) {
    width: 60px;
}

label[for="cared-for-data"]+.matrix tbody th:nth-of-type(5) {
    padding-left: .75em !important;
}

.page-platform-questions-conditions .layout-wrapper .layout-wrapper .col-auto:first-of-type {
    width: 150px !important;
}

.page-platform-questions-conditions .layout-wrapper .layout-wrapper .col-auto:nth-of-type(2) {
    width: 100px !important;
}

.page-platform-questions-conditions .layout-wrapper .layout-wrapper .col-auto:nth-of-type(3) {
    width: 230px !important;
}

.page-platform-questions-conditions .layout-wrapper .layout-wrapper .col-auto:nth-of-type(3) .row-cols-sm-2>* {
    width: 50% !important;
}

/*****************************/
/* BUTTONS AND FORM ELEMENTS */
/*****************************/

.bootstrap-tagsinput,
.chosen-choices,
.chosen-single,
.form-control:not(textarea) {
    line-height: 1.5;
}

.matrix.table>thead tr {
    background: rgba(var(--bs-light-rgb), var(--bs-bg-opacity));
}

.matrix .form-group {
    padding: .25rem;
}

.matrix .form-control {
    border: 1px solid rgba(28, 43, 54, .1) !important;
    max-width: none;
}

.matrix .add-row {
    background-color: var(--primary);
    transition: background-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.matrix .add-row:hover {
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) !important;
    background-color: var(--primary-dark);
}

.matrix .add-row a,
.matrix .add-row a:hover {
    color: #fff !important;
}

.ts-wrapper:not(.chosen-choices):not(.chosen-single):not(.bootstrap-tagsinput):not(.form-select).single .ts-control {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-color: transparent !important;
    background-position: right 0.75rem center !important;
    background-repeat: no-repeat !important;
    background-size: 16px 12px !important;
}

.flatpickr-day {
    height: 30px;
    line-height: 30px;
}

.flatpickr-time {
    background: #ffd88e;
}

.flatpickr-calendar.hasTime .flatpickr-time {
    height: 35px;
    line-height: 35px;
}

.flatpickr-time .numInputWrapper {
    height: 35px;
}

.flatpickr-time .flatpickr-am-pm:focus,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time input:hover {
    background: #efc678;
}

.btn-secondary {
    background-color: #e9ecef !important;
    border-color: #e9ecef !important;
    color: #333 !important;
}

.btn-secondary .open .dropdown-toggle,
.btn-secondary.active,
.btn-secondary:active,
.btn-secondary:focus,
.btn-secondary:hover {
    background-color: #d9dbdd !important;
    border-color: #d9dbdd !important;
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125) !important;
    color: #000 !important;
}

.nav-tabs-alt .nav-tabs .nav-item .nav-link {
    padding-left: 1rem;
    padding-right: 1rem;
}

/*****************************/
/* LAYOUTS */
/*****************************/
.phone-list-item--default {
    position: relative;
    border-bottom: dashed 1px #ccc;
}

.phone-list-item__tooltip {
    position: absolute;
    left: calc(100% + 20px);
    background-color: #000;
    color: #fff;
    opacity: 0;
    transition: left 0.3s ease-in-out, opacity 0.6s ease-in-out;
    display: inline-block;
    padding: 0.08rem 0.25rem;
    z-index: -1;
    font-size: 0.6rem;
    word-break: normal;
}

.phone-list-item__tooltip::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 5px solid #000;
}

.phone-list-item:hover .phone-list-item__tooltip {
    opacity: 1;
    z-index: 0;
    left: calc(100% + 10px);
}

.page-platform-clients-edit-health .table tbody tr td {
    word-break: normal;
}

.table-inner tr>*:first-child {
    padding-left: 1rem !important;
}

.table-inner tr>*:last-child {
    padding-right: 1rem !important;
}

.table-inner.table-compact tr>*:first-child {
    padding-left: .25rem !important
}

.table-inner.table-compact tr>*:last-child {
    padding-right: .25rem !important
}

.modal .modal-dialog.undismissable .modal-header .btn-close {
    display: none !important;
}

.compare-value label {
    white-space: normal;
}

.compare-heading {
    background: #fafafa;
}

.compare-heading .form-group {
    margin-bottom: 0 !important;
}

nav>.nav>.nav-item {
    flex-direction: column;
}

.aside .nav-link#aside-fold svg {
    transition: transform ease .5s;
}

@media (min-width: 768px) {
    .aside {
        max-width: 250px;
        min-width: 17em;
    }

    .folded .aside {
        min-width: 70px;
        max-width: 70px;
    }

    .folded .aside header {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .folded .aside .logo {
        min-width: 0;
    }

    .folded .aside .logo--full {
        display: none;
    }

    .folded .aside .logo--square {
        display: block;
    }

    .folded .aside .slogan {
        display: none !important;
    }

    .folded .aside nav>div {
        padding-left: 0 !important;
        padding-right: 0 !important;
        flex-direction: column;
    }

    .folded .aside nav>div>.dropdown {
        width: 100% !important;
    }

    .folded .aside nav>div>.dropdown>.nav-link {
        justify-content: center;
    }

    .folded .aside nav>div>.dropdown+div {
        margin-left: 0 !important;
        margin-top: 1rem;
    }

    .folded .aside nav>div>.dropdown+div a {
        padding: .625rem 1rem !important;
    }

    .folded .aside .avatar {
        margin-right: 0 !important;
    }

    .folded .aside .avatar+span {
        display: none !important;
    }

    .folded .aside .nav>.nav-item.mt-3,
    .folded .aside .nav>.nav-item>small {
        display: none;
    }

    .folded .nav-item.has-submenu {
        position: relative;
    }

    .folded .aside nav>.nav>.nav-item>.nav-link>svg {
        height: 1.5em;
        margin-right: 0 !important;
    }

    .folded .aside nav>.nav>.nav-item>.nav-link>span {
        display: none;
    }

    .folded .aside .nav-link#aside-fold svg {
        transform: rotate(180deg);
    }

    .folded .aside .bottom-left span {
        display: none !important;
    }

    /* SUBMENU */
    .folded .sub-menu {
        position: absolute;
        visibility: hidden !important;
        opacity: 0;
        display: block;
        width: max-content;
        background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
        left: 100%;
        transition: left ease .2s;
        z-index: 1;
    }

    .folded .sub-menu::before {
        content: "";
        display: block;
        width: 20px;
        height: 100%;
        position: absolute;
        top: 0;
        right: 100%;
    }

    .folded .sub-menu::after {
        content: "";
        position: absolute;
        width: 0px;
        height: 0px;
        border-top: 5px solid transparent;
        border-right: 5px solid rgba(var(--bs-dark-rgb), var(--bs-bg-opacity));
        border-bottom: 5px solid transparent;
        border-left: 5px solid transparent;
        top: 17px;
        right: 100%;
    }

    .folded .nav-item.has-submenu:hover .sub-menu {
        visibility: visible !important;
        opacity: 1;
        left: calc(100% + 20px);
    }
}

.calendar {
    margin-left: 1px;
    margin-top: 1px;
}

.calendar-navigation-month {
    flex-basis: 200px;
}

.calendar-day-labels {
    display: flex;
}

.calendar-day-labels span {
    flex-basis: calc(100% / 7);
}

.calendar-days {
    display: flex;
    flex-wrap: wrap;
}

.calendar-day {
    flex-basis: calc((100% / 7) + 1px);
    padding: 0.25em 0.5em 0.5em;
    border: solid 1px var(--bs-gray-300);
    margin-top: -1px;
    margin-left: -1px;
}

.calendar-day-number span {
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 999px;
    text-align: right;
}

.calendar-day.today .calendar-day-number span {
    background-color: var(--bs-green);
    color: #fff;
    text-align: center;
    transform: translateX(0.25rem);
}

.calendar-sessions .btn {
    font-size: 11px;
    padding: .25rem .5rem;
}

.calendar-legend-individual {
    background-color: #28a745;
}

.calendar-legend-group {
    background-color: #17a2b8;
}