:root {
    /* Text */
    --text-main-black: #121212;
    --text-secondary: #888888;
    --text-disabled: #d0d0d0;

    /* Primary */
    --partisia-blue: #315df8;
    --black-blue: #112157;
    --dark-blue: #2241ae;
    --sky-blue: #9cdaff;
    --sky-blue-light: #e8f6ff;
    --off-black: #121212;
    --grey: #e9e7e8;
    --light-grey: #f4f3f3;
    --navigation-back: #F2F5F;

    /* Secondary */
    --purple: #9e8fe3;
    --light-purple: #d9cded;
    --yellow: #ffd748;
    --yellow-light: #ffeba3;

    /* Error */
    --main-red: #d22011;
    --dark-red: #ac352a;
    --light-red: #fe5502;
    --error-contrast: #fffdfc;

    /* Warning */
    --warning-main-yellow: #ffaa05;
    --warning-dark-yellow: #e0671b;
    --warning-light-yellow: #ffc605;
    --warning-contrast: #fffdfc;

    /* Info */
    --info-main-blue: #315df8;
    --main-dark-blue: #2241ae;
    --info-light-blue: #339be7;
    --info-contrast: #fffdfc;

    /* Success */
    --main-green: #35a12b;
    --dark-green: #237b1c;
    --light-green: #6bca62;
    --success-contrast: #fffdfc;

    /* Action */
    --active: #7a7a7a;
    --hover: #f6f6f6;
    --selected: #7a7a7a;
    --disabled-background: #e2e2e2;
    --focus: #e2e2e2;
    --disabled: #a5a5a5;
    --divider: #e2e2e2;

    /* Common */
    --white: #fffdfc;
    --black: #121212;

    /* Extra grey */
    --avatar-grey: #e6e6e6;
    --icon-light: #dcdcdc;
    --icon-medium: #c0c0c0;
    --icon-dark: #949393;
    --slider-medium: #bebdbe;
    --slider-light: #e9e7e8;

    /* Primary */
    --pbs-font-family: "Instrument Sans";

    /* Typography */
    --pbs-btn-font-weight: 600;
    --pbs-btn-font-size: 14px;
    --pbs-btn-line-height: 24px;
    --pbs-body-small-font-weight: 400;
    --pbs-body-small-font-size: 14px;
    --pbs-body-small-line-height: 20px;

    /* Overwritable variables */
    /* Text inputs */
    --pbs-input-placeholder-color: #000000de;
    --input-focus-color: var(--pbs-primary);
    --input-border-color: rgba(85, 81, 81, 0.87);
    --input-hover-color: black;
    --input-filled-color: #f5f5f5;
    --input-filled-focus-color: #e0e0e0;
    --pbs-input-border-radius: 4px;

    --select-selected-color: #8bbbf1;
    --select-hover-color: rgba(0, 0, 0, 0.04);

    /* Buttons */
    --pbs-btn-padding-x: 16px;
    --pbs-btn-padding-y: 6px;
    --pbs-btn-border-radius: 4px;
    --pbs-text-button-hover-color: var(--pbs-primary-hover);
    --pbs-primary-color: var(--pbs-primary);
    --pbs-primary-bg-color: var(--pbs-theme-light-dark);
    --pbs-primary-color-hover: var(--pbs-primary);
    --pbs-primary-bg-color-hover: var(--pbs-theme-light-dark);
    --pbs-primary-border-color-hover: var(--pbs-theme-light-dark);
    --pbs-primary-color-active: var(--pbs-primary);
    --pbs-primary-bg-color-active: var(--pbs-theme-light-dark);
    --pbs-primary-border-color-active: var(--pbs-primary);

    /* Data table*/
    --pbs-table-color: var(--pbs-theme-light-dark);
    --pbs-table-border-color: #0000001f;
    --pbs-table-header-text-color: initial;
    --pbs-table-body-text-color: initial;
    --pbs-table-row-hover-color: #f5f5f5;
    --pbs-table-bg-active-row: #e9e7e8;

    /* Navigation */
    --pbs-navigation-bg-color: var(--pbs-theme-light-dark);
    --pbs-navigation-color: #949393;
    --pbs-navigation-color-selected: var(--pbs-primary);
    --pbs-navigation-bg-hover: rgb(0, 0, 0, 0.04);

    /* checkbox */
    --checkbox-bg-color: var(--partisia-blue);

    /* Divider color */
    --pbs-divider-color: #e9e7e8;

    /* Chip colors */
    --pbs-chip-bg-color: #eaebea;
    --pbs-chip-border-color: #bcbdbc;

    /* New roots */
    --theme-dark: #121212;
    --theme-partisia: #112157;
    --theme-secondary: #0c194a;
    --light: #ffffff;
    --primary-color: #ffffff00;
    --primary: #0d6efd;
    --secondary: #2241ae;
    --tertiary: #2241aecc;
    --primary-hover: #f6fafd;

    --header-helper-text-color: #9e8fe3;

    --nav-height: 42px;

    /* Overwrite bootstrap overwrite variables to set the theme. */
    --pbs-theme-light-dark: var(--light);
    --pbs-primary: var(--primary);
    --pbs-dark-blue: var(--dark-blue);
    --pbs-tertiary: var(--tertiary);
    --pbs-primary-hover: var(--primary-hover);
    --bs-header-color: var(--text-main-black);
    --pbs-secondary: var(--dark-blue);

    /* analyses statuses*/
    --draft-status-bg: #ededec;
    --draft-status-txt: #6d6c6d;
    --pending-status-bg: #fef1d6;
    --pending-status-txt: #ffaa05;
    --published-status-bg: #dff0dd;
    --published-status-txt: #34a12a;
    --rejected-status-bg: #ef9092;
    --rejected-status-txt: #9d4244;

    /* Login page */
    --login-gradiant-primary: #9cdaff;
    --login-gradiant-secondary: #d9cded;
    --error-red: #d22011;
}

