/*
    NOTE: see also common.css for shared styles between normal and totem mode,
    and for some variable definitions.
*/

/* -- GLOBAL SETTINGS --------------------------------------------------------- */

html, body {
    min-width: 800px;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    /* margin bottom by footer height */
    margin-bottom: 60px;
}

/* FIXME: Do not use global wildcards like this!!  */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a.hl {
    text-decoration: underline dotted;
}

a.hl::after {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    font-family: "Font Awesome 5 Free";
    font-size: 0.7em;
    margin-left: 0.3em;
    font-weight: 900;
    color: var(--link-hover);
    content: "\f35d";
}

hr {
    border-top: 2px solid rgb(52, 152, 219);
    margin-top: 0px;
}

/* -- MODAL DIALOGS ----------------------------------------------------------- */

.modal-body .pull-bottom {
    margin-bottom: -20px;
}

label.req::after {
    color: red;
    content: "*";
    font-weight: bold;
}

.has-error input {
    border: 1px solid red;
}

.has-error input:focus {
    border: 2px solid red;
}

.form-control.is-invalid:focus,
.was-validated .form-control:invalid:focus {
    box-shadow: none;
}

ul.errorlist {
    padding: 0px;
    margin: 0px;
    color: red;
}

ul.errorlist > li {
    list-style-type: none;
}

ul.checkbox-list {
    padding-top: 5px;
    padding-inline-start: 10px;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    max-height: 105px;
    overflow-y: scroll;
}

ul.checkbox-list li {
    list-style-type: none;
}

ul.checkbox-list li label {
    margin-bottom: 0px;
}

.hidden {
    display: none;
}

.btn.anchor-style {
    border-radius: 0;
    border: none;
    padding: 0px;
    margin: 0px;
    line-height: normal;
}

.btn.anchor-style:hover span {
    border-bottom: 1px solid #18bc9c;
    color: #18bc9c;
    transition: all 0.3s;
}

pre.console {
    background-color: lightgray;
    color: black;
    padding: 2em;
    border-radius: 5px;
    border: 1px solid gray;
}

a.help-collapsed {
    display: block;
    margin-bottom: 1em;
    color: var(--blue);
    margin-top: -0.8em;
    text-align: right !important;
}


/* -- UPPER NAVBAR ------------------------------------------------------------ */

nav.navbar {
    margin-bottom: 0;
    padding-top:10px;
    padding-bottom:10px;
    padding-right:50px;
    padding-left:50px;
    border-radius: 0;
}

.navbar-brand {
    padding-top: 0;
}

/* upper bar buttons */
.navbar-dark .nav-item.active .nav-link {
    font-weight: bold;
    color: rgb(253, 240, 180);
}

.navbar-dark .nav-item .nav-link:hover {
    background-color: rgb(78, 78, 78);
    border-radius: 5px;
}

.input-search {
    margin-right: 0px !important;
}

.dropdown img.avatar {
    width: 40px;
    -webkit-border-radius: 1000px;
    -moz-border-radius: 1000px;
    border-radius: 1000px;
    -webkit-box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.12);
    -moz-box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.12);
    box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.12);
}

.pop-message {
    position: absolute;
    top: 130px;
    left: 15vw;
    width: 70vw;
    z-index: 200;
    box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    font-size: 120%;
    border: 1px solid white;
}

.dropdown-menu,
.avatar-type {
    --admin-color:   #92010b;
    --manager-color: #cf5300;
    --trainer-color: #025e16;
    --enduser-color: #023e75;
}

.avatar-type {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    border-top-left-radius: 20%;
    border-bottom-left-radius: 20%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    padding-top: 5px;
    margin-right: 10px;
    border-right: 3px solid white;
}

.dropdown-menu.admin   { border-left: 6px solid var(--admin-color); }
.dropdown-menu.manager { border-left: 6px solid var(--manager-color); }
.dropdown-menu.trainer { border-left: 6px solid var(--trainer-color); }
.dropdown-menu.enduser { border-left: 6px solid var(--enduser-color); }

