:root {
    --primary: #A16EC9;
    --primary-dark: #7A4A99;
    --primary-light: #E1BBFF;
    --secondary: #FFB200;
    --secondary-dark: #FC8017;
    --secondary-light: #fcbc28;
    --blue: #78CCDE;
    --red: #CC1700;
    --bs-danger-rgb: 204, 23, 0;
    --bs-success-rgb: 199, 212, 41;
}

@media (min-width: 1900px) {

    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 1550px;
    }
}

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

.logo {
    min-width: 200px;
    position: relative;
}

.page-login .logo {
    width: 273px;
}

/****************/
/* LAYOUTS      */
/****************/
nav+.layout {
    background-color: var(--secondary) !important;
}

nav+.layout h1 {
    font-weight: bold !important;
}

nav+.layout .text-muted {
    color: #404040 !important;
}

fieldset.row legend {
    margin-top: 1rem;
}

.page-platform-products-dispatch legend p {
    display: none;
}

.page-platform-products-dispatch .d2-grid dd {
    text-align: right;
}

.page-platform-products-dispatch .form-control[name="quantity"] {
    line-height: 1.5;
}

.page-platform-products-dispatch div[data-async]>.row>.col-md:nth-of-type(2) {
    flex-grow: 1.3;
}

.picture-actions>span.float-start {
    text-align: left !important;
}

.product-card .thumb-sm {
    height: 40px;
}

.product-card .thumb-sm img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.table .text-truncate[data-column="propertiesuser-agent"] {
    white-space: normal;
}

/*****************************/
/* BUTTONS AND FORM ELEMENTS */
/*****************************/
.bootstrap-tagsinput,
.chosen-choices,
.chosen-single,
.form-control:not(textarea) {
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary .open .dropdown-toggle,
.btn-primary.active,
.btn-primary:active,
.btn-primary:focus,
.btn-primary:hover,
.btn.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: #fff !important;
}

.btn-primary.disabled,
.btn-primary.disabled.active,
.btn-primary.disabled:active,
.btn-primary.disabled:focus,
.btn-primary.disabled:hover,
.btn-primary[disabled],
.btn-primary[disabled].active,
.btn-primary[disabled]:active,
.btn-primary[disabled]:focus,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-primary.active,
fieldset[disabled] .btn-primary:active,
fieldset[disabled] .btn-primary:focus,
fieldset[disabled] .btn-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:not([disabled]):not(.disabled).active,
.btn-primary:not([disabled]):not(.disabled):active,
.show>.btn-primary.dropdown-toggle {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.form-check-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(78, 49, 102, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-switch .form-check-input:focus {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23E1BBFF'/%3E%3C/svg%3E");
}

.ts-wrapper.multi .ts-control>div.active {
    background: var(--primary);
}

.ts-wrapper.multiple-in-column .ts-control {
    flex-direction: column;
    align-items: flex-start;
    align-content: flex-start;
}
.ts-wrapper.multiple-in-column .ts-control>input {
    width: calc(100% - 10px);
}

.page-platform-pupils-orders .matrix span {
    color: transparent;
    position: relative;
    width: 100px;
}

.page-platform-pupils-orders .matrix span::before {
    content: "Add a Product";
    color: #fff;
    position: absolute;
    left: 0;
}

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

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

select[name="course[class_year]"]+.ts-wrapper .ts-dropdown-content {
    max-height: none;
}

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

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

/**********************/
/* TEXTS AND ELEMENTS */
/**********************/
a.text-primary:hover {
    color: var(--primary-dark);
}

.text-primary {
    color: var(--primary) !important;
}

.alert-error {
    background-color: #CC1700;
    color: #fff;
}

/********************/
/* THEMES           */
/********************/
.theme-beta nav+.layout {
    background-color: var(--blue) !important;
}

.theme-beta .logo::before,
.theme-beta .logo::after {
    position: absolute;
    top: calc(50% - 14px);
    left: calc(50% + 53px);
    width: 47px;
    height: 20px;
}

.theme-beta .logo::before {
    content: "";
    background-color: var(--red);
    display: inline-block;
}

.theme-beta .logo::after {
    content: "BETA";
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 20px;
    text-align: center;
}

@media (min-width: 768px) {

    .theme-beta .logo::before,
    .theme-beta .logo::after {
        top: calc(50% - 18px);
        left: calc(50% + 73px);
        width: 64px;
        height: 25px;
    }

    .theme-beta .logo::after {
        line-height: 25px;
        font-size: 18px;
    }
}