.cursor-pointer {
    cursor: pointer;
}

/* Dividers */

hr.divider-vertical {
    width: 2px;
    background-color: var(--pbs-divider-color);
    border-top: none;
}

.divider-vertical.inset {
    margin-top: 4px;
    margin-bottom: 4px;
}

hr {
    opacity: initial;
    margin: 0;
}

.divider {
    border: 1px solid var(--pbs-divider-color);
}

hr.divider.inset {
    width: 90%;
    margin: 0 auto;
}

/* Card */

.card {
    border-radius: 4px;
    box-shadow:
        0 2px 1px -1px rgba(0, 0, 0, 0.2),
        0 1px 1px 0 rgba(0, 0, 0, 0.14),
        0 1px 3px 0 rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.card-outlined {
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.card-text-container {
    padding: 20px 20px 8px;
}

.card-header {
    font-weight: 500;
    font-size: 20px;
    line-height: 160%;
    border-bottom: none;
    background-color: white;
    padding: 0 0 16px;
}

.card-section {
    padding-bottom: 24px;
}

.card-sub-header {
    font-weight: 500;
    line-height: 175%;
    padding-bottom: 8px;
}

.computation-text-section {
    padding: 0 0 16px;
}

.card-text-label {
    font-size: 12px;
    line-height: 12px;
    color: #888888;
    padding-bottom: 8px;
}

.card-computation-text {
    line-height: 24px;
    color: #121212;
}

/* Text-input */

.text-standard,
.text-outlined,
.text-filled {
    position: relative;
    width: 100%;
}

.text-standard > input,
.text-standard > select,
.text-outlined > input,
.text-filled > input {
    width: 100%;
    border: none;
    padding: 1rem 0.75rem 0.25rem 0.25rem;
    outline: none;
    background-color: transparent;
}

.text-outlined > input,
.text-filled > input {
    padding: 1rem 0.75rem 0.25rem 0.75rem;
    border: 1px solid var(--input-border-color);
    border-radius: 4px;
}

.text-filled > input {
    border: none;
    border-radius: 4px 4px 0 0;
    background-color: var(--input-filled-color);
}

/* Shared input text label styling */
.text-standard > label,
.text-outlined > label,
.text-filled > label {
    position: absolute;
    pointer-events: none;
    transition: 0.2s ease all;
    cursor: text;
}

.text-standard > label {
    left: 0;
    top: 16px;
    line-height: 12px;
}

.text-outlined > label,
.text-filled > label {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0 0.25rem;
}

.text-filled > label {
    background: transparent;
}

.text-standard > input:focus + label,
.text-standard > input:not(:placeholder-shown) + label,
.text-standard > input[required]:valid + label,
.text-standard > select:focus + label,
.text-standard > select:required:valid + label,
.text-standard > input:focus + label,
.text-standard > select:focus + label,
.text-outlined > input:focus + label,
.text-outlined > input:not(:placeholder-shown):not(:focus) + label,
.text-standard > input.active + label {
    top: 0;
    font-size: 0.75rem;
}

.text-standard > input[readonly] {
    cursor: initial;
}

.text-standard > input:not([readonly]):focus + label,
.text-standard > select:not([readonly]):focus + label,
.text-outlined > input:focus + label,
.text-filled > input:focus + label,
.text-standard > input.active + label {
    color: var(--input-focus-color);
}

.text-filled > input:focus + label,
.text-filled input:not(:placeholder-shown):not(:focus) + label {
    top: 0.75rem;
    font-size: 0.75rem;
}

.text-standard .underline,
.text-standard > .underline,
.text-filled .underline,
.text-filled > .underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background-color: var(--input-border-color);
    transition: all 0.2s ease-out;
}

.text-standard:hover .underline,
.text-standard:hover > .underline {
    height: 2px;
    background-color: var(--input-hover-color);
}

.text-filled:hover .underline,
.text-filled:hover > .underline {
    height: 1px;
    background-color: var(--input-hover-color);
}

.text-standard input:focus ~ .underline-focus,
.text-standard select:focus ~ .underline-focus,
.text-standard > input:focus ~ .underline-focus,
.text-standard > select:focus ~ .underline-focus,
.text-filled input:focus ~ .underline-focus,
.text-filled select:focus ~ .underline-focus,
.text-filled > input:focus ~ .underline-focus,
.text-filled > select:focus ~ .underline-focus {
    left: 0;
    right: 0;
}

.text-standard .underline-focus,
.text-standard > .underline-focus,
.text-filled .underline-focus,
.text-filled > .underline-focus {
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background-color: var(--input-focus-color);
    transition: all 0.3s ease-out;
}

.text-outlined > input:hover {
    border-color: var(--input-hover-color);
}

.text-outlined input:focus {
    border-color: var(--input-focus-color);
}

.text-filled input:focus {
    background-color: var(--input-filled-focus-color);
}

.text-right-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.5rem;
    pointer-events: none;
}

