Code/UI/InventoryHud.razor.scss
// ─── Variables ───────────────────────────────────────────────────────────────
$slot-size: 74px;
$slot-gap: 5px;
$slot-bg: rgba(0, 0, 0, 0.55);
$slot-border: rgba(255, 255, 255, 0.12);
$slot-hover: rgba(255, 255, 255, 0.08);
$slot-active-border: rgba(255, 220, 80, 0.9);
$slot-drag-border: rgba(100, 180, 255, 0.9);
$panel-bg: rgba(15, 15, 20, 0.92);
$panel-border: rgba(255, 255, 255, 0.1);
$font-color: rgba(255, 255, 255, 0.9);
$font-dim: rgba(255, 255, 255, 0.45);
$radius: 7px;
$radius-sm: 5px;
// ─── Crosshair ───────────────────────────────────────────────────────────────
.crosshair {
position: absolute;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );
pointer-events: none;
z-index: 1000;
}
.crosshair-dot {
position: absolute;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );
width: 2px;
height: 2px;
background-color: rgba( 255, 255, 255, 0.8 );
border-radius: 50%;
}
.crosshair-line {
position: absolute;
background-color: rgba( 255, 255, 255, 0.5 );
}
.crosshair-top {
top: 50%;
left: 50%;
transform: translate( -50%, -100% ) translateY( -4px );
width: 1px;
height: 10px;
}
.crosshair-bottom {
top: 50%;
left: 50%;
transform: translate( -50%, 0 ) translateY( 4px );
width: 1px;
height: 10px;
}
.crosshair-left {
top: 50%;
left: 50%;
transform: translate( -100%, -50% ) translateX( -4px );
width: 10px;
height: 1px;
}
.crosshair-right {
top: 50%;
left: 50%;
transform: translate( 0, -50% ) translateX( 4px );
width: 10px;
height: 1px;
}
// ─── Hotbar ──────────────────────────────────────────────────────────────────
.hotbar-wrapper {
position: absolute;
bottom: 28px;
left: 0;
width: 100%;
flex-direction: column;
align-items: center;
}
.hotbar {
flex-direction: row;
gap: $slot-gap;
padding: 7px;
background-color: $panel-bg;
border: 1px solid $panel-border;
border-radius: $radius;
}
.hotbar-slot {
position: relative;
width: $slot-size;
height: $slot-size;
background-color: $slot-bg;
border: 2px solid $slot-border;
border-radius: $radius-sm;
align-items: center;
justify-content: center;
&:hover {
background-color: $slot-hover;
}
&.active {
border-color: $slot-active-border;
box-shadow: 0 0 9px rgba(255, 220, 80, 0.3);
}
&.dragging {
border-color: $slot-drag-border;
background-color: rgba(100, 180, 255, 0.12);
}
&.drag-over {
border-color: rgba(100, 255, 140, 0.8);
background-color: rgba(100, 255, 140, 0.08);
}
}
// Hotbar becomes interactive when inventory is open
.inventory-open .hotbar-wrapper {
pointer-events: all;
}
.hotbar-number {
position: absolute;
bottom: 3px;
left: 6px;
font-size: 12px;
color: $font-dim;
font-family: Roboto;
z-index: 1;
pointer-events: none;
}
// ─── Inventory Overlay ───────────────────────────────────────────────────────
.inventory-overlay {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.35);
pointer-events: all;
}
// ─── Inventory Panel ─────────────────────────────────────────────────────────
.inventory-panel {
position: absolute;
top: 50%;
left: 50%;
transform: translate( -50%, -50% );
flex-direction: row;
gap: 14px;
padding: 18px;
background-color: $panel-bg;
border: 1px solid $panel-border;
border-radius: $radius;
pointer-events: all;
}
.panel-title {
font-size: 15px;
font-family: Roboto;
color: $font-dim;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 9px;
pointer-events: none;
}
// ─── Bag Grid ────────────────────────────────────────────────────────────────
.bag-panel {
display: flex;
flex-direction: column;
flex-shrink: 0;
align-self: flex-start;
}
.bag-grid {
display: flex;
flex-direction: column;
gap: $slot-gap;
}
.bag-row {
display: flex;
flex-direction: row;
gap: $slot-gap;
flex-shrink: 0;
}
.bag-slot {
position: relative;
width: $slot-size;
height: $slot-size;
background-color: $slot-bg;
border: 1px solid $slot-border;
border-radius: $radius-sm;
align-items: center;
justify-content: center;
cursor: pointer;
transition: border-color 0.1s, background-color 0.1s;
pointer-events: all;
&:hover {
background-color: $slot-hover;
border-color: rgba(255, 255, 255, 0.25);
}
&.dragging {
border-color: $slot-drag-border;
background-color: rgba(100, 180, 255, 0.12);
}
&.drag-over {
border-color: rgba(100, 255, 140, 0.8);
background-color: rgba(100, 255, 140, 0.08);
}
}
// ─── Equipment Panel ─────────────────────────────────────────────────────────
.equipment-panel {
display: flex;
flex-direction: column;
flex-shrink: 0;
align-self: flex-start;
min-width: 257px;
}
.equip-layout {
flex-direction: column;
gap: $slot-gap;
}
.equip-row {
flex-direction: row;
justify-content: center;
gap: $slot-gap;
}
.equip-slot {
position: relative;
width: $slot-size;
height: $slot-size;
background-color: $slot-bg;
border: 1px solid $slot-border;
border-radius: $radius-sm;
align-items: center;
justify-content: center;
cursor: pointer;
transition: border-color 0.1s, background-color 0.1s;
pointer-events: all;
&:hover {
background-color: $slot-hover;
border-color: rgba(255, 255, 255, 0.25);
}
&.dragging {
border-color: $slot-drag-border;
background-color: rgba(100, 180, 255, 0.12);
}
&.drag-over {
border-color: rgba(100, 255, 140, 0.8);
background-color: rgba(100, 255, 140, 0.08);
}
}
.equip-label {
font-size: 12px;
font-family: Roboto;
color: $font-dim;
text-align: center;
pointer-events: none;
}
// ─── Bag Toolbar (Search + Category Tabs) ────────────────────────────────────
.bag-toolbar {
flex-direction: column;
gap: 6px;
margin-bottom: 8px;
pointer-events: all;
}
.bag-search {
padding: 5px 10px;
font-size: 13px;
font-family: Roboto;
color: $font-color;
background-color: rgba(0, 0, 0, 0.35);
border: 1px solid $slot-border;
border-radius: $radius-sm;
pointer-events: all;
&:focus {
border-color: $slot-active-border;
outline: none;
}
}
.category-tabs {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 4px;
flex: 1;
}
.toolbar-row {
display: flex;
flex-direction: row;
align-items: flex-start;
flex-wrap: wrap;
gap: 4px;
}
.toolbar-actions {
display: flex;
flex-direction: row;
gap: 4px;
align-items: center;
}
.category-tab {
padding: 3px 10px;
font-size: 12px;
font-family: Roboto;
color: $font-dim;
background-color: rgba(0, 0, 0, 0.25);
border: 1px solid $slot-border;
border-radius: $radius-sm;
cursor: pointer;
pointer-events: all;
&:hover {
background-color: $slot-hover;
color: $font-color;
}
&.active {
background-color: rgba(100, 180, 255, 0.15);
border-color: rgba(100, 180, 255, 0.5);
color: rgba(180, 220, 255, 0.9);
}
}
.sort-btn {
padding: 3px 10px;
font-size: 12px;
font-family: Roboto;
color: $font-color;
background-color: rgba(100, 180, 255, 0.12);
border: 1px solid rgba(100, 180, 255, 0.3);
border-radius: $radius-sm;
cursor: pointer;
pointer-events: all;
&:hover {
background-color: rgba(100, 180, 255, 0.22);
}
&.active {
background-color: rgba(140, 100, 255, 0.25);
border-color: rgba(140, 100, 255, 0.6);
color: rgba(200, 180, 255, 0.95);
}
}
// ─── Filtered-out (dimmed slot) ──────────────────────────────────────────────
.filtered-out {
opacity: 0.15;
}
// ─── Rarity Borders ──────────────────────────────────────────────────────────
.rarity-border {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: $radius-sm;
z-index: 0;
pointer-events: none;
}
.rarity-common { border: 2px solid rgba(180, 180, 180, 0.3); }
.rarity-uncommon { border: 2px solid rgba(80, 200, 80, 0.5); }
.rarity-rare { border: 2px solid rgba(80, 160, 255, 0.6); }
.rarity-epic { border: 2px solid rgba(180, 80, 255, 0.7); }
.rarity-legendary { border: 2px solid rgba(255, 180, 50, 0.8);
box-shadow: 0 0 10px rgba(255, 180, 50, 0.2); }
.rarity-text-common { color: rgba(200, 200, 200, 0.9); }
.rarity-text-uncommon { color: rgba(100, 220, 100, 0.9); }
.rarity-text-rare { color: rgba(100, 180, 255, 0.95); }
.rarity-text-epic { color: rgba(200, 100, 255, 0.95); }
.rarity-text-legendary { color: rgba(255, 200, 60, 0.95); }
// ─── Weight Bar ─────────────────────────────────────────────────────────────
.weight-bar {
position: relative;
height: 20px;
margin-top: 8px;
background-color: rgba(0, 0, 0, 0.35);
border: 1px solid $slot-border;
border-radius: $radius-sm;
}
.weight-fill {
height: 100%;
background-color: rgba(100, 180, 255, 0.4);
border-radius: $radius-sm;
}
.weight-bar.overencumbered .weight-fill {
background-color: rgba(255, 80, 80, 0.6);
}
.weight-label {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
align-items: center;
justify-content: center;
font-size: 12px;
font-family: Roboto;
color: $font-color;
pointer-events: none;
}
// ─── Durability Bar ──────────────────────────────────────────────────────────
.durability-bar {
position: absolute;
bottom: 3px;
left: 3px;
right: 3px;
height: 4px;
background-color: rgba(0, 0, 0, 0.5);
border-radius: 2px;
z-index: 2;
pointer-events: none;
}
.durability-fill {
height: 100%;
border-radius: 2px;
background-color: rgba(100, 220, 100, 0.8);
transition: width 0.15s;
}
// ─── Shared Item Slot Content ────────────────────────────────────────────────
.item-icon {
position: absolute;
top: 5px;
left: 5px;
right: 18px;
bottom: 18px;
width: auto;
height: auto;
object-fit: contain;
z-index: 0;
pointer-events: none;
}
.item-qty {
position: absolute;
bottom: 4px;
right: 5px;
font-size: 13px;
font-family: Roboto;
color: $font-color;
text-shadow:
-1px -1px 0 rgba(0,0,0,0.9),
1px -1px 0 rgba(0,0,0,0.9),
-1px 1px 0 rgba(0,0,0,0.9),
1px 1px 0 rgba(0,0,0,0.9);
z-index: 1;
pointer-events: none;
}
// ─── Tooltip ─────────────────────────────────────────────────────────────────
.item-tooltip {
position: absolute;
bottom: 138px;
left: 50%;
transform: translateX( -50% );
min-width: 207px;
max-width: 299px;
padding: 12px 16px;
background-color: rgba(10, 10, 15, 0.96);
border: 1px solid $panel-border;
border-radius: $radius;
flex-direction: column;
gap: 5px;
pointer-events: none;
}
.tooltip-name {
font-size: 16px;
font-family: Roboto;
color: $font-color;
font-weight: bold;
pointer-events: none;
}
.tooltip-slot {
font-size: 13px;
font-family: Roboto;
color: rgba(180, 200, 255, 0.8);
pointer-events: none;
}
.tooltip-category {
font-size: 12px;
font-family: Roboto;
color: $font-dim;
pointer-events: none;
}
.tooltip-rarity {
font-size: 12px;
font-family: Roboto;
font-weight: bold;
color: rgba(200, 200, 200, 0.7);
pointer-events: none;
}
.tooltip-desc {
font-size: 13px;
font-family: Roboto;
color: $font-dim;
margin-top: 5px;
pointer-events: none;
}
.tooltip-weight {
font-size: 12px;
font-family: Roboto;
color: $font-dim;
margin-top: 2px;
pointer-events: none;
}
.tooltip-durability {
font-size: 12px;
font-family: Roboto;
color: rgba(200, 220, 200, 0.8);
margin-top: 2px;
pointer-events: none;
}
.tooltip-stats {
display: flex;
flex-direction: column;
margin-top: 5px;
border-top: 1px solid rgba(255,255,255,0.1);
padding-top: 4px;
pointer-events: none;
}
.tooltip-stat {
font-size: 12px;
font-family: Roboto;
margin-top: 2px;
pointer-events: none;
}
.stat-positive {
color: rgba(100, 220, 100, 0.9);
}
.stat-negative {
color: rgba(220, 90, 90, 0.9);
}
.stat-neutral {
color: rgba(180, 180, 180, 0.6);
}
.tooltip-compare-label {
font-size: 11px;
font-family: Roboto;
color: rgba(255, 255, 255, 0.4);
margin-bottom: 2px;
pointer-events: none;
}
.tooltip-stat-row {
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
}
.tooltip-stat-delta {
font-size: 11px;
font-family: Roboto;
pointer-events: none;
}
// ─── Crafting Panel ───────────────────────────────────────────────────────────
.crafting-panel {
display: flex;
flex-direction: column;
flex-shrink: 0;
align-self: flex-start;
background-color: $panel-bg;
border: 1px solid rgba(140, 100, 255, 0.2);
border-radius: $radius;
padding: 12px;
margin-left: 10px;
width: 300px;
}
.recipe-list {
display: flex;
flex-direction: column;
overflow-y: scroll;
max-height: 220px;
margin-bottom: 8px;
gap: 2px;
padding-right: 4px;
}
.recipe-entry {
display: flex;
flex-direction: row;
align-items: center;
padding: 6px 8px;
border-radius: $radius-sm;
background-color: rgba(255,255,255,0.04);
cursor: pointer;
gap: 8px;
transition: background-color 0.1s;
}
.recipe-entry:hover {
background-color: rgba(255,255,255,0.08);
}
.recipe-entry.selected {
box-shadow: inset 0 0 0 1px rgba(140, 100, 255, 0.6);
background-color: rgba(140, 100, 255, 0.12);
}
.recipe-entry.recipe-unavailable {
opacity: 0.45;
}
.recipe-icon {
width: 32px;
height: 32px;
}
.recipe-entry-text {
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
}
.recipe-name {
font-size: 13px;
font-family: Roboto;
color: $font-color;
overflow: hidden;
white-space: nowrap;
}
.recipe-result-qty {
font-size: 11px;
font-family: Roboto;
color: $font-dim;
}
.recipe-detail {
display: flex;
flex-direction: column;
border-top: 1px solid rgba(255,255,255,0.08);
padding-top: 8px;
gap: 6px;
width: 100%;
}
.recipe-ingredients {
display: flex;
flex-direction: column;
gap: 4px;
}
.ingredient-row {
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
}
.ingredient-icon {
width: 22px;
height: 22px;
}
.ingredient-name {
font-size: 12px;
font-family: Roboto;
color: $font-color;
flex-grow: 1;
}
.ingredient-count {
font-size: 12px;
font-family: Roboto;
}
.ingredient-ok {
color: rgba(100, 220, 100, 0.9);
}
.ingredient-missing {
color: rgba(220, 90, 90, 0.9);
}
.craft-qty-row {
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
margin-top: 4px;
}
.craft-qty-btn {
background-color: rgba(255,255,255,0.08);
border: 1px solid rgba(255,255,255,0.15);
border-radius: $radius-sm;
padding: 3px 10px;
font-size: 14px;
font-family: Roboto;
color: $font-color;
cursor: pointer;
}
.craft-qty-btn:hover {
background-color: rgba(255,255,255,0.15);
}
.craft-qty-max {
font-size: 11px;
padding: 3px 8px;
color: $font-dim;
}
.craft-qty-label {
font-size: 14px;
font-family: Roboto;
color: $font-color;
min-width: 28px;
text-align: center;
}
.craft-btn {
background-color: rgba(140, 100, 255, 0.2);
border: 1px solid rgba(140, 100, 255, 0.5);
border-radius: $radius-sm;
padding: 7px 0;
font-size: 13px;
font-family: Roboto;
color: rgba(200, 180, 255, 0.95);
text-align: center;
cursor: pointer;
margin-top: 4px;
transition: background-color 0.1s;
}
.craft-btn:hover {
background-color: rgba(140, 100, 255, 0.35);
}
.craft-btn-disabled {
opacity: 0.4;
cursor: default;
}
.craft-btn-disabled:hover {
background-color: rgba(140, 100, 255, 0.2);
}
.craft-cancel-btn {
background-color: rgba(220, 80, 80, 0.2);
border-color: rgba(220, 80, 80, 0.5);
color: rgba(255, 160, 160, 0.95);
}
.craft-cancel-btn:hover {
background-color: rgba(220, 80, 80, 0.35);
}
.craft-progress-wrap {
display: flex;
flex-direction: column;
gap: 4px;
width: 100%;
}
.craft-progress-bar {
width: 100%;
max-width: 100%;
height: 8px;
background-color: rgba(255,255,255,0.1);
border-radius: 4px;
overflow: hidden;
}
.craft-progress-fill {
height: 100%;
background-color: rgba(140, 100, 255, 0.8);
border-radius: 4px;
}
.craft-progress-label {
font-size: 11px;
font-family: Roboto;
color: $font-dim;
text-align: center;
white-space: nowrap;
overflow: hidden;
}
// ─── Loot Panel ───────────────────────────────────────────────────────────────
.loot-panel {
display: flex;
flex-direction: column;
flex-shrink: 0;
align-self: flex-start;
background-color: $panel-bg;
border: 1px solid rgba(255, 200, 80, 0.2);
border-radius: $radius;
padding: 12px;
margin-right: 10px;
}
.loot-panel-world {
border-color: rgba(220, 120, 40, 0.4);
background-color: rgba(25, 15, 5, 0.94);
}
.loot-panel-header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-bottom: 6px;
}
.loot-badge {
font-size: 10px;
font-family: Roboto;
font-weight: bold;
color: rgba(255, 180, 60, 0.9);
background-color: rgba(220, 120, 40, 0.2);
border: 1px solid rgba(220, 120, 40, 0.5);
border-radius: 3px;
padding: 1px 6px;
pointer-events: none;
}
.loot-grid-scroll {
max-height: 395px;
overflow-y: scroll;
}
.loot-footer {
display: flex;
flex-direction: row;
justify-content: flex-end;
margin-top: 8px;
}
.take-all-btn {
background-color: rgba(255, 200, 80, 0.15);
border: 1px solid rgba(255, 200, 80, 0.4);
border-radius: $radius-sm;
padding: 5px 14px;
font-size: 13px;
font-family: Roboto;
color: rgba(255, 220, 120, 0.9);
cursor: pointer;
transition: background-color 0.1s;
}
.take-all-btn:hover {
background-color: rgba(255, 200, 80, 0.3);
}
// ─── Context Menu ─────────────────────────────────────────────────────────────
.context-menu {
position: absolute;
min-width: 140px;
padding: 4px 0;
background-color: rgba( 12, 12, 18, 0.97 );
border: 1px solid $panel-border;
border-radius: $radius-sm;
flex-direction: column;
z-index: 500;
pointer-events: all;
}
.context-menu-item {
padding: 7px 16px;
font-size: 13px;
font-family: Roboto;
color: $font-color;
cursor: pointer;
pointer-events: all;
&:hover {
background-color: rgba( 255, 255, 255, 0.08 );
}
}
.context-menu-destroy {
border-top: 1px solid $panel-border;
color: rgba( 255, 100, 100, 0.9 );
&:hover {
background-color: rgba( 255, 50, 50, 0.12 );
}
}
// ─── Destroy Confirmation Dialog ──────────────────────────────────────────────
.confirm-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
align-items: center;
justify-content: center;
z-index: 600;
pointer-events: all;
}
.confirm-dialog {
flex-direction: column;
align-items: center;
gap: 10px;
padding: 20px 30px;
background-color: rgba(15, 15, 20, 0.96);
border: 1px solid $panel-border;
border-radius: $radius;
pointer-events: all;
}
.confirm-title {
font-size: 17px;
font-family: Roboto;
font-weight: bold;
color: rgba(255, 100, 100, 0.95);
pointer-events: none;
}
.confirm-item {
font-size: 14px;
font-family: Roboto;
color: $font-color;
pointer-events: none;
}
.confirm-buttons {
flex-direction: row;
gap: 12px;
margin-top: 4px;
}
.confirm-btn {
min-width: 70px;
padding: 6px 18px;
font-size: 14px;
font-family: Roboto;
text-align: center;
border-radius: $radius-sm;
cursor: pointer;
pointer-events: all;
}
.confirm-yes {
background-color: rgba(180, 40, 40, 0.8);
color: white;
&:hover {
background-color: rgba(220, 50, 50, 0.9);
}
}
.confirm-no {
background-color: rgba(255, 255, 255, 0.1);
color: $font-color;
&:hover {
background-color: rgba(255, 255, 255, 0.18);
}
}