/* CSS TOOLS */
:root {
    --bs-box-shadow: 0 5px 10px 0 #888888;
    --bs-border-color: #ced4da;
    --primary-color: #007bff;
}

html {
    font-size: 16px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1em;
}

h2 {
    font-size: 1.8rem;
}

a {
    text-decoration: none;
}

i {
    vertical-align: middle;
}

th,
td {
    padding: 0.5rem;
}

fieldset {
    margin: 0 0 40px 0;
    border: 0;
}

legend {
    font-size: 1em;
    font-weight: bold;
    padding: 5px 0 6px;
    text-transform: uppercase;
    width: 500px;
}

figure {
    margin: 0 auto;
    text-align: center;
}

figcaption {
    font-weight: bold;
    text-align: center;
}

/* For the written word, make the headings closer to the following text than the previous */
article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
    margin-top: 2rem;
    margin-bottom: 8px;
}

/* Forms */

form {
    margin-top: 1em;
    margin-bottom: 1em;
}

input[type="file"] {
    /*color: white;*/
    border: 0 solid white;
    margin: 8px 0;
}

input[type="url"] {
    width: 400px;
}

select {
    min-width: 60px;
    padding: 0;
    color: #444444;
    line-height: 1.5em;
}

input.focus,
textarea.focus,
span.editable.focus {
    border: 1px solid #4c4c4c;
}

textarea {
    height: 8em;
    margin: 0 0 10px 0;
    font-size: 12px;
}

.left-right-form-label {
    font-weight: 600;
}

.button-bar {
    margin-bottom: 3rem;
}

.button-bar .btn {
    margin: 0 1em;
}

.button-bar .btn:first-child {
    margin: 0;
}

/* USER DETAILS */

.certificate-thumb {
    display: inline-block;
    width: 200px;
    margin-right: 1rem;
}

.certificate-thumb figcaption {
    min-height: 3em;
    margin-bottom: 4px;
}

.required-asterisk {
    font-weight: bold;
    color: var(--bs-danger);
    vertical-align: top;
}

.context-menu {
    float: right;
    cursor: pointer;
    color: black;
    opacity: 0.75;
    font-size: 28px;
}

.sub-context-menu {
    float: right;
    cursor: pointer;
    color: black;
    opacity: 0.5;
}

.icon-16 {
    height: 16px;
    width: 16px;
}

.note {
    font-size: 0.9em;
    color: var(--mantis-blueberry-jam-60);
}

.img-thumbnail {
    max-height: 60px;
    width: auto;
}

.list-group {
    margin-bottom: 1rem;
}

/* CORACLE HEADER */

#header-nav,
#footer-nav,
.footer {
    background-color: var(--brand-nav-bg);
    color: var(--brand-nav-link-color);
    font-family: var(--brand-font);
    font-size: 1rem;
    /* Pages like the CAS login provide an empty header */
    min-height: 80px;
}

#header-nav .nav-link,
#footer-nav a {
    color: var(--brand-nav-link-color);
}

#header-nav {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#header-nav .navbar-brand {
    height: 80px;
    display: flex;
    align-items: center;
    /* Keeps the logo vertically centered within the padding */
}

#header-nav .navbar-brand img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

#header-nav .nav-item .nav-link {
    line-height: 1.5;
    color: var(--brand-nav-link-color);
    font-size: 1rem;
}

#header-nav .nav-item .dropdown-item {
    color: black;
}

#header-nav .navbar-togger-icon {
    color: white;
}

#header-nav .top-icon {
    font-size: 1.5em;
}

#header-nav .top-icon .bi {
    color: var(--brand-nav-icon-color);
}

#header-nav .top-label {
    padding-left: 4px;
}

#header-nav .navbar-brand {
    max-height: 83px;
    width: auto;
}

.nav-link:focus-visible {
    outline: 2px solid var(--brand-primary, var(--mantis-violet-plum));
    outline-offset: 3px;
    box-shadow: none;
}

/* Avatars */

