:root {
    --ea-blue: #4298cc;
    --ea-text: #182552;
    --ea-text-grey: #484848;
    --ea-border: #ddd;
    --white: #fff;
    --pressed-blue: #a0cbe5;
    --hover-blue: #4298cc66;
    --ea-light-grey: #eee;
    --spacing: 8px;
    --ea-whitish-grey: #f7f7f7;
    --ea-brand-grey: #6D6E71;
    --ea-blue-button-hover: #005587;

    /* Base color palette */
    --color-red-50: #FEE2E2;
    --color-red-100: #F6D1D3;
    --color-red-200: #EEA5AA;
    --color-red-400: #DE4852;
    --color-red-500: #B91C1C;
    --color-red-600: #9D0A14;
    --color-green-50: #E1F2ED;
    --color-green-100: #CFEAE3;
    --color-green-200: #A2D8CB;
    --color-green-400: #07926B;
    --color-green-500: #057052;
    --color-green-600: #03533D;
    --color-neutral-50: #F3F4F5;
    --color-neutral-100: #CFD3DC;
    --color-neutral-200: #CFD3DC;
    --color-neutral-300: #B4B8C5;
    --color-neutral-500: #646F82;

    --color-border-default: #DDDDDD;
    --color-focus-outline: #2577A9;

    --color-text-inverted: #ffffff;
    --color-text-ghost: #646F82;

    /* spacing and dimensions */
    --radii-sm: 4px;
    --radii-default: 5px;

    /* Typography */
    --font-core: "Open Sans", sans-serif;
    --font-weight-bold: 600;
    --line-height: 125%;

    /* Borders */
    --focus-outline: 2px solid var(--color-focus-outline);
}  

.pelican {
    color: var(--ea_text);
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
}

.pelican-xl{
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
}

