@import '/css/variables.css';
@import '/css/modals.css';

@media (min-width: 968px) {
    :root {
        --gap: 3em;
    }
}

*, ::after, ::before {
    box-sizing: border-box;
    background: none;
    border: none;
    outline-color: var(--primary);
    outline-offset: -1px;
}

body {
    background-color: rgb(242, 242, 242);
    font: 400 1em/1.5 Roboto, sans-serif;
    color: var(--black);
}
.container {
    margin: 0 auto;
    padding: var(--gap) 1rem;
    max-width: 1180px;
    flex-wrap: nowrap;
    justify-content: space-between;
}
h1 {
    fill: var(--primary);
}
h1 small {
    font: 500 1rem/1 Roboto;
    color: var(--secondary);
}
dl,
p {
    margin-bottom: 1em;
}
.prewrap {
    white-space: pre-wrap;
}
dd {
    margin-left: 0;
}
ul {
    list-style-type: none;
    padding: 0;
}
small {
    font-weight: 400;
    color: var(--secondary);
}
button {
    cursor: pointer;
}
dt {
  font-weight: 500;
  color: var(--secondary);
}
sub, sup {
    /* Specified in % so that the sup/sup is the
        right size relative to the surrounding text */
    font-size: 75%;

    /* Zero out the line-height so that it doesn't
        interfere with the positioning that follows */
    line-height: 0;

    /* Where the magic happens: makes all browsers position
        the sup/sup properly, relative to the surrounding text */
    position: relative;
}
sup {
    /* Move the superscripted text up */
    top: -0.5em;
}
sub {
    /* Move the subscripted text down, but only
        half as far down as the superscript moved up */
    bottom: -0.25em;
}
svg {
    overflow: visible;
}

/*Tables*/
.table-wrapper table tbody tr {
    border-top: 1px solid gainsboro;
}
.table {
  width: 100%;
}
.table thead th {
  font-size: .9rem;
  color:  var(--secondary);
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}
.table th,
.table td {
    padding: 0.5rem 0.75rem;
}

[aria-sort] {
    background: url('/img/sprite.svg#Chevron Sort') no-repeat center right -.5em / 1.5em 1.5em;
}
[aria-sort='ascending'] {
    background-image: url('/img/sprite.svg#Chevron Sort Asc');
}
[aria-sort='descending'] {
    background-image: url('/img/sprite.svg#Chevron Sort Desc');
}
[aria-sort]:hover {
    cursor: pointer;
}
.sr-only {
    display: none;
}

.card {
  background: white;
  margin-bottom: 1em;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  border-radius: calc(var(--radius) * 2);
}

a {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}
a:hover {
    text-decoration: none;
}
a:focus {
    outline: none;
}
a.external::after {
    content: "↝";
    color: var(--secondary);
}

/*Buttons*/
.btn {
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    color: var(--primary);
    justify-content: center;
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    font: 700 1em/1.25 Roboto;
    gap: .5em;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}