.avatar-circle {
    width: 32px;
    height: 32px;
    background-color: var(--brand-nav-icon-color);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.initials {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1;
}

.avatar-circle-lg {
    width: 120px;
    height: 120px;
    background-color: var(--mantis-brand-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.avatar-circle-lg .initials {
    font-size: 48px;
    /* Larger initials */
}

.mugshot-lg {
    border: 2px solid var(--mantis-blueberry-jam-12);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

/* BRAND HEADER */

#main-header {
    font-size: 1rem;
    font-family: var(--brand-font);
}

#main-nav {
    padding: 0;
    font-family: var(--brand-font);
}

#main-nav a {
    color: inherit;
    padding-bottom: 0;
    text-decoration: none;
    font-size: 1rem;
}

#main-nav .nav-item a {
    text-align: right;
}

.logo {
    background: url("../images/logo.png") no-repeat;
    background-size: contain;
    height: 40px;
    width: 100px;
    margin: 2px auto 0;
}

main {
    background: var(--mantis-coconut-milk);
    padding-bottom: 2rem;
    padding-top: 15px;
}

main a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

main .btn:hover {
    text-decoration: none;
}

.breadcrumb {
    --bs-breadcrumb-divider-color: white;
    --bs-breadcrumb-border-radius: 0.25rem;
    --bs-breadcrumb-padding-x: var(--brand-bc-padding);
    --bs-breadcrumb-padding-y: 0.75rem;
    margin-bottom: 1rem;
}

#breadcrumb-navigation.image-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    min-height: 58px;
    height: auto;
    padding: 0 1rem;
    --bs-breadcrumb-padding-x: 0;
    --bs-breadcrumb-padding-y: 0;
}

#breadcrumb-navigation .breadcrumb-item {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#breadcrumb-navigation .breadcrumb-item img {
    height: 48px;
    width: auto;
    display: block;
}

/* Remove the "/" divider from the right-aligned item and all items after it */
#breadcrumb-navigation .breadcrumb-item.ms-auto::before,
#breadcrumb-navigation .breadcrumb-item.ms-auto ~ .breadcrumb-item::before {
    display: none;
    padding: 0;
    content: none;
}

/* Ensure the images don't have extra padding that looks like a ghost divider */
#breadcrumb-navigation .breadcrumb-item.ms-auto,
#breadcrumb-navigation .breadcrumb-item.ms-auto ~ .breadcrumb-item {
    padding-left: 0.5rem;
    margin-top: 2px;
    margin-bottom: 2px;
}

.media-breadcrumb {
    opacity: 0.5;
    margin: 0;
    padding: 0;
    background-color: inherit;
}

.media-breadcrumb .breadcrumb-item,
.breadcrumb-item a {
    color: var(--brand-body-color);
}

.image-holder {
    padding: 4px;
    border: 1px solid var(--mantis-blueberry-jam-60);
}

.image-holder img {
    max-width: 100%;
}

.float-top-right {
    float: right;
    display: inline-flex;
    align-items: flex-start;
}

.bordered_image {
    padding: 4px;
    background-color: #ffffff;
    border: 1px solid var(--mantis-blueberry-jam-60);
    box-shadow: 0 8px 6px -6px var(--mantis-blueberry-jam-12);
}

/* Dropdowns */
.dropdown-menu {
    --bs-dropdown-link-color: var(--bs-body-color);
    --bs-dropdown-bg: #f8f8f8;
    --bs-dropdown-min-width: 350px;
    box-shadow: 0 5px 10px 0 #888888;
    opacity: 0.98;
}

.dropdown-item {
    overflow-x: hidden;
    text-overflow: ellipsis;
    line-height: 2rem;
    font-weight: bold;
    text-align: right;
    padding: 4px 18px 6px 18px;
    display: flex;
    align-items: center;
    min-height: auto;
}

.dropdown-divider {
    border-top: 1px solid var(--mantis-blueberry-jam-12);
}

.dropdown-item:hover {
    opacity: 0.5;
}

.dropdown-icon {
    float: left;
    font-size: 24px;
    opacity: 0.75;
    line-height: 2rem;
    margin-right: auto;
    vertical-align: middle;
}

.dropdown-menu-narrow {
    --bs-dropdown-min-width: 12rem;
}

.dropdown-menu-narrow .dropdown-item {
    padding: 0.25rem 1rem;
    width: 12rem;
}

/* Tempus Dominus override */

.input-group-width-auto .input-group {
    /* For inline tempus dominii */
    width: auto;
}