.pelican-sm{
    color: var(--neutral-600---Muted-Text, #6B748E);
    line-height: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* BEGIN: CTA Button */
.pelican-button {
    box-sizing: border-box;
    font-family: var(--font-core);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radii-default);
    border: none;
}
.pelican-button.full-width {
    width: 100%;
}
.pelican-button:not(:disabled) {
    cursor: pointer;
}
/* :focus-visible not supported in Safari 12 but default outline fallback is good enough */
.pelican-button:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* Size = xs, sm, md, base, lg */
.pelican-button.button-size-xs {
    font-size: 12px;
    height: 24px;
    padding: 4px 8px;
    gap: 4px;
    border-radius: var(--radii-sm);
}
.pelican-button.button-size-xs .pelican-svg-icon {
    width: 16px;
    height: 16px;
}
.pelican-button.button-size-sm {
    font-size: 13px;
    height: 32px;
    padding: 8px 12px;
    gap: 6px;
}
.pelican-button.button-size-sm .pelican-svg-icon {
    width: 16px;
    height: 16px;
}
.pelican-button.button-size-md {
    font-size: 14px;
    height: 36px;
    padding: 10px 12px;
    gap: 6px;
}
.pelican-button.button-size-md .pelican-svg-icon {
    width: 20px;
    height: 20px;
}
.pelican-button.button-size-base {
    font-size: 14px;
    height: 44px;
    padding: 10px 16px;
    gap: 6px;
}
.pelican-button.button-size-base .pelican-svg-icon {
    width: 20px;
    height: 20px;
}
.pelican-button.button-size-lg {
    font-size: 16px;
    height: 48px;
    padding: 12px 20px;
    gap: 8px;
}
.pelican-button.button-size-lg .pelican-svg-icon {
    width: 24px;
    height: 24px;
}

/* Colors = primary, destructive, success */
.pelican-button.button-variant-primary.button-color-primary {
    --_button-color-bg: var(--ea-blue);
    --_button-color-hover: #2577A9;
    --_button-color-pressed: #005587;
    --_button-color-disabled: #CFD3DC;
}
.pelican-button.button-color-destructive {
    --_button-color-bg: var(--color-red-400);
    --_button-color-hover: var(--color-red-500);
    --_button-color-pressed: var(--color-red-600);
    --_button-color-disabled: var(--color-red-100);
}
.pelican-button.button-color-success {
    --_button-color-bg: var(--color-green-400);
    --_button-color-disabled: var(--color-green-100);
    --_button-color-hover: var(--color-green-500);
    --_button-color-pressed: var(--color-green-600);
}

/* The only difference between secondary and plain is no border for plain */
.pelican-button.button-variant-secondary.button-color-primary,
.pelican-button.button-variant-plain {
    --_button-color-text: var(--ea-text);
    --_button-color-border: var(--color-border-default);
    --_button-color-hover: var(--color-neutral-50);
    --_button-color-pressed: var(--color-neutral-200);
    --_button-color-disabled: white;
    --_button-color-disabled-text: var(--color-neutral-300);
    --_button-color-disabled-border: var(--color-neutral-100);
}
.pelican-button.button-variant-secondary.button-color-destructive {
    --_button-color-text: var(--color-red-500);
    --_button-color-border: var(--color-red-500);
    --_button-color-hover: var(--color-red-50);
    --_button-color-pressed: var(--color-red-200);
    --_button-color-disabled: white;
    --_button-color-disabled-text: var(--color-red-200);
    --_button-color-disabled-border: var(--color-red-100);
}
.pelican-button.button-variant-secondary.button-color-success {
    --_button-color-text: var(--color-green-600);
    --_button-color-border: var(--color-green-400);
    --_button-color-hover: var(--color-green-50);
    --_button-color-pressed: var(--color-green-200);
    --_button-color-disabled: white;
    --_button-color-disabled-text: var(--color-green-200);
    --_button-color-disabled-border: var(--color-green-100);
}

/* Variants = primary (filled), secondary (outlined), plain (no border) */
.pelican-button.button-variant-primary {
    color: var(--color-text-inverted);
    background-color: var(--_button-color-bg);
}
.pelican-button.button-variant-secondary {
    color: var(--_button-color-text);
    background-color: white;
    border: 1px solid var(--_button-color-border);
}
.pelican-button.button-variant-secondary:disabled {
    color: var(--_button-color-disabled-text);
    border: 1px solid var(--_button-color-disabled-border);
}
.pelican-button.button-variant-plain {
    color: var(--_button-color-text);
    background-color: white;
}
.pelican-button.button-variant-plain:disabled {
    color: var(--_button-color-disabled-text);
}
/* Button states */
.pelican-button:hover {
    background-color: var(--_button-color-hover);
}
.pelican-button:active {
    background-color: var(--_button-color-pressed);
}
.pelican-button:disabled {
    background-color: var(--_button-color-disabled);
}
/* END: CTA Button */

.pelican-legacy-button, .pelican-main-menu {
    display: inline-flex;
    padding: var(--spacing-2, 8px) var(--spacing-3, 12px);
    justify-content: center;
    align-items: center;
    gap: var(--spacing-2, 8px);
    border-radius: 5px;
    border: 1px solid var(--ea-border);
    background: var(--white);
    color: var(--ea-blue);
    cursor: pointer;
}

.pelican-main-menu {
    border: none !important;
    margin-left: 10px;
    margin-top: 10px;
    cursor: pointer;
}

.pelican-legacy-button:active, .pelican-main-menu:active {
    background: var(--pressed-blue);
}

.pelican-legacy-button:hover, .pelican-main-menu:hover, .pelican-main-menu.main_menu_navigation.active {
    box-shadow: 0px 0px 2px 2px var(--hover-blue);
}

.pelican-legacy-button-blue {
    background: var(--ea-blue);
    color: var(--white);
}

.pelican-legacy-button-blue:hover {
    background: var(--ea-blue-button-hover);
}

.pelican-legacy-button-rounded {
    padding: var(--spacing-2, 8px) var(--spacing-3, 20px);
    border-radius: 20px;
}

.pelican-legacy-button-rounded-blue {
    background: var(--ea-blue);
    color: var(--white);
    padding: var(--spacing-2, 8px) var(--spacing-3, 20px);
    border-radius: 20px;
}

.pelican-legacy-button-rounded-blue:hover {
    background: var(--ea-blue-button-hover);
}

/* button similar to view class list */
.pelican-dark-text {
    color: var(--ea-text);
    font-weight: 600;
}

.pelican-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    display: none;
}

 .pelican-popup-header {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    color: var(--ea-text);
    padding: 20px;
    font-size: 18px;
    z-index: 9999;
    overflow: hidden;
}

 .pelican-popup-content {
    position: relative;
    top: 50px;
 }

