/* ================================================================
   EQUIPMENT HUD - family/equipment selector overlay
   ================================================================ */

.equipment-hud-panel {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 260px;
    max-height: 74vh;
    z-index: 18;
    border: 1px solid var(--neutral-700, #3b3f47);
    border-radius: var(--radius-md, 6px);
    background: rgba(20, 24, 32, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--neutral-200, #e5e7eb);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.equipment-hud-panel:hover {
    overflow: visible;
}

.equipment-hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: move;
    user-select: none;
}

.equipment-hud-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.equipment-hud-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    pointer-events: none;
}

.equipment-hud-header-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Dragging state */
.equipment-hud-dragging {
    opacity: 0.9;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: none;
}

/* Resize handles z-index */
.equipment-hud-panel .resize-handle {
    z-index: 19;
}

.equipment-hud-body {
    padding: 8px 10px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* Custom scrollbar for webkit browsers */
.equipment-hud-body::-webkit-scrollbar {
    width: 6px;
}

.equipment-hud-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.equipment-hud-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.equipment-hud-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.equipment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.equipment-hud-btn {
    border: 1px solid var(--neutral-700, #3b3f47);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--neutral-300, #d1d5db);
    min-width: 24px;
    min-height: 22px;
    cursor: pointer;
}

.equipment-hud-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.equipment-pill {
    flex: 1;
    text-align: center;
    border-radius: 4px;
    padding: 3px 6px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.equipment-active-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.equipment-active-meta {
    color: var(--neutral-500, #6b7280);
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.equipment-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.equipment-action {
    border: 1px solid var(--neutral-700, #3b3f47);
    border-radius: 4px;
    background: transparent;
    color: var(--neutral-300, #d1d5db);
    font-size: 10px;
    padding: 4px 6px;
    cursor: pointer;
}

.equipment-action.active {
    border-color: #22d3ee;
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.15);
}

.equipment-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.equipment-stats {
    margin-bottom: 8px;
    color: var(--neutral-400, #9ca3af);
}

.equipment-visual {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 8px;
    align-items: center;
    margin-bottom: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.equipment-label {
    color: var(--neutral-400, #9ca3af);
}

.equipment-check {
    grid-column: 1 / span 2;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--neutral-300, #d1d5db);
}

.equipment-upload {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.equipment-upload-label {
    display: block;
    color: var(--neutral-300, #d1d5db);
    margin-bottom: 6px;
}

.equipment-upload-label input[type='file'] {
    display: block;
    margin-top: 6px;
    width: 100%;
    font-size: 10px;
}

.equipment-upload-note {
    color: var(--neutral-500, #6b7280);
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.equipment-hud-empty {
    text-align: center;
    color: var(--neutral-500, #6b7280);
    padding: 12px 6px;
}

.equipment-preview-wrap {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.equipment-thumb {
    width: 96px;
    height: 72px;
    border: 1px solid var(--neutral-700, #3b3f47);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    padding: 0;
}

.equipment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.equipment-thumb-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #93c5fd;
    font: 700 16px 'JetBrains Mono', monospace;
    letter-spacing: 0.06em;
}

.equipment-thumb.is-active {
    border-color: #22d3ee;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4) inset;
}

.equipment-open-btn {
    width: 100%;
    height: 72px;
    border: 1px solid var(--neutral-700, #3b3f47);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--neutral-200, #e5e7eb);
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
}

.equipment-open-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.equipment-open-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.equipment-thumb-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-bottom: 8px;
}

.equipment-thumb-strip .equipment-thumb {
    width: 48px;
    height: 38px;
    border-radius: 4px;
    flex: 0 0 auto;
}

body.mobile .equipment-hud-panel {
    left: 8px;
    right: 8px;
    top: 8px;
    bottom: auto;
    width: auto;
    max-height: 46vh;
}