.avatar-type.admin          { background-color: var(--admin-color); }
.avatar-type.admin::after   { content: "A"; }
.avatar-type.manager        { background-color: var(--manager-color); }
.avatar-type.manager::after { content: "M"; }
.avatar-type.trainer        { background-color: var(--trainer-color); }
.avatar-type.trainer::after { content: "T"; }
.avatar-type.enduser        { background-color: var(--enduser-color); }
.avatar-type.enduser::after { content: "E"; }

#notif-link {
    display: flex;
    align-items: center;
}

#notif-link a {
    position: relative;
    display: flex;
    align-items: center;
}

#notif-link a .badge {
    position: absolute;
    right: 12%;
    bottom: 14%;
    width: 1ch;
    height: 2ch;
}

/* -- FOOTER ------------------------------------------------------------------ */

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding-top: 0px;
    padding-bottom: 10px;
    margin-bottom: 0;
    min-height: 60px;
    color: #76818D;
    margin-top: 13px;
}

.footer-distributed .footer-icons {
    padding: 0px 20px;
}

.footer-distributed .footer-left,
.footer-distributed .footer-center,
.footer-distributed .footer-right{
    display: inline-block;
    vertical-align: top;
}

.footer-distributed .footer-company-name{
    font-size: 1.2em;
}

.footer-distributed .footer-icons a {
    cursor: pointer;
    background-color: #76818D;
    border-radius: 3px;
    font-size: 15px;
    color: #343a40;
    margin-right: 3px;
    padding: 6px;
}

.eu-logo {
    height: 35px;
    margin: 0px 20px;
    border: 2px solid white;
}

.eu-text {
    position: relative;
    top: 12px;
    display: inline-block;
    text-align: left;
    line-height: 10pt;
    width: 250px;
    font-size: 8pt;
}

.eu-text a {
    color: inherit;
    font-weight: bold;
}

@media (max-width: 450px) {
    .footer-company-name {
	    display: none;
    }
}

/* -- TABLES & LISTS -/-------------------------------------------------------- */

.table.single-table tr.first td,
.table.single-table tr.first th {
    border-top: none;
}

.big-list tr.first td {
    border-top: none;
}

.big-list td.middle {
    vertical-align: middle;
    font-size: 13pt
}

.big-list .avatar {
    position: relative;
    margin-top: 0px;
    margin-right: 10px;
    z-index: 100;
    display: inline-block;
}

.big-list .avatar img {
    width: 80px;
    height: 80px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    border: 5px solid #FFF;
}

.actions form,
.help form {
    margin-block-end: 0;
    display: inline;
}

a.selected {
    border-bottom: 1px dotted gray;
}

input[type="number"] {
    text-align: right;
    border: 1px solid lightgray;
    border-radius: 4px;
    padding-left: 4px;
}

input[type="number"].changed {
    padding-left: 0px;
    border-left: 4px solid #dc3545;
}

td input.seamless {
    color: inherit;
    width: 100%;
    border: 0px;
    background-color: rgba(255, 255, 255, 0);
}

.info-table {
    display: grid;
    grid-template-columns: 1fr 3fr;
}

.info-table h3,
.info-table h6 {
    font-size: 1.2em;
    font-weight: bold;
    text-align: right;
    margin-right: 2ch;
}

.info-table h6 {
    font-weight: normal;
    font-size: 1.1em;
    margin-bottom: 0;
    align-self: center;
}

.info-table input {
    margin: 0.5ch;
}

.info-table h3 .fa-fw {
    margin: 0 0.5ch;
}

.info-table var {
    font-family: monospace;
    font-style: normal;
    background-color: rgb(238, 238, 238);
    padding: 0.5ch 1ch;
    margin-left: -1ch;
}