.text-left-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0.5rem;
}

input:is(:-webkit-autofill, :autofill) {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Checkbox */

.checkmark-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Basic checkbox */
.checkbox {
    -webkit-appearance: none;
    width: 1em;
    height: 1em;
    border: calc(1.08px + 0.09em) solid #888888;
    border-radius: calc(1.08px + 0.09em);
    display: inline-block;
    position: relative;
    cursor: pointer;
}

/* Hover effect */
.checkbox::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2em;
    height: 2em;
    background: rgba(70, 130, 190, 0.06);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.checkbox:hover::before {
    opacity: 1;
}

/* Checkmark */
.checkbox:checked {
    border: none;
}

.data-source-checkmark {
    position: absolute;
    height: 100%;
    width: 100%;
    color: var(--checkbox-bg-color);
    pointer-events: none;
}

.checkbox:not(:checked) + .data-source-checkmark {
    display: none;
}

.checkbox-label {
    cursor: pointer;
    margin-left: 8px;
    padding: 8px 0;
    width: 90%;
    vertical-align: middle;
    user-select: none;
}

/* Chip */

.chip {
    padding: 8px 16px;
    border-radius: 100px;
    display: inline-block;
}

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

.chip-border {
    border: var(--pbs-chip-border-color) solid 1px;
}

/* Select */

/* Remove arrow down.*/
.text-standard > select {
    background: transparent none;
    appearance: none;
}

select:has(option:disabled) {
    color: var(--pbs-input-placeholder-color);
}

/* Select dropdown list */
.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    overflow-y: auto;
    background: white;
    border-radius: 0.25rem;
}

.dropdown-list > li:has(input[type="checkbox"]):hover {
    background-color: var(--select-hover-color);
}

.dropdown-list .list-group-item {
    border: none;
}

/** Base button */
.btn {
    --bs-btn-color: var(--pbs-primary-color);
    --bs-btn-padding-x: var(--pbs-btn-padding-x);
    --bs-btn-padding-y: var(--pbs-btn-padding-y);
    --bs-btn-font-size: var(--pbs-btn-font-size);

    --bs-btn-font-weight: var(--pbs-btn-font-weight);
    --bs-btn-line-height: var(--pbs-btn-line-height);
    border: none;
    stroke: var(--pbs-primary-color);
    text-transform: uppercase;
    height: 36px;
    min-width: 64px;
    display: inline-flex;
    align-items: center;
}

