.portal-table-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2vh;
}

.portal-table__search {
    --portal-table-search-control-height: 3.8vh;
    --portal-table-search-padding-y: 0.9vh;
    position: relative;
    overflow: visible;
    padding: var(--portal-table-search-padding-y) 1.2vh;
    min-height: 5.6vh;
    border: 1px solid #09C269;
    border-radius: 4px;
    background: rgba(30, 165, 160, 0.16);
    box-sizing: border-box;
    cursor: text;
}

.portal-table__search-icon {
    position: absolute;
    left: 1.2vh;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.72);
    font-size: 2.3vh;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 1;
}

.portal-table__search--shake {
    animation: portal-table-search-shake 360ms ease;
}

.portal-table__search-dropdown {
    width: 100%;
    min-width: 0;
}

.portal-table__search-dropdown .Select,
.portal-table__search-dropdown .Select-control {
    width: 100%;
}

.portal-table__search-dropdown .Select-control {
    height: var(--portal-table-search-control-height);
    border-color: transparent !important;
    min-height: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
    outline: none !important;
    cursor: text;
}

.portal-table__search-dropdown .Select-placeholder,
.portal-table__search-dropdown .Select--single > .Select-control .Select-value {
    display: flex;
    align-items: center;
    left: 0;
    max-width: 100%;
    top: 0;
    bottom: 0;
    padding-left: 3.1vh;
    padding-right: 0;
    line-height: var(--portal-table-search-control-height);
}

.portal-table__search-dropdown .Select-placeholder,
.portal-table__search-dropdown .Select-value-label,
.portal-table__search-dropdown .Select-input > input {
    color: #FFFFFF !important;
    font-family: Archivo, sans-serif;
    font-size: 1.9vh;
    cursor: text;
}

.portal-table__search-dropdown .Select-value-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: var(--portal-table-search-control-height);
    padding-left: 0 !important;
}

.portal-table__search-dropdown .Select-value,
.portal-table__search-dropdown .Select-input {
    height: var(--portal-table-search-control-height);
    width: 100%;
    margin-left: 0 !important;
    padding-left: 3.1vh !important;
}

.portal-table__search-dropdown .Select-input > input {
    height: var(--portal-table-search-control-height);
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: var(--portal-table-search-control-height);
    text-indent: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.portal-table__search-dropdown .Select.is-focused > .Select-control,
.portal-table__search-dropdown .Select.is-focused:not(.is-open) > .Select-control {
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.portal-table__search-dropdown .Select-placeholder {
    color: rgba(255, 255, 255, 0.68);
    pointer-events: none;
    user-select: none;
}

.portal-table__search-dropdown .Select.is-focused .Select-placeholder,
.portal-table__search-dropdown:focus-within .Select-placeholder {
    opacity: 0;
    visibility: hidden;
}

.portal-table__search-dropdown .Select-arrow-zone,
.portal-table__search-dropdown .Select-clear-zone {
    display: none;
}

.portal-table__search-dropdown .Select-menu-outer {
    left: -1.2vh;
    top: calc(100% + var(--portal-table-search-padding-y));
    width: calc(100% + 2.4vh);
    margin-top: 0;
    border: 1px solid rgba(9, 194, 105, 0.55);
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #0D3C39;
    overflow: hidden;
    z-index: 2000;
}

.portal-table__search-dropdown .Select-menu {
    background: #0D3C39;
}

.portal-table__search-dropdown .Select-option,
.portal-table__search-dropdown .Select-noresults,
.portal-table__search-dropdown .VirtualizedSelectOption,
.portal-table__search-dropdown .VirtualizedSelectFocusedOption,
.portal-table__search-dropdown .VirtualizedSelectDisabledOption {
    display: block;
    padding: 0.9vh 1.2vh;
    font-family: Archivo, sans-serif;
    font-size: 1.8vh;
    line-height: 1.2;
    color: #FFFFFF;
    background: #0D3C39;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-table__search-dropdown .Select-option.is-focused,
.portal-table__search-dropdown .VirtualizedSelectFocusedOption {
    background: rgba(65, 237, 155, 0.16);
}

.portal-table__search-dropdown .Select-option.is-selected {
    background: rgba(65, 237, 155, 0.22);
}

.portal-table__search-enter-proxy {
    display: none;
}

@keyframes portal-table-search-shake {
    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-0.45vh);
    }

    40%,
    80% {
        transform: translateX(0.45vh);
    }
}

.portal-table__scroll {
    flex: 0 1 auto;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #0D3C39;
}

.portal-table__scroll-inner {
    height: 100%;
    overflow-y: auto;
}

.portal-table__scroll-inner::-webkit-scrollbar {
    width: 4px;
}

.portal-table__scroll-inner::-webkit-scrollbar-track {
    background: transparent;
    margin-top: 14px;
    margin-bottom: 14px;
}

.portal-table__scroll-inner::-webkit-scrollbar-thumb {
    background: #517D7A;
    border-radius: 999px;
}

/* Firefox only: a thin scrollbar to match webkit. Scoped so it does not
   disable the ::-webkit-scrollbar styling in Chromium. */
@supports (-moz-appearance: none) {
    .portal-table__scroll-inner {
        scrollbar-width: thin;
        scrollbar-color: #517D7A transparent;
    }
}

.portal-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate !important;
    border-spacing: 0;
}