.exercise-info {
    --border-c: #0073bb;
    --bg-c: #0097ec;

    border-bottom: 1px solid var(--border-c);

    font-size: 0.9em;
    display: grid;
    gap: 0.5ch;
    grid-template-columns: min-content auto;
    grid-template-areas:
        "order name"
        "order desc"
        "info info";
}

.exercise-info .order {
    grid-area: order;
    text-align: center;
    font-weight: bold;
    color: white;
    font-size: 2em;
    height: 2.5ch;
    aspect-ratio: 1/1;
    padding: 0;
    background-color: var(--bg-c);
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;
}

.exercise-info .name {
    grid-area: name;
    margin: 1ch 0 0 1ch;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1em;
}

.exercise-info .desc {
    grid-area: desc;
    margin: 0 0 1ch 1ch;
    font-size: 1.3em;
    color: gray;
}

.exercise-info .iters-time {
    grid-area: info;
    flex-direction: row;
    margin: 0 0 1ch 0.8ch;
    font-size: 1.4em;

    display: flex;
    align-items: center;
}

.exercise-info .iters-time .fa-redo,
.exercise-info .iters-time .fa-clock {
    color: #cccccc;
    margin: 0 0.6ch;
}

.exercise-info .iters-time hr {
    display: block;
    border: none;
    width: 3px;
    height: 70%;
    background-color: var(--border-c);
    margin: 0 1ch 0 1.3ch;
}

.table tr.extended-row {
    border-bottom: 2px solid lightgray;
    background-color: rgb(250, 250, 250);
    color: grey;
}

.table tr.extended-row td:not(:first-child) {
    padding-left: 2ch;
}

.table tr.extended-row span.exercise-name {
    font-weight: bold;
    display: inline-block;
    padding-right: 2ch;
    width: 30ch;
    vertical-align: middle;

    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.table tr.extended-row span.iter-done {
    color: rgb(219, 141, 52);
    display: inline-block;
    width: 15ch;
}

.table tr.extended-row span.elapsed-time {
    color: rgb(52, 152, 219);
    display: inline-block;
    width: 25ch;
}

.table tr.extended-row span.exercise-name::before {
    content: "*";
}

.table tr.extended-row .exercise-line:hover {
    background-color: rgb(191, 230, 173);
}

button.table-tool {
    margin-right: 1ch;
}

.table tr.copy-source,
.single-row.copy-source {
    border: 2px dashed #ff9500;
    background-color: #ffea0054;
}

/* NOTE: There is a bug in Chrome where the 'th' element is over lower 'td' element's border */
.table.fix-head-border thead th {
    border-bottom: 1px solid #dee2e6;
}

.table tr > td {
    vertical-align: middle;
}

.single-row {
    display: flex;
    justify-content: space-between;
    gap: 2ch;
    border: 1px solid #dee2e6;
    border-radius: 0.3ch;
    padding: 1ch;
}

.single-row > * {
    white-space: nowrap;
}

.top-right-corner {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

#notif-select-actions {
    display: inline-flex;
    gap: 1rch;
}

#notif-select-actions .space {
    margin: 0 2.5rch 0 3.5rch;
}

#notif-select-actions .space::after {
    content: "|";
}

/* -- PROFILES ---------------------------------------------------------------- */

.profile-header {
    min-height: 300px;
    padding-top: 50px;
    background-color: #3498DB;
    text-align: center;
    vertical-align: middle;
    margin-bottom: 50px;
    font-size: 0.9em;
}

.profile-header.minimal {
    min-height: auto;
}

.profile-header.minimal .title {
    margin-left: 0;
}

.profile-header > .avatar img,
.dropdown-toggle > .avatar img {
    -webkit-border-radius: 1000px;
    -moz-border-radius: 1000px;
    border-radius: 1000px;
    -webkit-box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.12);
    -moz-box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.12);
    box-shadow: 4px 4px 7px rgba(0, 0, 0, 0.12);
}

