:root {
    --bs-primary: #5547ee;
    --bs-primary-rgb: 85, 71, 238;
}

:root[data-bs-theme="light"] {
    --bs-body-bg: #f7f7fc;
    --bs-border-color: #ececf8;
    --bs-emphasis-color-rgb: 85, 71, 238;
    --bs-tertiary-bg-rgb: 236, 236, 248;
    --bs-tertiary-bg: #ececf8;
    --bs-border-color-translucent: #ececf8;
}

.btn-primary,
.btn-jupyter {
    --bs-btn-color: #fff;
    --bs-btn-bg: #5547ee;
    --bs-btn-border-color: #5547ee;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #4C40D4;
    --bs-btn-hover-border-color: #4C40D4;
    --bs-btn-focus-shadow-rgb: 85, 71, 238;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4135b5;
    --bs-btn-active-border-color: #4135b5;
}

.btn-outline-primary {
    --bs-btn-color: #5547ee;
    --bs-btn-bg: #e0dfff;
    --bs-btn-border-color: #e0dfff;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #5547ee;
    --bs-btn-hover-border-color: #5547ee;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #5547ee;
    --bs-btn-active-border-color: #5547ee;
}

/* Map btn-outline-danger to the custom UNC light red button */
.btn-outline-danger {
    --bs-btn-color: #dc3545;
    --bs-btn-bg: #f7e6e6;
    --bs-btn-border-color: #f7e6e6;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #dc3545;
    --bs-btn-hover-border-color: #dc3545;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #dc3545;
    --bs-btn-active-border-color: #dc3545;
}

.form-control {
    background-color: var(--bs-tertiary-bg) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.form-control:hover {
    background-color: var(--bs-tertiary-bg) !important;
    box-shadow: inset 0 0 0 2px var(--bs-primary) !important;
}

.form-control:focus {
    background-color: var(--bs-body-bg) !important;
    box-shadow: inset 0 0 0 2px var(--bs-primary) !important;
    border-color: transparent !important;
}

.radio-card-label,
.custom-select-wrapper {
    border-color: transparent !important;
}

.radio-card-label:hover {
    box-shadow: inset 0 0 0 2px var(--bs-primary) !important;
}

.radio-card-input:checked+.radio-card-label {
    box-shadow: inset 0 0 0 2px var(--bs-primary) !important;
    border-color: transparent !important;
}

[data-bs-theme="light"] .radio-card-input:checked+.radio-card-label {
    background-color: #ffffff !important;
}

[data-bs-theme="light"] a:not(.btn) {
    color: #176de8;
    text-decoration: underline;
}

a:not(.btn):hover {
    color: var(--bs-primary);
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
}

.progress {
    --bs-progress-bar-bg: var(--bs-primary);
}

[data-bs-theme="light"] .navbar {
    --bs-tertiary-bg-rgb: 247, 247, 252;
    /* #f7f7fc */
}

[data-bs-theme="light"] .nav-link:hover,
.nav-link:active {
    color: var(--bs-primary) !important;
    text-decoration: underline;
    text-decoration-skip-ink: none;
    text-decoration-thickness: max(3px, .1875rem, .12em);
    background-color: unset !important;
}

.navbar {
    padding: 0;
}

[data-bs-theme="light"] .btn-light {
    --bs-btn-bg: #fff;
}