@font-face {
    font-family: 'Avenir Light';
    src: url('fonts/avenir-light.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

html, body {
    font-family: 'Avenir Light', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    font-weight: 200;
    font-size: 12pt;
    background-color: #3b4a54;
    background-image: url('images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header — aligns with the content card edges */
.portal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    max-width: calc(1127px + 2rem);
    margin: 0 auto;
    padding: 45px 0 0 1rem;
}

.portal-header img {
    max-width: 200px;
}

.portal-header .header-buttons {
    display: flex;
    gap: 5px;
}

.portal-header .header-buttons a {
    background-color: rgba(30, 30, 30, 0.7);
    color: rgb(61, 230, 169);
    border: 1px solid white;
    padding: 0.78571429em 1.5em;
    font-size: 12px;
    line-height: 0.7;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    margin-top: 20px;
    font-family: 'Avenir Light', 'Helvetica Neue', Arial, Helvetica, sans-serif;
    font-weight: bold;
    border-radius: 0;
}

.portal-header .header-buttons a:hover {
    opacity: 0.85;
}

/* Content card — matches Semantic UI .ui.segment inside .ui.container.grid
   Original: container.grid = 1127px + 2rem gutters = 1159px
   Segment is sixteen.wide.column with 1rem column padding each side + 1em segment padding
   Search input is inside a five.wide.column adding another 1rem padding each side
   Segment padding is 1em on all sides */
.portal-content {
    background-color: rgba(30, 30, 30, 0.8);
    margin: 30px auto 1rem auto;
    padding: 2em 1em;
    max-width: calc(1127px + 2rem);
    box-sizing: border-box;
    border: 1px solid rgba(34, 36, 38, 0.15);
    border-radius: 10px;
    box-shadow: 0px 1px 2px 0 rgba(34, 36, 38, 0.15);
}

/* Search input — match existing portal style */
.portal-search.mud-input-control {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.portal-search .mud-input-control-input-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.portal-search .mud-input-filled {
    background-color: rgba(30, 30, 30, 0.7) !important;
    border-radius: 0 !important;
    border: 1px solid white !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 38px !important;
    display: flex !important;
    align-items: center !important;
}

.portal-search .mud-input-filled::before,
.portal-search .mud-input-filled::after {
    border: none !important;
}

.portal-search .mud-input-filled:hover {
    background-color: rgba(30, 30, 30, 0.7) !important;
}

.portal-search .mud-input-slot {
    color: #3DE6A9 !important;
    font-size: 10pt !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.portal-search input::placeholder {
    color: white !important;
    opacity: 1;
}

.portal-search .mud-input-adornment .mud-icon-root {
    color: white !important;
}

/* Remove border from the autocomplete outlined wrapper if present */
.portal-search .mud-input-outlined .mud-notchedoutline,
.portal-search fieldset {
    border: none !important;
}

.mud-input-control .mud-input {
    color: #3DE6A9 !important;
}

/* Autocomplete dropdown — match Semantic UI .ui.category.search .results */
.portal-dropdown {
    background-color: #1e1e1e !important;
    border-radius: 0 !important;
    width: 27em !important;
    max-width: 27em !important;
    border: 1px solid white !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    margin-top: 0.5em !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/legacy Edge */
}

/* Hide WebKit/Chromium scrollbar but keep scrolling */
.portal-dropdown::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Remove shadow and background from the MudBlazor popover so only our dropdown shows */
.portal-search .mud-popover,
.mud-popover:has(.portal-dropdown),
.mud-autocomplete .mud-popover {
    box-shadow: none !important;
    background-color: transparent !important;
    border: none !important;
    width: 28em !important;
    max-width: 28em !important;
    overflow: visible !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.portal-search .mud-popover::-webkit-scrollbar,
.mud-popover:has(.portal-dropdown)::-webkit-scrollbar,
.mud-autocomplete .mud-popover::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.portal-dropdown .mud-list {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.portal-dropdown .mud-list-item {
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    min-height: 0 !important;
}

.portal-dropdown .mud-list-item:hover .dropdown-item-content {
    background-color: rgba(30, 30, 30, 0.9);
}

.portal-dropdown .mud-list-item .mud-list-item-text {
    margin: 0 !important;
    padding: 0 !important;
}

/* Category row: "Assets" label left, item content right */
.dropdown-category-row {
    display: flex;
    width: 100%;
}

/* Assets label — each row has the column with right border, text hidden except first */
.dropdown-category-name {
    width: 100px;
    min-width: 100px;
    padding: 0.4em 1em;
    font-weight: bold;
    font-size: 1em;
    color: transparent;
    border-right: 1px solid white;
}

/* Only show "Assets" text on the first item */
.portal-dropdown .mud-list-item:first-child .dropdown-category-name {
    color: #3DE6A9;
}

/* Item content — right column */
.dropdown-item-content {
    flex: 1;
    padding: 0.85714286em 1.14285714em;
}

/* Border between items — only on the right (results) column */
.portal-dropdown .mud-list-item + .mud-list-item .dropdown-item-content {
    border-top: 1px solid white;
}

.dropdown-item-content {
    display: flex;
    flex-direction: column;
}

.dropdown-item-title {
    font-weight: bold;
    font-size: 1em;
    color: #3DE6A9;
}

.dropdown-item-description {
    font-size: 0.92857143em;
    color: #3DE6A9;
}

/* Table styles — match Semantic UI .ui.inverted.table */
.mud-table {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.mud-table .mud-table-head {
    background-color: rgba(0, 0, 0, 0.15) !important;
}

.mud-table .mud-table-head .mud-table-cell {
    color: #3DE6A9 !important;
    font-weight: 200;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.92857143em 0.78571429em !important;
}

.mud-table-cell {
    color: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0.78571429em 0.78571429em !important;
}

.mud-table .mud-table-body .mud-table-row {
    background-color: transparent !important;
}

.mud-table .mud-table-body .mud-table-row:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.mud-table .mud-table-container {
    background-color: transparent !important;
}

/* Custom action icons */
.action-icon {
    display: inline-block;
    padding: 5px;
    cursor: pointer;
    vertical-align: middle;
}

.action-icon:hover {
    opacity: 0.7;
}

.action-icon img {
    width: 17px;
    height: auto;
}

.portal-loading {
    display: flex;
    align-items: center;
    gap: 0.75em;
    padding: 0.85714286em 1.14285714em;
    color: #3DE6A9;
    background-color: #1e1e1e;
    font-size: 1em;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}
