:root {
    --badge-bg: #EEE;
    --badge-bg-stronger: #FFF;

    --tag-badge-bg: #edf6f8;
    --tag-badge-border: #c7dde4;
    --tag-badge-text: #3f5f69;

    --summernote-fullscreen-margin: 24px;

    --header-bg: #e3ecef;
    --header-icon-bg: #f5f8f9;
}

[data-theme="dark"] {
    --badge-bg: #111;
    --badge-bg-stronger: #000;

    --tag-badge-bg: #20343b;
    --tag-badge-border: #385963;
    --tag-badge-text: #bed5dc;

    --header-bg: #1f2d32;
    --header-icon-bg: #2b3d43;
}

.roux-input > .resource
{
    flex-grow: 1;
    /* max-width: fit-content; */
    border-radius: var(--input-fixed-raidus);
    background-color: var(--input-bg);
    padding: 5px 10px;

    margin: 0px;

    transition: color 0.4s, background-color 0.4s, box-shadow 0.4s;    

    display: flex;
    flex-direction: row;
    justify-content: center;
}

.roux-input > .resource > img:not(.resource-thumb)
{
    min-height: 100px;
    max-height: 200px;
}

.resource-thumb
{
    max-height: 150px;
    max-width: 100%;
    height: auto;

    cursor: pointer;
    border-radius: 8px;
    
}

.roux-input > .resource > svg
{
    max-width: 100%;
    max-height: 100px;
}

.fullscreen
{
    position: absolute;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 0;
    height: 0;

    background-color: rgba(0,0,0,.8);
    text-align: center;
    opacity: 0;

    transition: opacity 0.4s;
}

.fullscreen:has(.fullscreen-image)
{
    opacity: 1;

    width: 100vw;
    height: 100vh;
}

.fullscreen.clearing-image
{
    opacity: 0;
}

.fullscreen-image
{
    padding: 30px;
    max-height: calc(100vh - 65px);
    max-width: calc(100vw - 65px);
    margin-left: auto;
    margin-right: auto;
}

#flipbookContainerBack
{
    background: rgba(0, 0, 0, 0.7); 
    overflow: hidden auto; 
    z-index: 2043; 
    outline: 0 !important; 
    -webkit-backface-visibility: hidden; 
    height: 100%; 
    width: 100%; 
    position: fixed; 
    left: 0; 
    top: 0;
}

#flipbookContainerFrame
{
    padding-top: 40px; 
    padding-bottom: 40px; 
    text-align: center; 
    position: absolute; 
    left: 0; 
    top: 0; 
    padding: 0 8px; 
    padding-top: 0px; 
    padding-bottom: 0px; 
    box-sizing: border-box; 
    height: 100%; 
    width: 100%; 
    line-height:100vh;
}

#flipbookContainerSubFrame
{
    line-height: 0; 
    width: 100%; 
    max-width: 900px; 
    cursor: auto; 
    position: relative; 
    display: inline-block; 
    vertical-align: middle; 
    margin: 0 auto; 
    text-align: left; 
    z-index: 1045; 
    box-shadow: 0 0 5px rgba(0,0,0,.5);
}

#flipbookCloseButton
{
    position: relative; 
    top:-10px; 
    color: #FFF; 
    right: 0px; 
    text-align: right; 
    padding-right: 6px; 
    width: 100%; 
    overflow: visible; 
    cursor: pointer; 
    background: 0 0; 
    border: 0; 
    -webkit-appearance: none; 
    display: block; 
    outline: 0; 
    padding: 0; 
    padding-right: 0px; 
    z-index: 1046; 
    box-shadow: none; 
    touch-action: manipulation; 
    font-size: 18px;
}

.country-flag-icon, .country-flag-icon > img
{
    width: 20px;
    height: 15px;
}

.wizard-pane
{
    display: none;
}

.wizard-pane.active
{
    display: block;
}

.finance-value
{
    font-family: "consolas";
}

.roux-dot
{
    height: fit-content;
    line-height: 0;
}

/*Badges*/