.pelican-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    font-family: "Open Sans", sans-serif;
    transform: translate(-50%, -50%);
    background: var(--white);
    border-radius: 5px;
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    width: 95vw;
    height: 88vh;
    overflow: auto;
}

.pelican-popup-close {
    position: absolute;
    right: 10px !important;
    top: 10px !important;
    cursor: pointer;
    float: right;
    z-index: 1001 !important;
}

.pelican-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 250px;
    border-radius: 5px;
    border: 1px solid var(--ea-border);
}

.pelican-dropdown::after {
    display: inline-block;
    position: absolute;
    right: 8px;
    top: 50%; /* Start at 50% height */
    transform: translateY(-50%); /* Center vertically */
    content: "";
    background-image: url(../images/chevron_down.svg);
    background-size: 100%;
    width: 16px;
    height: 16px;
    cursor: pointer;
    pointer-events: none; /* allow clicks to pass through to the toggle */
}

.pelican-dropdown.open {
    background-color: var(--color-neutral-200);
}
.pelican-dropdown.open::after {
    transform: translateY(-50%) rotate(180deg);
}
.pelican-dropdown:hover:not(.open) {
    background-color: var(--color-neutral-50);
}

/* Toggle contains text and optional clear button */
.pelican-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    box-sizing: border-box;
    padding: 8px 30px 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    min-height: 20px;
    width: 100%;
}

.pelican-dropdown-toggle-text {
    /* Muted color when no option is selected */
    color: var(--color-text-ghost);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pelican-dropdown[data-selected] .pelican-dropdown-toggle-text {
    color: var(--ea-text);
}
/* Clear button on the dropdown toggle */
.pelican-dropdown-toggle-clear-button {
    all: unset;
    cursor: pointer;
    display: none;
    color: var(--color-neutral-300);
}
.pelican-dropdown-toggle-clear-button .pelican-svg-icon {
    width: 18px;
    height: 18px;
}
.pelican-dropdown-toggle-clear-button:hover {
    color: var(--color-neutral-500);
}

/* Clear button inside the menu */
.pelican-dropdown-clear-button {
    display: none; /* Shown by JS when at least one option is selected */
}
.pelican-dropdown-clear-button .pelican-svg-icon {
    color: var(--color-neutral-300);
}

/* Show all the clear buttons when dropdown is in selected state */
.pelican-dropdown[data-selected] .pelican-dropdown-toggle-clear-button,
.pelican-dropdown[data-selected] .pelican-dropdown-clear-button {
    display: flex;
}

/* Select menu title bar (optional) */
.pelican-dropdown-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
}
.pelican-dropdown-title {
    font-size: 12px;
    color: var(--color-text-ghost);
    font-weight: var(--font-weight-bold);
    /* to prevent layout shift when clear button is shown/hidden */
    padding: 4px 0;
}
.pelican-dropdown-clear-button-text {
    font-size: 12px;
    color: var(--ea-text);
}

.pelican-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 300px;
    background-color: var(--white);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}
.pelican-dropdown-standard .pelican-dropdown-menu {
    padding: 15px 0px;
}

.pelican-dropdown-menu.show {
	display: flex;
	flex-direction: column;
}