.btn:hover {
    --bs-btn-hover-color: var(--pbs-primary-color-hover);
    --bs-btn-hover-bg: var(--pbs-text-button-hover-color);
    border: none;
}

.btn.btn-primary:hover {
    --bs-btn-hover-color: var(--pbs-primary-color-hover);
    --bs-btn-hover-bg: var(--pbs-primary-bg-color-hover);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2),
    0 4px 5px 0 rgba(0, 0, 0, 0.14),
    0 1px 10px 0 rgba(0, 0, 0, 0.12);
}

.btn.btn-outline-primary:hover {
    --bs-btn-hover-border-color: var(--pbs-primary-color-hover);
}

.btn.btn-outline-primary,
.btn-check:checked + .btn.btn-outline-primary,
.btn.active.btn-outline-primary,
.btn.show.btn-outline-primary,
.btn:first-child:active.btn-outline-primary,
:not(.btn-check) + .btn.btn-outline-primary:active {
    border: 1px solid var(--pbs-primary-color-hover);
}

.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
    --bs-btn-active-color: var(--pbs-primary-color-active);
    --bs-btn-active-bg: var(--pbs-primary-bg-color-active);
    border: none;
}

/** Primary button */

.btn-primary {
    --bs-btn-color: var(--pbs-primary-bg-color);
    --bs-btn-bg: var(--pbs-primary-color);
    stroke: var(--bs-btn-color);
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
    0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 1px 5px 0 rgba(0, 0, 0, 0.12);

    /* Hover */
    --pbs-primary-color-hover: var(--pbs-theme-light-dark);
    --pbs-primary-bg-color-hover: var(--pbs-secondary);
    --pbs-primary-border-color-hover: var(--pbs-secondary);

    /* Active */
    --pbs-primary-color-active: var(--pbs-theme-light-dark);
    --pbs-primary-bg-color-active: var(--pbs-tertiary);
    --pbs-primary-border-color-active: var(--pbs-tertiary);
}

.icon-button {
    padding: 4px;
    min-width: 0;
}

/* Data Table */

table {
    background-color: var(--pbs-table-color);
}

thead,
th {
    vertical-align: middle;
    height: 56px;
    background-color: var(--pbs-table-color);
    color: var(--pbs-table-header-text-color);
}

tbody tr {
    vertical-align: middle;
    height: 52px;
    cursor: pointer;
    color: var(--pbs-table-body-text-color);
    border-top: 1px solid var(--pbs-table-border-color);
    border-bottom: 1px solid var(--pbs-table-border-color);
    background-color: var(--pbs-table-color);
}

tbody tr:hover td {
    background-color: var(--pbs-table-row-hover-color);
}

.table-active {
    --bs-table-bg-state: var(--pbs-table-bg-active-row);
}

/*Navigation tabs */

/* Navigation bar */
.navbar-partisia {
    height: auto; /*var(--partisia-nav-height);*/
}

.navbar {
    background-color: var(--pbs-navigation-bg-color);
    box-shadow: 0 2px 1px -1px #00000033;
    padding: 0;
    display: inline-flex;
    height: 42px;
    width: 100%;
    z-index: 100;
}

.nav-tabs-container {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-brand,
.navtab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    color: var(--pbs-navigation-color);
    margin-right: 0;
}

.navtab-content {
    display: inline-flex;
    gap: 0.5rem;
    text-transform: uppercase;
}

.navtab:not(.selected):hover {
    background-color: var(--pbs-navigation-bg-hover);
}

.navtab.selected {
    color: var(--pbs-navigation-color-selected);
}

/* underline indicator */
.navtab.selected::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: var(--pbs-navigation-color-selected);
}

/* Modal */

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 24px 24px 8px;
    border-radius: 4px;
    min-width: 300px;
    min-height: 150px;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 2px 1px -1px #00000033,
    0 1px 1px 0 #00000024,
    0 1px 3px 0 #0000001f;
    overflow: auto;
    display: flex;
    flex-direction: column;

    width: auto;
    height: auto;
}

.modal-header {
    font-size: 24px;
    font-weight: 400;

    padding: 4px;
    border: none;
}

.modal-body {
    flex: 1;
    padding: 4px;
}

.modal-footer {
    text-align: right;

    border: none;
}

/* Typography */

body {
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.15px;
}

.body2 {
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    letter-spacing: 0.17px;
}

