:root {
    --font-condensed-lightest: "wdth" 75, "wght" 200;
    --font-condensed-light: "wdth" 75, "wght" 300;
    --font-condensed-normal: "wdth" 75, "wght" 400;
    --font-condensed-medium: "wdth" 75, "wght" 500;
    --font-condensed-semibold: "wdth" 75, "wght" 600;
    --font-condensed-bold: "wdth" 75, "wght" 750;

    /** Colors */
    --accent: #e79241;
    --dividers: #f2f2f2;
    --tertiary: #f5f5f5;
    --font-alt: #4d4d4d;
    --font-color: #333;
    --bs-primary: #663f8a;
    --bs-secondary: #9f65bc;
    --primary-faint: #f5f1f9;
    --bs-success: #21B238;
    --bs-danger: #B22121;

    --bs-primary-rgb: 102, 63, 138;
    --bs-secondary-rgb: 159, 101, 188;
    --bs-emphasis-color-rgb: 255, 255, 255;
    --bs-link-color-rgb: var(--bs-primary-rgb);
    --bs-heading-color: var(--font-color);
    --bs-body-color: var(--font-color);
}

/**
attributes
*/
[readonly] {
    opacity: 0.5;
    cursor: not-allowed;
}

/**
SVG
*/
.normalize-svg-size svg,
svg.icon {
    width: 1em;
    height: 1em;
}

a svg,
.svg-inherit-color svg {
    fill: currentColor;
}

/*
Buttons
*/
.btn-primary {
    --bs-btn-bg: white;
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: white;
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);

    text-transform: uppercase;
    font-weight: bold;
    color: var(--bs-primary);
}

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

/* TODO, restore icons */
.btn .ui-icon {
    display: none;
}

/* backgrounds */
.bg-dividers {
    background-color: var(--dividers);
}

.bg-tertiary {
    background-color: var(--tertiary);
}

.btn-link {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-font-size: inherit;
}

/**
Typography
*/
body {
    font-size: 1.125rem;
    font-family: "ProximaVara-Roman", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: RGBA(var(--bs-primary-rgb), var(--bs-bg-opacity, 1));
}

.font-extrabold {
    font-variation-settings: "wght" 900, "wdth" 100;
}

b,
strong,
.font-bold {
    font-variation-settings: "wght" 750, "wdth" 100 !important;
}

.font-semibold {
    font-variation-settings: "wght" 650, "wdth" 100;
}

.font-medium {
    font-variation-settings: "wght" 500 !important;
}

.font-normal {
    font-variation-settings: "wght" 400;
}

.font-light {
    font-variation-settings: "wght" 300;
}

.font-lighter {
    font-variation-settings: "wght" 200;
}

.font-lightest {
    font-variation-settings: "wght" 100;
}

.font-alt-bold {
    font-variation-settings: var(--font-condensed-bold);
    font-weight: normal !important;
}

.font-alt-semibold {
    font-variation-settings: var(--font-condensed-semibold);
    font-weight: normal !important;
}

.font-alt-medium {
    font-variation-settings: var(--font-condensed-medium);
    font-weight: normal !important;
}

.font-alt-normal {
    font-variation-settings: var(--font-condensed-normal);
    font-weight: normal !important;
}

.font-alt-light {
    font-variation-settings: var(--font-condensed-light);
    font-weight: normal !important;
}

.font-alt-lightest {
    font-variation-settings: var(--font-condensed-lightest);
    font-weight: normal !important;
}

.inherit-font-size {
    font-size: inherit;
}

/**
Layout
*/
#wrapper {
    background-color: var(--tertiary);
}

p:last-child {
    margin-bottom: 0;
}

.mg-grid-2,
.mg-grid-3 {
    display: grid;
    grid-template-columns: grid-template-columns: repeat(1, 1fr);
}

@media screen and (min-width: 768px) {
    .mg-grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .mg-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/**
Header
*/
.nav-link {
    --bs-nav-link-color: var(--bs-primary);
}

.app-header {
    z-index: 50;
    position: relative;

    .nav {
        width: auto;
        max-width: 100%;

        ul {
            list-style: "";
            padding: 0;
            background-color: white;
        }
    }
}

.header-admin {
    .nav {
        --bs-nav-link-padding-y: 0.25rem;
    }
}

.nav-user-control {
    .dropdown-menu {
        --bs-dropdown-min-width: 12rem;
        max-width: 250px;
    }

    .welcome {
        font-weight: 700;
        font-size: 15px;
        padding: var(--bs-dropdown-item-padding-y)
            var(--bs-dropdown-item-padding-x);
    }
}

/**
Text color
*/
.text-font-alt {
    color: var(--font-alt);
}

.links-white a {
    color: white;
}

/**
Footer
*/
#footer {
    clear: both;
    width: 100%;
}