.pelican-dropdown-standard .pelican-dropdown-item {
	display: flex;
	align-items: center;
    flex-direction: row;
    gap: 5px;
    background-color: var(--white);
    color: var(--ea-text);
    padding: 2px 0px 2px 20px;
    font-size: 14px;
    font-weight: 400;
    min-height: 45px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
    white-space: nowrap;
    vertical-align: middle !important;
}

.pelican-dropdown-standard .pelican-dropdown-multiselect-item {
    padding: 2px 0px 2px 10px;
    white-space: nowrap;
    vertical-align: middle !important;
}

.pelican-dropdown-standard .pelican-dropdown-item-selected{
    background-color: var(--ea-light-grey);
}

.pelican-dropdown-standard .pelican-dropdown-item:hover {
    background-color: var(--ea-blue);
    color: var(--white);
}

.pelican-dropdown-standard .pelican-dropdown-item div {
    width: 100%;
}

/* Dropdown filters have different style and structure to standard dropdowns */
.pelican-dropdown-select .pelican-dropdown-menu {
    border-radius: 12px;
    /* Allow menu to widen to fit item text content up to a certain point */
    min-width: 100%;
    max-width: 500px;
    width: auto;
}

.pelican-dropdown-select .pelican-dropdown-item {
    display: flex;
	align-items: center;
    flex-direction: row;
    box-sizing: border-box;
    height: 36px;
    gap: 8px;
    padding: 8px;
    font-size: 13px;
    color: var(--ea-text);
    border-radius: var(--radii-default);
    cursor: pointer;
    white-space: nowrap;
}
.pelican-dropdown-select .pelican-dropdown-item.singleselect {
    /* Foce selected check icon to the right end of the item */
    justify-content: space-between;
}
.pelican-dropdown-select .pelican-dropdown-item-selected.singleselect {
    background-color: #E7F5FA;
}
.pelican-dropdown-select .pelican-dropdown-item-selected.singleselect::after {
    content: "";
    background-image: url(../images/circle_check.svg);
    background-size: 100%;
    width: 20px;
    height: 20px;
}
.pelican-dropdown-select .pelican-multiselect-text {
    overflow: hidden;
    text-overflow: ellipsis;
}
.pelican-dropdown-select .pelican-dropdown-item:hover {
    background-color: #E7F5FA;
}
.pelican-dropdown-select .pelican-dropdown-item:focus-visible {
    outline: var(--focus-outline);
}
.pelican-dropdown-select .pelican-dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}
.pelican-dropdown-select .pelican-dropdown-section:not(:last-child) {
    border-bottom: 1px solid var(--color-border-default);
}

.pelican-group-label {
    text-align: center;
    font-weight: 600;
    color: var(--ea-text-grey);
    border-bottom: 1px solid var(--ea-border);
    padding: 5px;
    font-size: 12px;
    line-height: 24px; 
    user-select: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.pelican-switch-label {
    border-radius: 30px !important;
    background-color: var(--white);
    color: var(--ea-blue);
    border: 1px solid var(--ea-border);
}

.pelican-switch-label:before {
    background-color: var(--white);
    color: var(--ea-blue);
}

.pelican-switch-label:after {
    color: var(--ea-blue); 
}

.pelican-switch-label:hover, .pelican-switch-label:hover::after, .pelican-switch-label:hover::before {
    color: var(--white) !important;
    background-color: var(--ea-blue) !important;
}

.pelican-switch-handle {
    width: 18px;
    height: 18px;
    top: 3px;
    left: 3px;
    border-radius: 15px;
}

.scrollbar_top_container {
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px; /* Height of the scrollbar area */
}

.scrollbar_top {
    height: 1px; /* Invisible content */
}

.reset-checkbox:not(:checked),
.reset-checkbox:checked,
.reset-checkbox:not(:checked) + label,
.reset-checkbox:checked + label,
.reset-checkbox:not(:checked) + label:before,
.reset-checkbox:checked + label:before,
.reset-checkbox:not(:checked) + label:after,
.reset-checkbox:checked + label:after {
    position: unset;
    left: unset;
    cursor: pointer;
    margin: 0px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--ea-border);
    border-radius: 4px;
    background-color: white;
    -webkit-appearance: unset;
    vertical-align: middle;
    flex-shrink: 0; 
}