.subtitle1 {
    font-weight: 500;
    font-size: 16px;
    line-height: 175%;
    letter-spacing: 0.15px;
}

.subtitle2 {
    font-weight: 500;
    font-size: 14px;
    line-height: 157%;
    letter-spacing: 0.1px;
}

.caption {
    font-weight: 400;
    font-size: 12px;
    line-height: 166%;
    letter-spacing: 0.4px;
}

.body-monofont {
    font-family: "Inconsolata";
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0;
}

.alert-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.15px;
}

.alert-description {
    font-family: "Roboto";
    font-weight: 400;
    font-size: 14px;
    line-height: 143%;
    letter-spacing: 0.15px;
}

.avatar-text {
    font-weight: 500;
    font-size: 20px;
    line-height: 20px;
    letter-spacing: 0.14px;
}

.badge-text {
    font-weight: 500;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0.14px;
}

.bottom-nav-text {
    font-weight: 400;
    font-size: 14px;
    line-height: 166%;
    letter-spacing: 0.4px;
}

.button-large-text {
    font-weight: 500;
    font-size: 15px;
    line-height: 26px;
    letter-spacing: 0.46px;
}

.navtab-content,
.button-text {
    font-weight: 500;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0.4px;
}

.button-small-text {
    font-weight: 500;
    font-size: 13px;
    line-height: 22px;
    letter-spacing: 0.46px;
}

.chip-text {
    font-weight: 400;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: 0.16px;
}

.date-picker-text {
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.15px;
}

.input-label-text {
    font-weight: 400;
    font-size: 12px;
    line-height: 12px;
    letter-spacing: 0.15px;
}

.input-value-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.15px;
}

.input-helper-text {
    font-weight: 400;
    font-size: 12px;
    line-height: 166%;
    letter-spacing: 0.4px;
}

.list-subheader-text {
    font-weight: 500;
    font-size: 14px;
    line-height: 48px;
    letter-spacing: 0.1px;
}

.menu-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    letter-spacing: 0.15px;
}

.menu-dense-text {
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0.17px;
}

thead,
th,
.table-header-text {
    font-weight: 600;
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0.17px;
}

.tooltip-text {
    font-weight: 500;
    font-size: 10px;
    line-height: 14px;
    letter-spacing: 0;
}

.library-text {
    font-family: "Inconsolata";
    font-weight: 500;
    font-size: 64px;
    letter-spacing: -1.5px;
    line-height: 116%;
}

h1 {
    line-height: 120%;
    font-size: 96px;
    font-weight: 400;
    letter-spacing: -1.5px;
}

h2 {
    line-height: 120%;
    font-size: 60px;
    font-weight: 400;
    letter-spacing: -0.5px;
}

h3 {
    line-height: 116%;
    font-size: 48px;
    font-weight: 400;
    letter-spacing: 0;
}

h4 {
    line-height: 124%;
    font-size: 34px;
    font-weight: 400;
    letter-spacing: 0.25px;
}

h5 {
    line-height: 134%;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0;
}

h6 {
    line-height: 160%;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.15px;
}

html,
body,
main,
#content,
.middle-content {
    height: 100%;
    margin: 0;
    padding: 0;
    --bs-body-font-family: var(--pbs-font-family);
}

/* user logo and partisia logo */
.user-avatar {
    height: 36px;
    padding-right: 16px;
}

.partisia-logo {
    height: 24px;
    width: 142px;
}

/* Information box */

.info-box {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 1px -1px #00000033,
    0 1px 1px 0 #00000024,
    0 1px 3px 0 #0000001f;
}

.information-box-left-color {
    width: 8px;
    background-color: var(--main-green);
}

.information-box-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.info-box-header {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    padding-left: 16px;
    font-weight: 500;
}

.info-box-header img {
    width: 22px;
    height: 22px;
}

.info-box-body {
    display: flex;
    flex-direction: row;
    padding-left: 46px;
    padding-bottom: 16px;
}

.info-box-left {
    flex: 2;
    white-space: pre-line;
}

.upload-information-box {
    padding-top: 24px;
}

.upload-error-color > .information-box-left-color {
    background-color: var(--main-red);
}

/* Login page */
#login-page {
    min-height: 100%;
    min-width: 100%;
    padding: 0;
    display: flex;
    background: linear-gradient(302.89deg, var(--light-purple) -3.29%, var(--sky-blue) 73.94%);
}