.portal-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #0D3C39;
    border-right: 1px solid #0B2927;
    border-bottom: 1px solid #0B2927;
    padding: 12px 12px !important;
    text-align: left;
}

.portal-table thead th:first-child {
    border-top-left-radius: 14px;
}

.portal-table thead th:last-child {
    border-right: none;
    border-top-right-radius: 14px;
}

.portal-table tbody tr {
    background: rgba(13, 60, 57, 0.78);
}

.portal-table tbody tr:nth-child(odd) {
    background-color: rgba(13, 60, 57, 0.78);
}

.portal-table tbody tr:nth-child(even) {
    background-color: rgba(13, 60, 57, 0.78);
}

.portal-table tbody td {
    border-right: 1px solid #0B2927;
    border-bottom: 1px solid #0B2927;
    padding: 12px 12px !important;
}

.portal-table tbody td:last-child {
    border-right: none;
}

.portal-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 14px;
}

.portal-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 14px;
}

.portal-table tbody tr:last-child td {
    border-bottom: none;
}

.portal-table__header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8vh;
    width: 100%;
    background: #0D3C39;
}

.portal-table__header-content--right {
    justify-content: flex-end;
}

.portal-table__header-button {
    display: inline-grid;
    grid-auto-flow: column;
    align-items: center;
    gap: 0.7vh;
    padding: 0;
    border: none;
    background: #0D3C39;
    color: #FFFFFF;
    cursor: pointer;
    font-family: "Red Hat Display", serif;
    font-size: 1.8vh;
    font-weight: 700;
    line-height: 1.2;
}

.portal-table__header-button--right {
    width: 100%;
    justify-content: flex-end;
}

.portal-table__header-static {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    background: #0D3C39;
}

.portal-table__header-static--right {
    justify-content: flex-end;
}

.portal-table__header-button--active,
.portal-table__header-button:hover {
    color: #FFFFFF;
}

.portal-table__info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2vh;
    min-width: 3.2vh;
    height: 3.2vh;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.portal-table__info-button:hover {
    background: rgba(65, 237, 155, 0.12);
    color: #FFFFFF;
}

.portal-table__info-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(65, 237, 155, 0.32);
}

.portal-table__header-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Red Hat Display", serif;
    font-size: 1.8vh;
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
}

.portal-table__icon-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2vh;
    min-width: 2.2vh;
}

.portal-table__header-icon,
.portal-table__info-icon {
    color: #FFFFFF;
    font-size: 2.2vh;
    flex-shrink: 0;
    font-weight: 400;
}

.portal-table__cell {
    color: var(--font-color);
    vertical-align: middle;
    background: rgba(13, 60, 57, 0.78);
}

