/* ================================
   ship-weapons
   ================================ */

.ship-primary-stat-roll-max {
  top: 289px;
  left: 708px;  
  height: 12px;
  width: 61px;
  padding-top: 3px;
  font-size: 12px;
  text-align: left;
  background: transparent;
  border: none;
  color: #0ff;
  position: absolute;
  z-index: 50;
  pointer-events: auto;
}

/* ship-weapons BOX (big box under ship-action Pool) */
.ship-weapons-area {
  position: absolute;
  top: 332px;
  left: 334px;
  width: 440px;
  height: 237px;
  pointer-events: auto;
  outline: 2px solid rgba(0, 153, 255, 1);
  background: transparent;
}

/* Scrollable inner list region */
.ship-weapons-list {
  position: relative;
  width: 440px;  /* fills the box; adjust as needed */
  height: 237px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* "+" button */
.ship-weapons-add {
  position: absolute;
  top: 1px;
  left: 213px;    /* you can nudge this to sit by the ship-weapons label */
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 8px;
  border: transparent;
  background: transparent;
  color: #0ff;
  font-size: 14px;
  font-weight: bold;
  line-height: 10px;
  cursor: pointer;
  z-index: 600;
}

.ship-weapons-add:hover {
  background: rgba(0, 255, 255, 0.25);
  box-shadow: 0 0 8px #0ff;
}

/* Each row */
.ship-weapons-row {
  position: relative;
  height: 22px;          /* match printed row height */
  font-size: 14px;
  line-height: 22px;
  color: #0ff;
  padding: 0;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(28, 130, 214, 0.0);
  background: transparent;
}

/* All columns share basic look; aligned to printed grid with positions below */
.ship-weapons-name,
.ship-weapons-capacity {
  position: absolute;
  top: 0;
  height: 22px;
  border-bottom: 1px solid rgb(76, 151, 221);
  background: transparent;
  line-height: 22px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  font-size: 14px;
}

/* Column layout (Option B guess you can tweak):
   NAME        : 170px
   SOURCE      : 110px
   EXPLANATION : 260px
   COST        : 45px
   CAPACITY    : 45px
   Total ~630px inside 648px box
*/

/* Two-column layout inside 440px box:
   - Item     : big left column
   - Capacity : small right column
*/
.ship-weapons-name {
  left: 5px;
  width: 381px;      /* nice long line like Actions */
  text-align: left;
}

.ship-weapons-capacity {
  left: 396px;       /* 5 + 330 + small gap */
  width: 42px;       /* fits within 440px area */
  text-align: center;
}

/* Edit inputs inside each column */
.ship-weapons-edit-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: 1px solid #0ff;
  color: #0ff;
  font-size: 12px;
  line-height: 22px;
  padding: 0 2px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}

.ship-weapons-edit-input-center {
  text-align: center;
}

/* Buttons for each row (hover bar) */
.ship-weapons-buttons {
  position: absolute;
  top: -1px;
  left: 175px;  
  height: 16px;
  display: flex;
  align-items: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s linear;
  z-index: 700;
}

.ship-weapons-buttons button {
  width: auto;
  height: 16px;
  margin: 0 2px;
  padding: 0 4px;
  border: 1px solid #0ff;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.9);
  color: #0ff;
  font-size: 7px;
  white-space: nowrap;
  cursor: pointer;
}

.ship-weapons-buttons button:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 6px #0ff;
}

/* Hover tooltip */
.ship-weapons-tooltip {
  position: absolute;
  top: 16px;
  left: 176px;

  display: inline-block;
  width: auto;
  max-width: 260px;

  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;

  padding: 6px;

  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;

  font-size: 13px;
  line-height: 1.1;
  color: #0ff;

  background: rgba(0, 0, 0, 0.95);
  border: 1px solid #0ff;
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.7);

  /* 👇 critical fix */
  pointer-events: none;   /* hidden tooltip should not block anything */
  opacity: 0;
  transition: opacity 0.15s linear;

  z-index: 650;
}

.ship-weapons-tooltip.visible {
  opacity: 1;

  /* 👇 allow scrolling & hover detection ONLY when visible */
  pointer-events: auto;
}

.ship-weapons-hover-buffer {
  position: absolute;
  width: 100%;       /* JS will override left + width to match the button bar */
  height: 18px;      /* same magic number as Reship-weapons */
  
  background: transparent;
  pointer-events: auto;

  /* between buttons (z-index 700) and tooltip (650) */
  z-index: 645;
}

/* DELETE CONFIRM POPUP */
.ship-weapons-confirm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
}

.ship-weapons-confirm-dialog {
  background: #000;
  border: 1px solid #0ff;
  padding: 8px 12px;
  color: #0ff;
  font-size: 12px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
  min-width: 220px;
  text-align: center;
}

.ship-weapons-confirm-message {
  margin-bottom: 8px;
}

.ship-weapons-confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.ship-weapons-confirm-buttons button {
  padding: 2px 10px;
  border: 1px solid #0ff;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.9);
  color: #0ff;
  cursor: pointer;
}

.ship-weapons-confirm-buttons button:hover {
  background: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 6px #0ff;
}