#login-par-logo-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#login-form-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--error-contrast);
    border-radius: 24px 0 0 24px;
}

/* partisia logo with customizable text color */
.partisia-logo-icon {
    fill: var(--pbs-primary);
}

.partisia-logo-text {
    fill: currentColor;
}

.partisia-logo-full {
    /* default color */
    color: var(--partisia-blue);
}

.login-right-image {
    width: 222px;
}

.login-form-container {
    padding-top: 100px;
}

.login-form-header {
    text-align: center;
    margin-bottom: 1rem;
}

.login-title {
    font-size: 32px;
    line-height: 40px;
    margin: 0;
}

.login-label {
    color: var(--text-main-black);
}

.error-container {
    min-width: 400px;
}

.snackbar {
    opacity: 0;
    align-items: center;
    background-color: var(--main-red);
    color: white;
    display: flex;
    font-weight: 500;
    padding: 6px 16px 6px 16px;
    border-radius: 5px;
    transition: opacity 1s ease;
}

.snackbar.show {
    opacity: 1;
}

.snackbar i {
    margin-right: 12px;
}

.snackbar p {
    padding: 8px 0;
    margin: 0;
}

/* Analysis page */

.analysis-view-container {
    display: flex;
    flex-direction: column;
    height: 95%;
}

.analysis-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    height: 10%;
    padding-top: 40px;
}

.analysis-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-icon {
    width: 20px;
    height: 20px;
}

.analysis-title {
    margin: 0;
}

.text-pill {
    background-color: #ececec;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    padding: 8px 16px;
    border-radius: 100px;
    display: inline-block;
}

.analysis-actions {
    display: flex;
    justify-content: flex-end;
    align-items: start;
    width: 25%;
}

.analysis-view-error-box {
    margin-left: 48px;
    margin-right: 48px;
    margin-top: 24px;
}

.analysis-view-content-container {
    padding-top: 24px;
    padding-left: 40px;
    flex: 1;
}

.analysis-view-content-navbar {
    display: flex;
    align-items: center;
    padding-bottom: 12px;
    flex: 1;
}

.analysis-nav {
    height: 42px;
    background: #84a1ff;
}

#analysis-view-content {
    height: 100%;
}

.analysis-content {
    padding-left: 12px;
    padding-bottom: 24px;
    height: 96%;
}

.analysis-details {
    display: flex;
    gap: 24px;
}

#download-selector {
    margin-left: auto;
}

.download-button-arrow {
    margin-left: 0.2rem;
    margin-bottom: 0.15rem;
}

#download-button-arrow-up {
    display: none;
}

#download-button.show #download-button-arrow-down {
    display: none;
}

#download-button.show #download-button-arrow-up {
    display: inline;
}

.download-option-text {
    margin-left: 5px;
}

.download-option-icon {
    margin-bottom: 3px;
}

/* Date log card */

.date-log {
    padding-bottom: 16px;
}

.data-source-pill {
    margin-right: 8px;
    margin-bottom: 16px;
    text-decoration: none;
    background-color: var(--sky-blue-light);
    color: initial;
}

.analysis-details-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 32%;
}

.analysis-details-right {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Wrapper for search bar and 'create' button */
.search-and-create {
    margin-top: 32px;
    margin-bottom: 40px;
    width: 100%;
    display: inline-flex;
    margin-right: 40px;
}

.search-variables-wrapper {
    height: 40px;
    justify-content: center;
    align-items: center;
}

/* Gap of 0.7 - Used between + and CREATE in the create button. */
.gap-0-7 {
    gap: 0.7rem;
}

.main-content-container {
    padding-right: 40px;
    padding-left: 40px;
}

/* Multi select icon (the arrow down).*/

.multi-select-icon {
    width: 16px;
    height: 16px;
    stroke-width: 1px;
}

.select-icon {
    width: 12px;
    height: 12px;
    stroke-width: 2px;
}

.filter-data-providers {
    padding-bottom: 40px;
}

.multi-select,
.multi-select .container {
    width: 436px;
    padding: 0;
}

.group-multi-select {
    height: 32px;
}

.select-data-source .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.data-source-selected {
    height: 38px;
    padding: 8px 16px;
}

.data-source-selected .badge {
    padding: 2px 8px;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    background-color: var(--primary);
    margin-right: 16px;
}

.data-source-selected .badge .remove-selected {
    margin-left: 0.4em;
    user-select: none;
}

.remove-selected-icon {
    width: 9px;
    filter: brightness(0) invert(1);
    cursor: pointer;
}

.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-container {
    position: absolute;
    width: 160px;
    height: 35px;

    bottom: -38px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    visibility: hidden;
    z-index: 10;
}

.tooltip-text {
    height: 28px;
    border-radius: 4px;
    padding: 4px 8px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
    background: var(--light);

    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0;
}

.tooltip-arrow {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--light);

    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.16);
    z-index: -1;
}