.btn.disabled {
    background-color: #C9C9C9;
    color: white;
}
.btn.disabled:hover {
    filter: none;
}
.btn > span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn > input {
    display: none;
}
.btn-block {
    width: 100%;
    justify-content: center;
}
.btn-link {
    font-weight: 500;
}
.btn-lg {
    padding: 1.25rem 5rem;
}
.btn-sm {
    font-size: .875rem;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-secondary {
    box-shadow:inset 0px 0px 0px 2px var(--primary);
}
.btn-light {
    font-weight: 500;
    background: white;
}
.btn-light svg {
    fill: var(--secondary);
}
.btn:hover {
    filter: brightness(1.1);
}

.nav-link {
    padding: .5rem .75rem;
    display: inline-flex;
    flex-wrap: wrap;
    font-weight: 500;
}
.router-link-active,
.nav-link.active {
    --primary: var(--black);
}
.navbar .nav-link {
    padding: 1em .75em;
}

.dropdown {
    position: relative;
}
.dropdown-item {
    padding: .25rem .75rem;
    display: inline-flex;
    flex-wrap: wrap;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.dropdown-divider {
    border-top: 1px solid var(--black);
}

.navbar {
    position: relative;
    flex-flow: row nowrap;
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
    margin: 0 -.75rem;
    margin-top: calc(0% - var(--gap));
}
.navbar-brand {
    padding: .75rem;
}

.navbar-toggler {
    fill: var(--primary);
    transform: scale(1.5);
    position: absolute;
    right: .5rem;
    top: 1rem;
}
@media (min-width: 962px) {
    [class^=nav] {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
    }
    .navbar-toggler {
        display: none;
    }
    .navbar-collapse.collapse {
        display: flex !important;
        justify-content: space-between;
        flex-grow: 1;
        align-items: center;
    }
}

.dropdown-menu:not(.show) {
    display: none;
}
.dropdown-menu {
    outline: none;
}
@media (max-width: 962px) {
    .dropdown .dropdown-toggle:after {
        content: '▾';
        margin-left: .5em;
        font-size: small;
        opacity: 0.5;
    }
}
@media (min-width: 962px) {
    .dropdown-menu {
        position: absolute;
        left: 0;
        top: calc(100% + .25em);
        z-index: 1000;
        padding: 1em;
        background: white;
        border-radius: calc(var(--radius) * 2);
        box-shadow: var(--box-shadow);
        min-width: 10em;
    }
    .dropdown-menu-right {
        min-width: 19em;
    }
}
.dropdown-menu-right {
    right: 0;
    left: auto;
}

/*Break sub header to new line*/
h1 {
    display: flex;
    flex-direction: column;
    font: 700 2em/1 Rajdhani;
}

/*Layout*/
body > div#app, div.container, div#notifications {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    gap: var(--gap);
}
/*No auth pages etc*/
@media (min-width: 962px) {
    .no-auth.container:after {
        content: '';
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        pointer-events: none;
        border-color: var(--primary);
        border-width: 0 .5em 0 .5em;
        border-style: solid;
    }
}
.auth h1 {
    margin-right: auto;
}
main {
    display: grid;
    gap: var(--gap) calc(var(--gap) * 2);
    flex-grow: 1;
    align-content: start;
    align-items: start;
}
main > section,
main > aside {
    display: grid;
    gap: var(--gap);
}
main > header {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    gap: 1em;
    grid-column: 1/-1;
}
main > h1 {
    grid-column: 1/-1;
}

/*2 columns layout*/
@media (min-width: 962px) {
    .auth main {
        grid-auto-flow: row;
        grid-template-columns: 1fr 1fr 1fr;
    }
    main > aside {
        order: 2;
    }
    .auth main > section {
        grid-column: auto / span 2;
    }
}

/*Table*/
.table-wrapper {
    background-color: white;
    box-shadow: var(--box-shadow);
    border-radius: calc(var(--radius) * 2);
    overflow-x: auto;
    max-width: calc(100vw - 2em);
    padding: 1em;
}

/*Active item: Bottom underline, navbar white bg*/
.nav-link {
    position: relative;
}
@media (min-width: 962px) {
    .nav-item .nav-link.active:after,
    .nav-item .nav-link.router-link-active:after {
        color: var(--black);
        content: '';
        position: absolute;
        left: .75em;
        right: .75em;
        display: block;
        height: .25em;
        background-color: var(--secondary);
        border-radius: 2px;
        bottom: 0;
    }
}
/*Sidebar with balance*/
/*Reset balance label*/
dl.balance dt:first-of-type {
    color: inherit;
}
/*Increase font size for account balance*/
dl.balance dd:first-of-type {
    font: 600 3em/1.25 Rajdhani;
    display: block;
    margin-bottom: 0;
}
/*Add 'Units' label*/
dl.balance dd:first-of-type:after {
    content: 'Units';
    display: inline;
    font-size: .75em;
    text-transform: uppercase;
    font-weight: 500;
    margin-left: .25em;
}
/*Then mute colors under*/
dl.balance dt:not(:first-of-type),
dl.balance dd:not(:first-of-type) {
    display: inline;
    font-weight: 500;
    color: var(--secondary);
}
dl.balance > dd:after {
    content: '';
    display: block;
}

.badge {
    background: red;
    color: white;
    padding: .15em .4em;
    margin-left: .5em;
    font-size: .75rem;
    border-radius: 1em;
    line-height: 1;
    align-self: center;
}

form {
    max-width: 590px;
}
form > * {
    margin-bottom: 1em;
}
.form-group > label {
    margin-bottom: .5rem;
    font: 500 .875rem Roboto;
    color: var(--secondary);
}
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: .125em;
    margin-bottom: .125em;
}
/*.form-control,*/
.form-group .dropdown,
.custom-select,
input[type="text"],
textarea,
input[type="email"],
input[type="phone"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea {
    border: none;
    box-shadow: inset 0 0 0 1px hsl(0, 0%, 69%);
    border-radius: var(--radius);
    background: white;
    padding: .75rem .75rem;
    width: 100%;
    font: 400 1rem/1 Roboto;
    height: 2.5rem;
}
input[type="textarea"],
textarea {
    height: auto;
}
input.is-invalid,
textarea.is-invalid {
    box-shadow: inset 0 0 0 1px var(--orange-red);
    outline-color: var(--orange-red);
}
.custom-select {
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") right 1rem center/8px 10px no-repeat;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.form-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.form-control > .btn {
    margin: -.75rem 0;
    margin-left: -.75rem;
    padding: .75rem;
    padding-left: 1rem;
}
.custom-control-label {
    font-weight: 500;
    color: var(--black);
}

/*B-Calendar*/
.b-calendar-grid,
.b-calendar-inner {
    display: grid;
    gap: .5em;
    outline: none;
}
.b-calendar .btn {
    height: 2.25em;
    padding: .25rem;
    font-weight: 500;
    justify-content: center;
    display: flex;
}
.b-calendar .btn:not(.active) {
    color: var(--black);
}
.b-calendar .btn[aria-label="Current month"] {
    color: var(--primary);
}
.b-calendar-nav {
    display: flex;
    justify-content: space-between;
}
.b-calendar-grid-weekdays {
    display: grid;
    grid-auto-flow: column;
    text-align: center;
    color: var(--secondary);
    font-size: .9rem;
    font-weight: 500;
}
.b-calendar .row {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}
/*Weekend*/
.b-calendar :nth-child(1n+6) > .btn:not(.active) {
    color: #E03030;
}
.b-calendar-header,
.b-calendar-grid-help {
    display: none;
}
/*Mute prev/next month days*/
.b-calendar .col[aria-hidden="true"] > .btn {
    opacity: 0.5;
    color: var(--secondary);
}
.b-calendar-grid-caption {
    justify-self: center;
    font-weight: 500;
    padding-bottom: 10px;
}
.b-calendar [aria-label*="chevron"] {
    stroke: var(--primary);
}
/*outline*/
.b-form-datepicker.show {
    box-shadow: inset 0 0 0 2px var(--primary);
}
.b-form-datepicker > .btn {
    position: absolute;
    width: 100%;
    justify-content: flex-end;
}

/* screenreader styles */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:active, .sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* input group and append/prepent styles */
.input-group-prepend,
.input-group-append {
  display: -ms-flexbox;
  display: flex;
}
.input-group-prepend .btn,
.input-group-append .btn {
  position: relative;
  z-index: 2;
}
.input-group-prepend .btn:focus,
.input-group-append .btn:focus {
  z-index: 3;
}
.input-group-prepend .btn + .btn,
.input-group-prepend .btn + .input-group-text,
.input-group-prepend .input-group-text + .input-group-text,
.input-group-prepend .input-group-text + .btn,
.input-group-append .btn + .btn,
.input-group-append .btn + .input-group-text,
.input-group-append .input-group-text + .input-group-text,
.input-group-append .input-group-text + .btn {
  margin-left: -1px;
}
.input-group-prepend {
  margin-right: -1px;
}
.input-group-append {
  margin-left: -1px;
}
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-prepend > .input-group-text,
.input-group > .input-group-append:not(:last-child) > .btn,
.input-group > .input-group-append:not(:last-child) > .input-group-text,
.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group > .input-group-append > .btn,
.input-group > .input-group-append > .input-group-text,
.input-group > .input-group-prepend:not(:first-child) > .btn,
.input-group > .input-group-prepend:not(:first-child) > .input-group-text,
.input-group > .input-group-prepend:first-child > .btn:not(:first-child),
.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.input-group > .input-group-prepend > .btn-group > .btn,
.input-group > .input-group-append:not(:last-child) > .btn-group > .btn,
.input-group > .input-group-append:last-child > .btn-group:not(:last-child):not(.dropdown-toggle) > .btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.input-group > .input-group-append > .btn-group > .btn,
.input-group > .input-group-prepend:not(:first-child) > .btn-group > .btn,
.input-group > .input-group-prepend:first-child > .btn-group:not(:first-child) > .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0.75rem 0.75rem;
}
.input-group > .input-group-prepend > .btn-group  {
    padding: inherit;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group > .input-group-append > .btn-group  {
    padding: inherit;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > .input-group-prepend > .btn-group > .btn-secondary,
.input-group > .input-group-append > .btn-group > .btn-secondary {
    box-shadow: unset;
}
.input-group > .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group > .input-group-prepend ~ .form-control {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/*Global*/
.text-success {
    color: green;
}
.text-danger {
    color: red;
}
.text-right {
    text-align: right;
}
.note {
    color: var(--secondary);
}
.nowrap {
    white-space: nowrap;
}

/*Alerts*/
.alert {
    background: var(--secondary);
    border-radius: calc(var(--radius) * 2);
    padding: 1em 1.5em;
    position: relative;
    color: white;
    box-shadow: var(--box-shadow);
}
.alert-danger {
    --secondary: #ff7878;
}

.alert .close {
    position: absolute;
    top: 0.25em;
    right: 0.5em;
    color: white;
}

.alert span {
    display: block;
}

[disabled], [readonly] {
    opacity: 0.75;
    background-color: lightgrey !important;
}

.b-table-bottom-row dt {
    font-size: .9rem;
}
table dl,
table [aria-colindex="3"],
table [aria-colindex="4"],
table [aria-colindex="5"] {
    text-align: right !important;
}

[role="tablist"] {
    margin-bottom: 1em;
    display: flex;
}

.input-group {
    margin-bottom: .75em;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
}
.input-group > .btn {
    padding: .75em;
    color: var(--secondary);
}

textarea::-webkit-scrollbar {
    width: 14px;
}
textarea::-webkit-scrollbar-thumb {
    border: 4px solid rgba(0, 0, 0, 0);
    background-clip: padding-box;
    border-radius: 999px;
    background-color: #AAAAAA;
}

/* Spinner */
@keyframes spinner-border {
  to { transform: rotate(360deg); }
}
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    -webkit-animation: .75s linear infinite spinner-border;
    animation: .75s linear infinite spinner-border;
}

/* Notification and Invitation cards */
.notification.card {
    padding: 1em;
    position: relative;
}
.notification .card-header {
    float: right;
    color: var(--secondary);
}
.notification .card-title {
    font: 700 1.5rem/1 Rajdhani;
    margin-bottom: 1.5rem;
}
.notification.card:not(:hover) .card-title > a {
    color: var(--black);
}
.notification .card-footer {
    display: flex;
    gap: .5rem;
}
.notification .card-title > a:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
.notification.card .btn {
    position: relative;
}
.notification.card:not(:hover) .card-title {
    color: var(--black);
}

/* Help tooltip */
.help-tip{
    text-align: center;
    background-color: var(--primary);
    border-radius: 50%;
    width: 12px;
    height: 12px;
    font-size: 9px;
    line-height: 15px;
    cursor: help;
    display: inline-block;
}

.help-tip:before{
    content:'?';
    font-weight: bold;
    color:#fff;
}

.help-tip:hover p{
    display:block;
    transform-origin: 100% 0%;

    -webkit-animation: fadeIn 0.3s ease-in-out;
    animation: fadeIn 0.3s ease-in-out;

}

.help-tip p{    /* The tooltip */
    display: none;
    text-align: left;
    background-color: #1E2021;
    padding: 20px;
    width: 300px;
    position: relative;
    border-radius: 3px;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    left: -10px;
    color: #FFF;
    font-size: 13px;
    line-height: 1.4;
    z-index: 9999;
    float: left;
}

.help-tip p:before{ /* The pointer of the tooltip */
    position: absolute;
    content: '';
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-bottom-color: #1E2021;
    left: 10px;
    top: -12px;
}

.help-tip p:after{ /* Prevents the tooltip from being hidden */
    width: 100%;
    height: 40px;
    content: '';
    position:  absolute;
    top: -40px;
    left: 0;
}

/* Edit Icon */
.edit-icon::before {
    content: '';
    cursor: pointer;
    display: inline-block;
    height: 24px;
    width: 24px;
    margin-right: 2px;
    background-image: url('/img/sprite.svg#Pencil');

}
.edit-icon-small::before {
    height: 15px;
    width: 15px;
}
.edit-link-wrapper {
    border-bottom: 2px solid var(--light-blue);
    text-align: center;
    color: black;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 5px;
    gap: 0;
}

/* Toast message styles */
.toast-header,
.toast-body {
    padding: 10px;
}

/* CSS animation */

@-webkit-keyframes fadeIn {
    0% { 
        opacity: 0; 
        transform: scale(0.6);
    }

    100% {
        opacity: 100%;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 100%;
    }
}