.portal-table__row--selected .portal-table__cell {
    background-image: linear-gradient(90deg, #0F292A 0%, #0C191C 100%);
    background-repeat: no-repeat;
    background-size: 300% 100%;
    border-right-color: transparent;
    border-bottom-color: transparent;
}

.portal-table__row--selected .portal-table__cell--place {
    background-position: left center;
}

.portal-table__row--selected .portal-table__cell--score {
    background-position: center center;
}

.portal-table__row--selected .portal-table__cell--resilience {
    background-position: right center;
}

.portal-table__row--selected .portal-table__cell--place {
    box-shadow: inset 3px 0 0 #09C269;
}

.portal-table__cell--score {
    font-weight: 700;
    text-align: right;
}

.portal-table__cell--resilience {
    text-align: right;
}

.portal-table__place-button {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.portal-table__place-button:hover {
    color: var(--white);
}

.portal-table__dropdown-row,
.portal-table__dropdown-row:nth-child(odd),
.portal-table__dropdown-row:nth-child(even) {
    background: transparent !important;
}

.portal-table tbody td.portal-table__dropdown-cell {
    padding: 0 !important;
    border-right: none !important;
    border-bottom: none !important;
    background: transparent !important;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
}

.portal-table tbody td.portal-table__dropdown-cell.portal-table__dropdown-cell--closed {
    border: none !important;
}

.portal-table__dropdown-content {
    overflow: hidden;
    max-height: 0;
    width: 100%;
    transform-origin: top center;
    background: #203635;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    opacity: 0;
    transform: translateY(-8px);
}

.portal-table__dropdown-content--open {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    animation: portal-table-dropdown-enter 720ms ease both;
}

.portal-table__dropdown-content--closed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    animation: portal-table-dropdown-exit 720ms ease both;
}

@keyframes portal-table-dropdown-enter {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        max-height: 520px;
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes portal-table-dropdown-exit {
    from {
        max-height: 520px;
        opacity: 1;
        transform: translateY(0);
    }

    to {
        max-height: 0;
        opacity: 0;
        transform: translateY(-8px);
    }
}

.portal-table__dropdown-panel {
    min-height: 0;
    overflow: hidden;
}

.portal-dropdown {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 18px 15px 13px;
    background: transparent;
    color: #FFFFFF;
    font-family: Archivo, sans-serif;
}

.portal-dropdown__cta,
.portal-dropdown__cta:link,
.portal-dropdown__cta:visited,
.portal-dropdown__cta:hover,
.portal-dropdown__cta:focus-visible,
.portal-dropdown__cta:active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 32px;
    padding: 8px 24px;
    box-sizing: border-box;
    border-radius: 32px;
    background: #17524E;
    color: #FFFFFF !important;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-decoration: none !important;
}

.portal-dropdown__cta:hover,
.portal-dropdown__cta:focus-visible {
    background: #1D615B;
}

.portal-dropdown__section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.portal-dropdown__title {
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: #C1C3C4;
    text-transform: uppercase;
}

.portal-dropdown__safety-margin {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.portal-dropdown__metric {
    display: flex;
    flex-direction: column;
    min-height: 48px;
}

.portal-dropdown__metric-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.portal-dropdown__metric-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    color: #FFFFFF;
}

.portal-dropdown__metric-value {
    font-size: 12px;
    font-weight: 700;
    line-height: 14px;
    white-space: nowrap;
}

.portal-dropdown__metric-track {
    position: relative;
    height: 6px;
    margin-top: 9px;
    margin-bottom: 17px;
    border-radius: 20px;
    background: #517D7A;
}

.portal-dropdown__metric-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    border-radius: 20px;
    background: #9BCF17;
}

.portal-dropdown__metric-threshold {
    position: absolute;
    top: -6px;
    width: 2px;
    height: 18px;
    border-radius: 10px;
    background: #FFFFFF;
    transform: translateX(-50%);
}