.role-badge
{
    display: flex;
    flex-direction: row;
    align-items: center;

    border-radius: 5px;
    background: var(--badge-bg);
    /* border-left: 3px solid #888; */
    padding: 6px;
    margin-right: 5px;
    margin-bottom: 5px;

    transition: color 0.4s, background-color 0.4s;
}

.role-badge.rounded
{
    border-radius: 999px;
}

.role-badge.stronger-bg
{
    background-color: var(--badge-bg-stronger);
}


.badge-icon
{
    color: var(--input-icon-color);
    transition: color 0.4s, background-color 0.4s; 
    
    width: var(--pane-label-img);
    height: var(--pane-label-img);

    padding-left: 2px;
    padding-right: 6px;
    border-right: 2px solid var(--pane-label-image-div-line);
    margin-right: 5px;
}

.badge-icon > svg
{
    width: var(--pane-label-img);
    height: var(--pane-label-img);
}

.badge-label
{
    font-family: "MuseoSans-300";
    font-size: 12px;
    color: var(--text-color);
    /* text-transform: uppercase; */
    padding-right: 10px;
}


.role-badge.big
{
    padding: 10px;
    border-radius: 8px;
}

.role-badge.big .badge-label
{
    font-family: "Museo-500";
    font-weight: 500;
    font-size: 16px;
}

/*
Summernote Rules
*/

body.summernote-fullscreen-active .note-editor.note-frame.fullscreen,
body.summernote-fullscreen-active .note-editor.note-airframe.fullscreen {
    position: fixed !important;

    top: var(--summernote-fullscreen-margin) !important;
    right: var(--summernote-fullscreen-margin) !important;
    bottom: var(--summernote-fullscreen-margin) !important;
    left: var(--summernote-fullscreen-margin) !important;

    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;

    z-index: 999999 !important;
    background: var(--modal-body-bg-strong, #fff) !important;

    border-radius: var(--modal-body-radius, 20px) !important;
    overflow: hidden !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.35) !important;

    opacity: 1;
}

body.summernote-fullscreen-active .note-editor.fullscreen .note-editing-area {
    height: calc(100dvh - calc(var(--summernote-fullscreen-margin) * 2) - 45px) !important;
}

body.summernote-fullscreen-active .note-editor.fullscreen .note-editable,
body.summernote-fullscreen-active .note-editor.fullscreen .note-codable {
    height: calc(100dvh - calc(var(--summernote-fullscreen-margin) * 2) - 45px) !important;
    overflow-y: auto !important;
}

@media only screen and (max-width: 700px) {
    :root {
        --summernote-fullscreen-margin: 8px;
    }
}