/* Select 2 */

.select2-container {
    /* This is needed for the select2s in the advanced user search */
    max-width: 100%;
    min-width: 100%;
}

.select2-container .form-control {
    margin-bottom: 0;
    padding: 0;
    min-height: 46px;
}

.select2-container .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: 6px;
    border: 1px solid var(--mantis-blueberry-jam-12);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 46px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    padding: 3px 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
    margin-top: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px;
}

/* Starfield */

.django-starfield label {
    width: auto;
    color: #f5b301;
    filter: grayscale(1);
    padding-right: 1rem;
    font-size: 28px;
}

.django-starfield label::before {
    font-size: 28px;
}

/* SOCIAL LOGINS */

.social-login {
    padding-bottom: 1em;
    border-bottom: 1px solid #eeeeee;
}

.social-login .btn {
    max-width: 280px;
    display: block;
    margin: 0 auto 10px;
    line-height: 32px;
}

/* Activity page */

.flippable-card {
    overflow: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
    position: relative;
}

.mini-progress {
    padding: 0;
    height: 50px;
}

/* Recent activities */

.activity_group_logo {
    margin: 24px 0 0 10px;
    display: block;
}

.activity_logo {
    float: left;
    width: 60px;
    height: 60px;
    margin: 0 10px 10px 0;
    padding: 3px;
}

.recent-activity-list {
    height: 180px;
    overflow: hidden;
}

.recent_activity_logo {
    float: left;
    margin-right: 10px;
    padding: 2px;
}

.activity_search_form {
    margin-top: 24px;
}

.activity_search_form input[type="image"],
.activity_search_form_large input[type="image"] {
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* New badge / award */
.osprey-badge {
    position: fixed;
    bottom: 4px;
    right: 4px;
    display: none;
    color: white;
    border: 1px solid #888888;
    border-radius: 2px;
    height: 170px;
    width: 150px;
    text-align: center;
    letter-spacing: 1px;
}

.osprey-badge img {
    height: 80px;
    width: 80px;
    margin: 4px 35px;
    padding: 0;
}

.osprey-badge h4 {
    font-weight: normal;
    font-size: 12px;
    text-transform: none;
    margin: 4px;
    color: white;
}

.osprey-badgrad {
    background: linear-gradient(to bottom, #666666 20%, #444444 80%);
}

.award {
    position: fixed;
    bottom: 4px;
    right: 4px;
    display: none;
    color: white;
    border: 2px solid #888888;
    border-radius: 8px;
    width: 224px;
    text-align: center;
    letter-spacing: 1px;
}

.award img {
    width: 210px;
    margin: 4px 10px;
    padding: 0;
    color: white;
}

.award h4 {
    font-weight: normal;
    font-size: 16px;
    text-transform: none;
    margin: 4px;
    color: white;
}

.awardgrad {
    background: linear-gradient(to bottom, #666666 20%, #000000 80%);
}

/* LEARNING LINE */

.ico {
    display: inline;
    width: 32px;
    height: 16px;
    vertical-align: text-bottom;
    padding-left: 8px;
    padding-right: 8px;
}

.learning_line .list-group-item {
    border: 0;
}

.scroller-status {
    display: none;
}

/* TOUR */

.popover-navigation {
    margin-top: 2em;
}

.popover .btn-group {
    margin-right: 2em;
}

.popover {
    background-color: #f0f0f0;
}

.popover-header {
    background-color: #e0e0e0;
}

.bs-popover-auto[x-placement^="top"] .arrow::after,
.bs-popover-top .arrow::after {
    border-top-color: #442200;
}

.bs-popover-auto[x-placement^="bottom"] .arrow::after,
.bs-popover-bottom .arrow::after {
    border-bottom-color: #442200;
}

.bs-popover-auto[x-placement^="left"] .arrow::after,
.bs-popover-left .arrow::after {
    border-left-color: #442200;
}

.bs-popover-auto[x-placement^="right"] .arrow::after,
.bs-popover-right .arrow::after {
    border-right-color: #442200;
}

.controls {
    float: right;
    visibility: hidden;
    padding-left: 16px;
    vertical-align: top;
}

#commentinputbox {
    display: none;
}

#commentbox_template {
    display: none;
}

.commentbox .btn-sm {
    font-size: 0.8em;
    margin-left: 44px;
    font-weight: normal;
}

.comments {
    font-size: 0.9em;
    opacity: 0.8;
}

.comments strong {
    font-size: 1.2em;
    opacity: 1;
}

.reply-bar {
    height: 1em;
}

.reply-bar .btn-sm {
    padding: 2px 6px;
    font-size: 0.8em;
    float: right;
}

/* CARDS */
.card {
    --bs-card-bg: var(--brand-card-bg);
    --bs-card-title-color: var(--brand-font-color);
    margin-bottom: 15px;
}

.card-header,
.card-body {
    padding: 8px;
}

.card-body {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: rgba(0, 0, 0, 0.03);
    /* Subtle shelf effect */
}

/* STATISTICS */
.stat {
    float: right;
    font-family: monospace;
    font-size: 22px;
    text-align: right;
    clear: right;
}

.tweed-stat-zone {
    border: 1px solid #f8f8f8;
    padding: 1em 0;
    text-align: center;
    line-height: 40px;
}

.tweed-stat {
    font-size: 28px;
    font-weight: bold;
}

/* Icon bars */

.info-bar {
    margin: 4px 0;
    height: 32px;
}

.info-bar-icon {
    margin: 0 4px;
}

/* Pagination */

.pagination {
    margin-top: 1em;
}

div.pagination li {
    display: inline;
}

/* FOOTER */
#back-to-top {
    display: none;
    position: fixed;
    z-index: 100;
    bottom: 80px;
    right: 20px;

    background-color: var(--mantis-blueberry-jam);
    color: var(--mantis-white);
    border: 2px solid var(--mantis-white);

    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    opacity: 1;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

#back-to-top:hover {
    background-color: var(--mantis-violet-plum);
    transform: translateY(-3px);
    color: var(--mantis-white);
}