.tooltip-wrapper:hover .tooltip-container {
    visibility: visible;
}

.content-under-nav {
    height: calc(100% - var(--nav-height));
}

.form-header {
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.21);
}

.content-under-nav > form {
    flex: 1;
    min-width: 0;
}

/* Styling applied when a draggable item is dragged. */
.sortable-chosen {
    background-color: #f0f8ff;
    border: 1px dashed #007bff;
}

.monaco-editor-style {
    display: flex;
    position: relative;
    width: 100%;
    height: 90%;
    padding-top: 8px;
}

.editor-top {
    height: 28px;
    background-color: var(--sky-blue-light);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.editor-bottom {
    position: relative;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 2px 1px -1px #00000033,
    0 1px 1px 0 #00000024,
    0 1px 3px 0 #0000001f;
}

.monaco-singleline {
    height: 33px;
}

.monaco-multiline {
    height: 100px;
}

.checkbox-wrapper {
    padding: 0 4px;
}

/* Errors */
.error-page-mascot {
    width: 100px;
    height: 100px;
}

/* Side helper styling */
.create-header {
    width: 100%;
    height: 64px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-bottom: 16px;
    padding-right: 8px;
    display: flex;
    justify-content: center;
    align-items: center;

    button {
        margin: 0 16px;

        &.btn-primary {
            margin-right: 32px;
        }
    }
}

.analysis-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 20px;
    border-radius: 4px;
    font-weight: 400;
    font-size: 12px;
    line-height: 166%;
}

.analysis-status-draft {
    background-color: var(--draft-status-bg);
    border: 1px solid #dddddc;
}

.analysis-status-draft .analysis-status-text {
    color: var(--draft-status-txt);
}

.analysis-status-pending {
    background-color: var(--pending-status-bg);
    border: 1px solid #ffe6b5;
}

.analysis-status-pending .analysis-status-text {
    color: var(--warning-main-yellow);
}

.analysis-status-published {
    background-color: var(--published-status-bg);
    border: 1px solid #c5e2c1;
}

.analysis-status-published .analysis-status-text {
    color: var(--published-status-txt);
}

.analysis-status-rejected {
    background-color: var(--rejected-status-bg);
    color: var(--rejected-status-txt);
}

.analysis-view-status {
    width: 80px;
    margin-left: 28px;
    line-height: 166%;
}

.helper {
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    height: 100%;
}

.helper-shown {
    position: sticky;
    width: 352px;
}

.helper-header {
    display: flex;
    padding-bottom: 12px;
    justify-content: center;
}

.helper-title,
.helper-title > h5 {
    margin-left: 0;
    margin-right: auto;
    margin-bottom: 0;
}

.header-title {
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
}

/* Header for data source. */
.data-source-header {
    margin-top: 32px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
}

.data-source-header .left-group {
    display: flex;
}

.data-source-header h4 {
    margin-bottom: 0;
    margin-left: 8px;
}

.data-provider-header {
    margin-top: 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.data-provider-header img {
    width: 24px;
    height: 24px;
}

.data-provider-details-content {
    padding-left: 20px;
    padding-bottom: 24px;
    height: 92%;
}

.data-provider-data-source {
    margin-top: 40px;
}

.data-provider-create-data-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#create-analysis-form {
    /* Makes sure the "Add query" button does not touch the floor */
    margin-bottom: 20px;
}

.create-analysis-error-box {
    margin-bottom: 16px;
}

.editable-query-title {
    border: none;
    width: 100%;
    outline: none;
}

/* Avatar group styling */
.avatar-group {
    display: flex;
    margin-left: 10px;
}

.avatar {
    margin-left: -10px;
    transition: transform 0.2s;
    border-radius: 100px;
    margin-right: 5px;
}