/* Main Summernote frame */
.note-editor.note-frame {
    border: 1px solid var(--input-border, rgba(128,128,128,0.35)) !important;
    border-radius: var(--input-radius, 10px) !important;
    background: var(--input-bg, #fff) !important;
    color: var(--input-text, var(--text-color)) !important;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Toolbar container */
.note-editor .note-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;

    padding: 6px !important;
    border-bottom: 1px solid var(--input-border, rgba(128,128,128,0.35)) !important;

    background: var(--content-sub-pane-bg, #ddd) !important;
}

/* Button groups */
.note-editor .note-btn-group {
    display: flex;
    gap: 2px;

    margin: 0 !important;
    padding: 0 !important;
}

/* Individual toolbar buttons */
.note-editor .note-btn {
    min-width: 28px;
    height: 28px;

    padding: 4px 7px !important;
    margin: 0 !important;

    border: 1px solid var(--pane-label-border, rgba(128,128,128,0.3)) !important;
    border-radius: var(--pill-radius, 6px) !important;

    background: var(--pane-label-bg, rgba(255,255,255,0.8)) !important;
    color: var(--text-color, #111) !important;

    box-shadow: none !important;
    outline: none !important;

    cursor: pointer;

    transition:
        background-color 0.2s,
        color 0.2s,
        border-color 0.2s,
        filter 0.2s;
}

/* Hover */
.note-editor .note-btn:hover {
    background: var(--pill-color-hover, var(--primary-light)) !important;
    color: #fff !important;
    border-color: var(--primary, #1a8fcc) !important;
}

/* Active / pressed button */
.note-editor .note-btn.active,
.note-editor .note-btn:active,
.note-editor .note-btn.note-btn-primary {
    background: var(--primary, #1a8fcc) !important;
    color: #fff !important;
    border-color: var(--primary-dark, #156e9e) !important;
}

/* Disabled */
.note-editor .note-btn.disabled,
.note-editor .note-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Icons inside buttons */
.note-editor .note-btn i {
    color: inherit !important;
}

/* Dropdown caret */
.note-editor .note-icon-caret {
    color: inherit !important;
}

.note-editor .note-dropdown-menu {
    border: 1px solid var(--pane-label-border, rgba(128,128,128,0.3)) !important;
    border-radius: var(--pane-radius, 10px) !important;

    background: var(--content-sub-pane-bg-strong, #eee) !important;
    color: var(--text-color, #111) !important;

    box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
    overflow: hidden;
    padding: 4px !important;
}

/* Dropdown items */
.note-editor .note-dropdown-item {
    color: var(--text-color, #111) !important;
    border-radius: var(--pill-radius, 6px);
    padding: 5px 8px !important;
}

.note-editor .note-dropdown-item:hover {
    background: var(--primary, #1a8fcc) !important;
    color: #fff !important;
}

.note-editor .note-editable {
    background: var(--input-bg, #fff) !important;
    color: var(--input-text, var(--text-color)) !important;

    padding: 10px !important;
    font-family: inherit !important;
    font-size: var(--main-font-size, 14px) !important;
    line-height: 1.45;
}

/* Placeholder text */
.note-editor .note-placeholder {
    color: var(--text-color-soft, #777) !important;
}

[data-theme="dark"] .note-editor.note-frame {
    background: var(--content-sub-pane-bg-strong, #111) !important;
    border-color: var(--pane-label-border, rgba(255,255,255,0.2)) !important;
}

[data-theme="dark"] .note-editor .note-toolbar {
    background: var(--content-sub-pane-bg, #444) !important;
}

[data-theme="dark"] .note-editor .note-btn {
    background: var(--pane-label-bg, rgba(0,0,0,0.8)) !important;
    color: var(--text-color, #eee) !important;
    border-color: var(--pane-label-border, rgba(255,255,255,0.2)) !important;
}

[data-theme="dark"] .note-editor .note-editable {
    background: var(--content-sub-pane-bg-strong, #111) !important;
    color: var(--text-color, #eee) !important;
}

[data-theme="dark"] .note-editor .note-dropdown-menu {
    background: var(--content-sub-pane-bg-stronger, #222) !important;
    color: var(--text-color, #eee) !important;
}

body.summernote-fullscreen-active .note-editor.fullscreen,
body.summernote-fullscreen-active .note-editor.fullscreen .note-editing-area,
body.summernote-fullscreen-active .note-editor.fullscreen .note-editable {
    text-align: left !important;
}

.note-editor.note-frame .note-statusbar .note-resizebar {
    background-color: var(--background-color);
}

.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar {
    border-top: 1px solid var(--text-color) !important;
}


/*
Tags
*/

.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    margin: 2px 4px 2px 0;
    border: 1px solid var(--tag-badge-border);
    border-radius: 6px;
    background: var(--tag-badge-bg);
    color: var(--tag-badge-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

td[data-col-id="tags"] .cell-value-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

/*
.tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid #bfd7df;
    border-radius: 999px;
    background: linear-gradient(180deg, #f2f9fa, #e8f3f6);
    color: #41636d;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 1px 1px rgba(16, 45, 55, 0.04);
}
*/

/*
Page Headers
*/

.roux-page-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 88px;
    padding: 14px 22px;
    box-sizing: border-box;
    background: var(--header-bg);
    border-radius: 14px;
    border: 1px solid var(--border-colour);
    margin-bottom: 10px;
}

.roux-page-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.roux-page-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.roux-page-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 10px;
    background: var(--header-icon-bg);
}

.roux-page-header-icon svg {
    width: 23px;
    height: 23px;
}

.roux-page-header-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.roux-page-header-title {
    font-family: "Museo-700";
    font-size: 1.05rem;
}

.roux-page-header-description {
    font-size: .82rem;
    opacity: .65;
}

.roux-page-header-right,
.roux-page-header-actions,
.roux-page-header-controls {
    display: flex;
    align-items: center;
    gap: 0px;
}

.roux-page-header-right {
    justify-content: flex-end;
    flex-wrap: wrap;
}


.roux-page-header-eyebrow {
    font-family: "Museo-700";
    font-size: .68rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--primary);
}

.roux-page-header-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(128,128,128,.18);
    box-sizing: border-box;
}

.roux-page-header-controls-row-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.roux-page-header-controls-row-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}


@media (max-width: 750px) {
    .roux-page-header-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .roux-page-header-right {
        width: 100%;
        justify-content: flex-start;
        padding-left: 62px;
    }

    .roux-page-header-controls-row {
        align-items: stretch;
    }
}
/*
============================================================
COMPACT PAGE HEADER
============================================================
*/

.roux-page-header--compact
{
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 12px;

    box-sizing: border-box;

    border: 0;
    border-radius: 0;
    box-shadow: none;

    background: transparent;

    min-height: 50px;
}


/*
    Header top row

    info = icon + title
    right = actions
*/

.roux-page-header--compact .roux-page-header-top
{
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;

    width: 100%;
    min-width: 0;

    gap: 10px;

    margin: 0;

    /*
        The divider belongs to the header itself so it is
        present whether or not the page has controls.
    */
    padding: 0 0 10px;

    border-bottom: 1px solid var(--border-colour);
}


/*
    Icon + title
*/

.roux-page-header--compact .roux-page-header-info
{
    display: grid;

    grid-template-columns:
        38px
        minmax(0, 1fr);

    align-items: center;

    width: auto;
    min-width: 0;

    gap: 10px;

    margin: 0;
    padding: 0;

    justify-content: initial;
}


.roux-page-header--compact .roux-page-header-icon
{
    display: flex;

    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    min-width: 38px;

    margin: 0;
    padding: 0;

    border-radius: 9px;
}


.roux-page-header--compact .roux-page-header-icon svg
{
    width: 18px;
    height: 18px;

    margin: 0;
}


.roux-page-header--compact .roux-page-header-text
{
    display: block;

    width: auto;
    min-width: 0;

    margin: 0;
    padding: 0;
}


.roux-page-header--compact .roux-page-header-eyebrow,
.roux-page-header--compact .roux-page-header-description
{
    display: none;
}


.roux-page-header--compact .roux-page-header-title
{
    margin: 0;
    padding: 0;

    font-size: 16px;
    line-height: 1.2;

    text-align: left;
}


/*
    Actions
*/

.roux-page-header--compact .roux-page-header-right
{
    display: block;

    width: auto;
    min-width: 0;

    margin: 0;
    padding: 0;

    justify-self: end;
}


.roux-page-header--compact .roux-page-header-actions
{
    display: flex;

    flex-direction: row;
    flex-wrap: nowrap;

    align-items: center;
    justify-content: flex-end;

    width: auto;

    gap: 6px;

    margin: 0;
    padding: 0;
}


/*
    Icon-only compact action
*/

.roux-page-header--compact
.mobile-portfolio-add-action
{
    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 32px;

    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;

    margin: 0;
    padding: 0 !important;

    border-radius: 50%;
}


.roux-page-header--compact
.mobile-portfolio-add-action svg
{
    width: 14px;
    height: 14px;

    margin: 0;
}


/*
    Controls row
*/

.roux-page-header--compact .roux-page-header-controls-row
{
    display: block;

    width: 100%;
    min-width: 0;

    margin: 10px 0 0;
    padding: 0;

    box-sizing: border-box;

    border-top: 0;
}


.roux-page-header--compact
.roux-page-header-controls-row-main
{
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


.roux-page-header--compact
.roux-page-header-controls-row-right
{
    display: none;
}


/* Roux UI: chevron breadcrumb navigation
   Theme values may be overridden using --roux-breadcrumb-* on a parent. */

.roux-breadcrumb {
    --roux-breadcrumb-panel: var(--cpd-panel, var(--panel-color, #fff));
    --roux-breadcrumb-surface: var(--cpd-panel-soft, var(--content-sub-pane-bg-strong, #f1f5f8));
    --roux-breadcrumb-text: var(--cpd-text, var(--text-color, #16222d));
    --roux-breadcrumb-muted: var(--cpd-muted, var(--text-color-soft, #617282));
    --roux-breadcrumb-border: var(--cpd-border, var(--border-color, #d6e0e7));
    --roux-breadcrumb-accent: var(--cpd-accent, var(--primary-colour, #017093));
    min-width: 0;
    max-width: 100%;
    color: var(--roux-breadcrumb-text);
    box-sizing: border-box;
}

.roux-breadcrumb *,
.roux-breadcrumb *::before,
.roux-breadcrumb *::after { box-sizing: border-box; }

.roux-breadcrumb--panel {
    padding: 11px 13px 12px;
    border: 1px solid var(--roux-breadcrumb-border);
    border-radius: 14px;
    background: var(--roux-breadcrumb-panel);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

.roux-breadcrumb__heading {
    margin: 0 0 8px 3px;
    color: var(--roux-breadcrumb-accent);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.roux-breadcrumb__track {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--roux-breadcrumb-border) transparent;
}

.roux-breadcrumb__list {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 0 0 3px;
    list-style: none;
}

.roux-breadcrumb__item {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    min-width: 65px;
    max-width: min(330px, 55vw);
    height: 45px;
    margin: 0;
    background: var(--roux-breadcrumb-surface);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}

.roux-breadcrumb__item:first-child {
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}

.roux-breadcrumb__item.is-current { background: var(--roux-breadcrumb-accent); }

.roux-breadcrumb__crumb {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    width: 100%;
    min-width: 0;
    min-height: 45px;
    margin: 0;
    padding: 6px 27px 6px 21px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--roux-breadcrumb-text);
    font: inherit;
    line-height: 1.2;
    text-align: left;
    overflow: hidden;
    text-decoration: none;
}

.roux-breadcrumb__item:first-child .roux-breadcrumb__crumb { padding-left: 14px; }
.roux-breadcrumb__button { cursor: pointer; }

.roux-breadcrumb__button:hover,
.roux-breadcrumb__button:focus-visible {
    color: var(--roux-breadcrumb-accent);
    background: var(--roux-breadcrumb-panel);
    outline: none;
}

.roux-breadcrumb__button:focus-visible { box-shadow: inset 0 0 0 2px var(--roux-breadcrumb-accent); }
.roux-breadcrumb__crumb.is-current { color: #fff; font-weight: 700; }

.roux-breadcrumb__kind,
.roux-breadcrumb__label {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.roux-breadcrumb__kind {
    font-size: 9px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .72;
}

.roux-breadcrumb__label { font-size: 12px; line-height: 1.25; font-weight: 700; }

.roux-breadcrumb__item.is-flashing { animation: roux-breadcrumb-flash .9s ease-out 1; }

@keyframes roux-breadcrumb-flash {
    0%, 100% { filter: brightness(1); }
    25%, 55% { filter: brightness(1.4); }
}

@media (prefers-reduced-motion: reduce) {
    .roux-breadcrumb__item.is-flashing { animation: none; }
}

@media (max-width: 820px) {
    .roux-breadcrumb--panel { padding: 10px; }
    .roux-breadcrumb__item { max-width: min(285px, 65vw); }
}

/* The currently selected chevron remains highlighted on hover. */
.roux-breadcrumb__item.is-current .roux-breadcrumb__button:hover,
.roux-breadcrumb__item.is-current .roux-breadcrumb__button:focus-visible {
    background: transparent;
    color: #fff;
    cursor: default;
}

.build-text-muted
{
    font-weight: 300;
    color: var(--button-text-col);
}

.build-text-highlighted
{
    font-weight: 700;
}