.profile-header .avatar {
    display: inline-block;
    position: relative;
    margin-top: 15px;
    z-index: 100;
}

.profile-header .avatar img {
    width: 200px;
    height: 200px;
}

.profile-header .title {
    display: inline-block;
    margin-left: 20px;;
    text-align: left;
    vertical-align: middle;
    text-shadow: 5px 5px 5px rgba(0, 0, 0, 0.17);
}

.profile-header .title .principal-text {
    margin-bottom: 0;
    color: #F8F8F8;
    font-size: 40pt;
}

.profile-header .title .secondary-text {
    display: block;
    margin-bottom: 0;
    color: #F8F8F8;
}

.profile-header .title .terciary-text {
    margin-left: 5px;
}

.profile-header .tabs{
    max-width: 500px;
    margin-top: 40px;
}

.profile-header .nav-tabs {
    background-color: transparent;
    margin-bottom: -1px;
    flex-wrap: nowrap;
}

.profile-header .nav-link {
    border: 0px;
    color: #FFF;
    outline: 0;
    text-transform: uppercase;
    padding: 10px 15px;
}

.profile-header .nav-link > p {
    margin: 0 0 1px;
}

.nav-link{
    color: #7B8A8B;
    outline: 0;
    text-transform: uppercase;
}
.profile-header .nav-link:not(.active):hover {
    background-color: #7BBCE8 !important;
}

.profile-header .nav-item.active > .nav-link,
.nav-item.active > .nav-link:hover,
.nav-item.active > .nav-link:focus {
    border: 0px !important;
}

@media only screen and (max-width: 768px) {
    .profile-header .avatar img {
        width: 175px;
        height: 175px;
    }
}

.bio-info {
    border: 1px solid rgb(150, 150, 150);
    border-radius: 10px;
    padding: 25px;
    font-family: Georgia, serif;
    font-style: italic;
}

.bio-info .outter {
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(136, 136, 136);
}

.bio-info .outter::before {
    padding-right: 35px;
    content: open-quote;
    font-size: 4em;
    color: #7a7a7a;
    height: 75px;
}

.bio-info .no-bio-msg {
    display: inherit;
    font-style: italic;
}

.card .avatar {
    position: relative;
    margin-top: 0px;
    margin-right: 10px;
    z-index: 100;
    display: inline-block;
}

.card .avatar img {
    width: 110px;
    height: 110px;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    border: 5px solid #FFF;
}

.object-views {
    position: absolute;
    top: 0px;
    z-index: 100;
    background-color: #333a40b0;
    color: white;
    padding: 3px 10px;
    border-radius: 0 0 5px 5px;
}

.object-views a {
    color: rgba(255, 255, 255, 0.534);
    margin: 0px;
    padding: 0px;
    border-radius: 0 0 5px 5px;
}

.object-views a:first-child {
    margin-left: 10px;
}

.object-views a+a::before {
    margin: 0px 10px;
    content: "|";
    color: rgba(255, 255, 255, 0.534);
    font-weight: normal;
}

.object-views a:hover {
    text-decoration: none;
    color: white;
    cursor: pointer;
}

.object-views a.active {
    color: rgb(253, 240, 180);
    font-weight: bold;
}

/* -- PANELS AND CARDS  ------------------------------------------------------- */

.card hr {
    margin: 0px 0px;
}

.fw-card {
    width: 13rem;
    font-size: 1.1rem;
    margin: 10px;
}

.fw-card .card-title {
    font-size: 1em;
    margin-bottom: 5px;
}
.fw-card .card-img-top { max-height: 13rem; }
.fw-card .card-text { font-size: 0.7em; }
.fw-card .card-body { padding: 1rem; }

.card-body.panel-table {
    padding: 0px;
}

.card-body.panel-table .help {
    padding: 13px;
}

hr.dimm,
.card-body.panel-table hr {
    border-top: 1px solid rgba(0,0,0,.1);
}