.portal-dropdown__metric-threshold-label {
    position: absolute;
    top: 12px;
    font-size: 10px;
    line-height: 11px;
    font-weight: 400;
    color: #FFFFFF;
    white-space: nowrap;
    transform: translateX(-50%);
}

.portal-side-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear 0.28s;
}

.portal-side-modal__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(5, 16, 17, 0.58);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.portal-side-modal__panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(488px, 100vw);
    height: 100%;
    padding: 22px 26px;
    box-sizing: border-box;
    background: #0D4642;
    color: #FFFFFF;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.28s ease;
}

.portal-side-modal--open {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.portal-side-modal--open .portal-side-modal__backdrop {
    opacity: 1;
}

.portal-side-modal--open .portal-side-modal__panel {
    transform: translateX(0);
}

.portal-side-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
}

.portal-side-modal__title {
    margin: 0;
    color: #FFFFFF;
    font-family: "Red Hat Display", serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.portal-side-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    font-family: "Red Hat Display", serif;
    font-size: 14px;
    font-weight: 700;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.portal-side-modal__close:hover {
    background: rgba(65, 237, 155, 0.12);
    color: #FFFFFF;
}

.portal-side-modal__close:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(65, 237, 155, 0.32);
}

.portal-side-modal__body {
    min-height: 0;
    overflow-y: auto;
    color: #C1C3C4;
    font-family: Archivo, sans-serif;
    font-size: 12px;
    line-height: 16px;
}

.portal-side-modal__body .info-text {
    color: inherit;
    font-size: 12px;
    line-height: 16px;
}

.portal-side-modal__body .info-text p:first-child,
.portal-side-modal__body .info-text h4:first-child {
    margin-top: 0;
}

.portal-side-modal__body .info-text h4 {
    margin: 24px 0 12px;
    color: #FFFFFF;
    font-family: "Red Hat Display", serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 16px;
}

.portal-side-modal__body .info-text ul {
    margin: 0 0 16px;
    padding-left: 18px;
}

.portal-side-modal__intro {
    margin: 0 0 22px;
}

.portal-side-modal__resilience-table {
    display: flex;
    flex-direction: column;
}

.portal-side-modal__resilience-grid {
    position: relative;
    display: flex;
    flex-direction: column;
}

.portal-side-modal__resilience-grid::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 72px;
    width: 1px;
    background: rgba(255, 255, 255, 0.92);
    pointer-events: none;
}

.portal-side-modal__resilience-header {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 16px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.92);
}

.portal-side-modal__resilience-column-title {
    display: flex;
    align-items: center;
    color: #FFFFFF;
    font-size: 12px;
    line-height: 16px;
    text-transform: uppercase;
}

.portal-side-modal__resilience-column-title:first-child {
    padding-right: 16px;
}

.portal-side-modal__resilience-column-title:last-child {
    padding-left: 16px;
}

.portal-side-modal__resilience-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 16px;
    align-items: stretch;
    min-height: 82px;
}

.portal-side-modal__resilience-row--highlighted {
    background: rgba(255, 255, 255, 0.08);
}

.portal-side-modal__resilience-range {
    padding: 16px 10px 16px 14px;
    color: #FFFFFF;
}

.portal-side-modal__resilience-copy {
    padding: 16px;
}

.portal-side-modal__resilience-label {
    color: #FFFFFF;
    font-style: italic;
    font-weight: 600;
}

/* Punctuation, not label: a text node here would have to be translated too. */
.portal-side-modal__resilience-label::after {
    content: ":";
}

.portal-side-modal__resilience-label:lang(fr)::after {
    content: " :";
}

.portal-side-modal__resilience-description {
    color: #C1C3C4;
}

@media (max-width: 768px) {
    .portal-side-modal__panel {
        padding: 20px;
        border-radius: 0;
    }

    .portal-side-modal__resilience-header,
    .portal-side-modal__resilience-row {
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 12px;
    }

    .portal-side-modal__resilience-copy {
        padding: 14px 12px;
    }
}