#footer-nav {
    clear: both;
    color: #888888;
    margin-top: 10px;
    padding: 10px 0;
    min-height: 100px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

#footer-nav a {
    color: #888888;
    text-decoration: none;
}

#footer-nav a:hover {
    text-decoration: underline;
}

.small {
    font-size: 0.85em;
}

/* FOOTER PUSH */
html,
body {
    height: 100%;
}

.wrapper {
    min-height: 100%;
    height: auto;
    margin: 0 auto -120px;
}

.push {
    height: 100px;
}

/* APP LOG DASHBOARD */
.border-top-primary {
    border-top: 4px solid var(--primary-color);
}

.border-right-primary {
    border-right: 4px solid var(--primary-color);
}

.border-bottom-primary {
    border-bottom: 4px solid var(--primary-color);
}

.border-left-primary {
    border-left: 4px solid var(--primary-color);
}

.text-monospace {
    font-family: monospace;
}

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

.progress-track-custom {
    background-color: var(--bs-mantis-blueberry-jam-07);
    border: 1px solid var(--bs-mantis-blueberry-jam-12);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-label {
    color: #556075;
    font-weight: 600;
}

.progress-percentage {
    /* Using your solid brand black/blue for maximum contrast */
    color: var(--mantis-blueberry-jam);
    font-weight: 700;
    /* Bold makes smaller numbers much easier to read */
    font-size: 0.95rem;
    /* Slightly larger than 'small' but smaller than body */
    letter-spacing: 0.5px;
    line-height: 1;
}

.progress-bar-mantis {
    background-color: var(--mantis-brand-primary);
}

.activity-sidebar-container {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.recent-activity-panel {
    margin-bottom: 20px;
    min-height: 120px;
    /* Ensures the "Select activity" text doesn't look lost */
}

/* Media queries */

@media only screen and (min-width: 768px) {
    form.widgetform {
        margin-bottom: 0;
    }

    .widgetform .form-control {
        display: inline-block;
    }
}

@media only screen and (min-width: 992px) {
    .logo {
        background: url("../images/logo.png") no-repeat;
        height: 80px;
        width: 201px;
        margin: 10px 0 0 0;
    }

    .left-right-form-label {
        text-align: right;
    }
}

/* Prevent back to top being show on touch devices */
@media (pointer: coarse) {
    #back-to-top {
        display: none;
    }
}