.card-admin .card-body hr {
    border-top: 1px solid rgba(0, 0, 0, 0.377);
}

.card-admin .card-title {
    margin-bottom: 0px;
}

.card-with-nav {
    margin-top: 0px;
}

.cards-panel {
    padding-bottom: 40px;
}

.panel-table table {
    font-size: 0.9em;
}

.about-panel .description {
    margin: 75px auto;
    text-align: center;
    font-size: 18pt;
}

.about-panel .contact {
    margin: 50px auto;
    text-align: center;
}

.about-panel .contact .big-icon {
    font-size: 60pt;
}

.address-footer {
    position: absolute;
    width: 100%;
    margin-left: -15px;
    bottom: 60px;  /* given by footer height */
}

.address-footer-spacer {
    margin-bottom: 40vh;
}

.address-footer h4,
.address-footer h5 {
    text-transform: uppercase;
}

.address-footer .address-map {
    margin: 0px;
    padding: 0px;
    height: 15vh;
    width: 100%;
    object-fit: cover;
    overflow: hidden;
}

.address-footer .address-bar {
    display: flex;
    justify-content: center;
    color: #F8F8F8;
    background-color: #F39C12;
    padding: 15px;
    width: 100%;
}

.nav-for-card {
    border-bottom: 0px;
}

.nav-for-card .nav-link.active {
    position: relative;
    z-index: 100;
    font-weight: bold;
    border-bottom: 1px solid rgb(247, 247, 247) !important;
    background-color: rgb(247, 247, 247);
}

.table tr.selected,
.cell-card.selected {
    animation: yellow_highlight 2s;
}

.no-items-msg {
    font-size: 1.3em;
    padding-top: 2rem;
    color: gray;
}

.cell-card a {
    color: inherit;
}

.cell-card a.name {
    font-weight: bold;
    text-transform: uppercase;
}

.cell-card a:hover {
    color: #0056b3;
}

.cell-card .actions {
    float: right;
    color: white;
}

.cell-card tr td:first-child {
    color: grey;
}