/**
Tables
*/
.table {
    --bs-table-hover-bg: var(--primary-faint);
    --bs-table-striped-bg: var(--tertiary);
}

.table th {
    background-color: var(--bs-primary);
    color: white;
}

.pagination {
    --bs-pagination-active-bg: var(--bs-primary);
    --bs-pagination-active-border-color: var(--bs-primary);
    --bs-pagination-color: var(--bs-primary);
    --bs-pagination-hover-color: var(--bs-primary);
}

th .fht-cell {
    padding-inline: 5px;
    padding-block-end: 5px;
}

td.text-break {
    max-width: 200px;
    word-wrap: break-word;
}

.bootstrap-table .fixed-table-container .table .word-break .th-inner {
    white-space: normal;
}

/**
Media
*/
.video-embed {
    iframe {
        max-width: 100%;
        width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        border-radius: var(--bs-border-radius-lg) !important;
    }
}

.card-img-top {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/**
form progress nav
*/
.mg-circle-nav {
    position: relative;

    .mg-circle-nav-item .nav-link{
        background-color: transparent;
        padding: 0;
        color: inherit;
    }
    
    .nav-link.active .mg-circle-nav-item__label {
        font-weight: 700;
    }
}

.mg-circle-nav-item__circle {
    width: 57px;
    height: 57px;
    background-color: var(--bs-primary);
    color: white;
    border-radius: 100%;
    margin: auto;
    margin-block-end: .2em;
    display: grid;
    place-content: center;
    border: 5px solid var(--bs-primary);
    box-sizing: content-box;
    position: relative;
    z-index: 1;

    .mg-circle-nav-item .active & {
        background-color: white;
        color: var(--bs-body-color);
    }
}


.mg-circle-nav-item__circle-number {
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
}

/**
Alerts
*/
.validation-summary-errors {
    --bs-alert-color: var(--bs-danger-text-emphasis);
    --bs-alert-bg: var(--bs-danger-bg-subtle);
    --bs-alert-border-color: var(--bs-danger-border-subtle);
    --bs-alert-link-color: var(--bs-danger-text-emphasis);
    --bs-alert-border: var(--bs-border-width) solid var(--bs-alert-border-color);
    --bs-alert-border-radius: var(--bs-border-radius);
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--bs-alert-color);
    background-color: var(--bs-alert-bg);
    border: var(--bs-alert-border);
    border-radius: var(--bs-alert-border-radius);
}

.mg-alert {
    background-color: var(--bs-danger);

    svg.bi {
        width: 24px;
    }
}

.alert {
    h2,h3,h4,h5,h6 {
        color: inherit;
    }
}

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

.ui-disabled {
    pointer-events: none;
    opacity: 0.5;
}

/**
* Progress bars
*/
.progress-bar{
    --bs-progress-bar-bg: var(--bs-primary);
}

/**
Spinners
*/
.ui-has-state {
    transition: opacity 1s;

}

.ui-has-state--is-loading {
    opacity: 0.2;
    pointer-events: none;
}

.pulsating-circle {
    position: relative;
    width: 50px;
    height: 50px;
}

.pulsating-circle:before,
.pulsating-circle:after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 100%;
    background-color: var(--bs-primary);
}

.pulsating-circle:before {
    width: 200%;
    height: 200%;
    margin-left: -50%;
    margin-top: -50%;
    animation: pulse-ring 1.25s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulsating-circle:after {
    width: 100%;
    height: 100%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    animation: pulse-dot 1.25s cubic-bezier(0.455, 0.03, 0.515, 0.955) -0.4s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.33);
    }
    80%,
    100% {
        opacity: 0;
    }
}

@keyframes pulse-dot {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.8);
    }
}

.cursor-pointer {
    cursor: pointer;
}

:root :where(.d-grid) {
    grid-template-columns: 1fr;
}