.more-count {
    width: 24px;
    height: 24px;
    border-radius: 100px;
    background-color: var(--sky-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 400;
    font-size: 12px;
    line-height: 166%;
    letter-spacing: 0.4px;
    text-align: center;
    vertical-align: middle;

    color: var(--partisia-blue);
}

.fill-partisia {
    fill: var(--partisia-blue);
}

/* Auxiliary helper functions */

.right-1 {
    right: 1rem;
}

.right-0-25 {
    right: 0.25rem;
}

/* Width helper styles. */
.w-8 {
    width: 8%;
}

.w-15 {
    width: 15%;
}

.w-20 {
    width: 20%;
}

.w-30 {
    width: 30%;
}

.w-40 {
    width: 40%;
}

.w-45 {
    width: 45%;
}

.w-90 {
    width: 90%;
}

.w-95 {
    width: 95%;
}

.w-100 {
    width: 100%;
}

.mt-10 {
    margin-top: 10px;
}

.size-24 {
    width: 24px;
    height: 24px;
}

.size-32 {
    width: 32px;
    height: 32px;
}

.size-48 {
    width: 48px;
    height: 48px;
}

.width-436 {
    width: 436px;
}

.bottom-170 {
    bottom: -170px;
}

/* Extending bootstrap helper styles */

.flex-grow-1 {
    flex: 1;
}

.flex-grow-2 {
    flex: 2;
}

.flex-grow-3 {
    flex: 3;
}

.flex-grow-4 {
    flex: 4;
}

.divider-vertical-height-1 {
    height: 1rem;
    margin: auto 0;
}

.pb-32 {
    padding-bottom: 32px !important;
}

.wrap-gap-48 {
    flex-wrap: wrap;
    gap: 48px;
}

.search-view-wrapper {
    height: 32px;
    margin: 0 auto;
    width: 600px;
}

.cursor-default {
    cursor: default;
}

.stroke-0 {
    stroke-width: 0;
}

.stroke-primary {
    stroke: var(--pbs-primary);
}

.stroke-theme {
    stroke: var(--pbs-theme-light-dark);
}

.text-standard > input[readonly] {
    font-family: "Inconsolata";
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0;
}

.text-standard > input[readonly] + label {
    padding-left: 4px;
}

.ps-12px {
    padding-left: 12px;
}

.card-text-container2 {
    padding: 40px;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

.no-border-top {
    border-top: none;
}

.ms-1-5 {
    margin-top: 0.35rem;
}

.mb-56px {
    margin-bottom: 56px;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.drag-drop-area {
    height: 96px;
    border-radius: 8px;
    border: var(--text-main-black) dashed 1px;
}

.drag-drop-area.over {
    border-color: var(--partisia-blue);
    background-color: var(--sky-blue-light);
}

.upload-text {
    color: var(--partisia-blue);
    cursor: pointer;
}

.invalid-upload-text-color {
    border-color: var(--main-red);
    color: var(--main-red);
}

.invalid-icon-color path {
    stroke: var(--main-red);
}

.hidden {
    display: none;
}

#file-swap-content table tbody tr:hover td {
    background-color: var(--pbs-table-color);
    cursor: default;
}

.login-btn {
    height: 42px;
    justify-content: center;
    font-weight: 500;
    font-size: 15px;
}

.dropdown-menu {
    width: 220px;
    border-radius: 0.25rem;
    border: none;
    padding: 8px 0;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2),
    0 4px 5px 0 rgba(0, 0, 0, 0.14),
    0 1px 10px 0 rgba(0, 0, 0, 0.12);
}

.logout-item {
    color: var(--partisia-blue);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner-container {
    display: none;
    position: absolute;
    left: 50%;
    transform: translate(-50%);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--partisia-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

#results-loading-indicator.htmx-request {
    display: block;
}

#no-results-text.htmx-request {
    display: none !important;
}

a:has(.organization-name):hover .organization-name {
    text-decoration: underline;
}

a:has(.organization-name) {
    cursor: pointer;
    text-decoration: none;
}

.data-source-chip {
    border-radius: 100px;
    background-color: #e8f6ff;
    padding: 6px;
    margin: 6px 0;
    font-weight: 400;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: 0.16px;
}

.multi-select-display {
    min-height: 48px;
    display: flex;
    flex-wrap: wrap;
    column-gap: 24px;
    align-items: center;
    cursor: pointer;
}

.floating-select {
    position: relative;
}

.floating-select label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #888888;
    transition: all 0.15s ease;
}

.floating-select.floating label {
    top: -6px;
    font-size: 12px;
}