.cell-card:not(.last) {
    border-bottom: 1px solid rgb(180, 180, 180);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.form-control::placeholder {
    color: rgb(197, 197, 197);
}

.end-user-profile h1 {
    margin-bottom: 0;
}
.end-user-profile img {
    width: 200px;
    display: block;
    margin: auto;
}

.end-user-profile .bagde {
    color: grey;
}

.end-user-profile .value {
    font-weight: bold;
}

.end-user-profile .row {
    display: flex;
}

.end-user-profile .col {
    flex: 50%;
    padding: 10px;
}

.user-data-block {
    display: inline-block;
    vertical-align: text-top;
    text-decoration:none !important;
}

.user-data-block .name {
    font-size: 15pt;
    color: #2C3E50;
    word-spacing: 1pt;
    font-weight: bold;
    margin-bottom: 4px;
}

.user-data-block .username {
    margin-top: -5px;
    margin-bottom: 0px;
}

.phyxio-card-header {
    background-color: #343a40;
}

.home-dashboard > *,
.health-dashboard > * {
    border-radius: 5px;
    border: 1px solid gray;
    margin-bottom: 1em;
}

.home-dashboard {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.home-dashboard > * {
    height: 250px;
}

.home-dashboard > div,
.health-dashboard > div {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    color: lightgray;
}

.health-dashboard {
    display: grid;
    gap: 0.5em;
    grid-template-columns: 1fr 1fr;
    justify-items: stretch;
    padding: 0;
}

.health-dashboard > * {
    height: 300px;
}

.input-group-prepend:has(div input.is-invalid) ~ .invalid-feedback {
    display: block;
}

.input-group-prepend:has(div input.is-invalid) ~ input {
    border-color: #dc3545;
}

.form-control:disabled, .form-control[readonly] {
    background-color: inherit;
    opacity: 1;
}

/* -- LOGIN / RESET PWD ------------------------------------------------------- */

.login-reset-password-form {
    margin: 50px auto;
    max-width: 340px;
}

form[role=login-reset-password] {
    font: 13px/2.2em;
    color: #999;
}

form[role=login-reset-password] label {
    font-size: 15px;
    font-weight: normal;
}

form[role=login-reset-password] input[type=checkbox] {
    display: inline-block;
    margin-right: 5px;
}

form[role=login-reset-password] button {
    margin-top: 15px;
}

.login-reset-password-form .card-body {
    padding: 40px 40px 20px;
}

.lang-change {
    padding-top: 1em;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.3em;
}

.lang-change button {
    border: 1px solid gray;
    padding: 1px;
}

.lang-change img {
    height: 16px;
}

/* -- NOTIFICATIONS DASH ------------------------------------------------------ */

tr.pending {
    --color: white;

    font-weight: bold;
    background-color: #95e1ff1c;
}

tr.important { --color: #ffaa004f; }
tr.critical  { --color: #ff00004d; }

td.level-important::after,
td.level-critical::after {
    background-color: var(--color);
    font-weight: bold;
    padding: 0.2ch;
    border-radius: 0.5ch;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

td.level-important::after {
    content: "!";
}

td.level-critical::after {
    content: "!!";
}

.notif-content {
    border: 2px solid black;
    border-top: none;
}

tr.row-active {
    border: 2px solid black;
    border-bottom: none;
    background-color: #ffffe0;
}

.notif-content td {
    padding: 2ch 3ch;
}

.notif-content:hover {
    background-color: transparent !important;
}

/* -- ANIMATIONS -------------------------------------------------------------- */

@keyframes yellow_highlight {
    0% {
    	color: inherit;
	    background: rgb(233, 184, 23);
    }
    100% {
	    color: inherit;
	    background: none;
    }
}

/* -- 40x ERRORS -------------------------------------------------------------- */

.error-content {
    background-color: #75818ca6;

    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
}

.error-content.error-403 {
    background-color: #788c75a6;
}

.error-content > div {
    text-align: center;
    flex: 1;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.error-content .fs-card {
    border: 5px solid white;
    position: relative;
    padding: 0px;
    margin: 0px 0px 50px 0px;
    border-radius: 15px;
    box-shadow: 3px 3px 28px -9px rgba(0,0,0,0.75);
    flex: 1;
    flex-shrink: 3;
    flex-basis: 50%;
}

.error-content .fs-card img {
    border-radius: 15px;
    filter: brightness(40%);
}

.error-content .fs-card-left {
    text-align: left;
    color: white;
    position: absolute;
    margin: 50px;
    top: 0px;
    left: 0px;
    font-size: 2.1em;
    font-weight: bold;
}

.error-content .fs-card-left small {
    font-size: 0.9em;
}

.error-content .fs-card-right {
    text-align: left;
    color: white;
    position: absolute;
    margin: 50px;
    top: 30%;
    transform: translateY(calc(-50% - 50px));
    right: 0px;
    font-size: 10em;
    font-weight: bold;
}

.info-msg {
    border-radius: 8px;
    margin: 0 4ch 3ch;
    padding: 10px;
    font-size: 1.1em;
    text-align: left;
}

.info-msg.level-success {
    border: 2px dotted rgb(57, 165, 62);
    background-color: rgba(179, 255, 183, 0.205);
    color: #227a1f;
}

.info-msg.level-info {
    border: 2px dotted rgb(32, 85, 146);
    background-color: rgba(179, 214, 255, 0.205);
    color: #1f467a;
}

.info-msg.level-error {
    border: 2px dotted rgb(165, 57, 57);
    background-color: rgba(255, 179, 179, 0.205);
    color: #7a1f25;
}

/* -- MISC -------------------------------------------------------------------- */

.FIXME:before {
    color: red;
    content: "FIXME";
}