.reset-checkbox:checked,
.reset-checkbox:checked + label,
.reset-checkbox:checked + label:before,
.reset-checkbox:checked + label:after {
    border-color: var(--ea-blue);
    background-color: var(--ea-blue);
    background-image: url('../images/checkbox_tick.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%; /* Size of tick */
}

.pelican-checkbox:not(:checked),
.pelican-checkbox:checked,
.pelican-checkbox:not(:checked) + label,
.pelican-checkbox:checked + label,
.pelican-checkbox:not(:checked) + label:before,
.pelican-checkbox:checked + label:before,
.pelican-checkbox:not(:checked) + label:after,
.pelican-checkbox:checked + label:after {
	/* margin-right: 8px; */
}

/* custom scrollbar component */
/* === SCROLL WRAPPER === */
.custom-scroll-wrapper {
    position: relative;
    overflow: hidden;
    max-height: 100%;
    max-width: 100%;
    border: 0;
}

/* === SCROLL CONTENT === */
.scroll-content {
    overflow: auto;
    height: 100%;
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
}

.scroll-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* === CUSTOM SCROLLBAR BASE === */
.custom-scrollbar {
    position: absolute;
    background: rgba(120, 120, 120, 0.3); /* Scroll track */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    cursor: pointer;
    /* z-index: 1000 !important; */
}

.custom-scroll-wrapper:hover .custom-scrollbar,
.custom-scroll-wrapper.touching .custom-scrollbar {
    opacity: 1;
    pointer-events: auto;
}

/* === CUSTOM SCROLLBAR THUMB === */
.custom-scrollbar-thumb {
    position: absolute;
    background: var(--ea-blue); /* Scroll thumb color */
    border-radius: 5px;
    transition: background 0.3s;
    cursor: pointer;

    /* Touch-friendly sizes */
    /* min-height: 44px;
    min-width: 44px; */
    touch-action: none;
}

.custom-scroll-wrapper:hover .custom-scrollbar-thumb,
.custom-scroll-wrapper.touching .custom-scrollbar-thumb {
    background: var(--ea-blue);
}

/* === VERTICAL SCROLLBAR === */
.custom-scrollbar.vertical {
    top: 0;
    height: 100%;
    width: 8px;
}

.custom-scrollbar.vertical.position-right {
    right: 2px;
}

.custom-scrollbar.vertical.position-left {
    left: 2px;
}

.custom-scrollbar.vertical .custom-scrollbar-thumb {
    width: 100%;
}

/* === HORIZONTAL SCROLLBAR === */
.custom-scrollbar.horizontal {
    left: 0;
    width: 100%;
    height: 8px;
}

.custom-scrollbar.horizontal.position-bottom {
    bottom: 2px;
}

.custom-scrollbar.horizontal.position-top {
    top: 2px;
}

.custom-scrollbar.horizontal .custom-scrollbar-thumb {
    height: 100%;
}

/* Tabs component styles */
.pelican_tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Open Sans", sans-serif;
}
.pelican_tabs input:checked + label {
    color: #fff !important;
    background-color: #4298cc;
    border-bottom: 1px solid #4298cc;
    border-left: 1px solid #4298cc;
    border-top: 1px solid #4298cc;
}
.pelican_tabs .switch-field {
   padding: 10px;
}
.pelican_tabs .switch-field label {
    color: #182552 !important;
    background-color: #F7FAFC;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-left: 1px solid #ddd;
    border-right: 0;
    font-weight: 400;
    font-size: 14px;
    width: max-content;
}
.pelican_tabs .switch-field label:last-child {
    border-right: 1px solid #ddd !important;
}