/* Rook (RK-7) crew chat: branching dialogue with disposition tracking.
   Dark-panel style matching Vela's popup (css/cosmos-vela.css). */
/* js/crew-seat-icons.js sets left and top from the interior artwork's own
   cover-fit, so this button lands on the headrest of the right seat at every
   window size. The right and bottom here are only what shows before that first
   placement runs; they are not the resting position. */
.ship-rook-btn { right: 23%; bottom: calc(19% - 60px); width: 96px; height: 96px; padding: 0; border-radius: 50%; overflow: hidden; background: rgba(20, 28, 40, 0.85); border: 1px solid rgba(100, 180, 140, 0.35); display: flex; align-items: center; justify-content: center; font-size: 0; line-height: 1; }
.rook-chat-overlay { position: absolute; inset: 0; z-index: 8; background: rgba(4, 8, 16, 0.7); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.rook-chat-overlay[hidden] { display: none; }
.rook-chat-card { position: relative; width: min(380px, 100%); max-height: 80vh; overflow-y: auto; background: linear-gradient(180deg, #0f1a18, #080d10); border: 1px solid rgba(100, 180, 140, 0.28); border-radius: 16px; box-shadow: 0 24px 90px rgba(0, 0, 0, 0.6); padding: 24px 22px 20px; text-align: center; }
.rook-chat-avatar { width: 160px; height: 160px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; background: rgba(20, 28, 40, 0.9); border: 1px solid rgba(100, 180, 140, 0.3); box-shadow: 0 0 0 1px rgba(100, 180, 140, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; font-size: 0; line-height: 1; }
.rook-chat-name { color: #7ad4a0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 4px; }
.rook-chat-disposition { color: #6a9480; font-size: 12px; letter-spacing: 0.04em; margin-bottom: 12px; }
.rook-chat-bubble { color: #c8ddd4; font-size: 15px; line-height: 1.55; margin: 0 0 14px; font-style: italic; }
.rook-chat-options { display: flex; flex-direction: column; gap: 8px; }
.rook-chat-option { text-align: left; padding: 10px 14px; border-radius: 8px; font-size: 14px; line-height: 1.4; cursor: pointer; background: rgba(24, 44, 38, 0.5); border: 1px solid rgba(100, 180, 140, 0.2); color: #b8e0cc; }
.rook-chat-option:hover { background: rgba(36, 60, 50, 0.7); border-color: rgba(100, 180, 140, 0.4); }
.rook-chat-option:active { background: rgba(44, 70, 58, 0.8); }
.rook-chat-option.locked { opacity: 0.35; cursor: default; font-size: 13px; color: #5a7a6a; }
.rook-chat-back { color: #6a9480; font-size: 13px; background: transparent; border-color: rgba(100, 180, 140, 0.1); text-align: center; }
.rook-chat-back:hover { background: rgba(24, 44, 38, 0.3); color: #8ab8a0; }
.rook-chat-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%; background: transparent; color: #6a9480; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rook-chat-close:hover { color: var(--accent); }
/* SC-ARRIVAL-MESSAGE: Rook speaks the arrival card at the side of the Ship
   Interior. It is the one crew card (css/cosmos-ship.css .ship-welcome-card,
   filled by js/crew-message.js); the class ship-welcome-rook repaints it in
   the same green as the chat above and puts Rook's own portrait in the round
   frame in place of Vela's photograph. */
.ship-welcome-rook .ship-welcome-card { background: linear-gradient(180deg, #0f1a18, #080d10); border-color: rgba(100, 180, 140, 0.28); }
.ship-welcome-rook .ship-welcome-avatar { background: rgba(20, 28, 40, 0.9); box-shadow: 0 0 0 1px rgba(100, 180, 140, 0.25), 0 8px 24px rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; }
.ship-welcome-rook .ship-welcome-avatar img { display: none; }
.ship-welcome-rook .ship-welcome-avatar::after { content: ""; width: 100%; height: 100%; border-radius: 50%; }
/* Rook's portrait: the owner's rendered art (assets/crew/rook.png), 356 by 356
   on a transparent background, the same shape and size as Vela's picture in
   css/cosmos-vela.css, so the frame's own dark fill and green edge show
   through and no crop is needed at any size. The bridge button and the chat
   card hold the picture as an <img> in index.html and are handled by the rules
   below. The arrival card cannot: its markup is the one crew card, whose <img>
   is Vela's, so this frame hides that picture and paints Rook's here instead. */
.ship-welcome-rook .ship-welcome-avatar::after {
  background-image: url("../assets/crew/rook.png");
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  font-size: 0;
}
/* The portrait fills its round frame. The button is a flex container
   (.ship-control) and a flex child was getting squeezed narrow, so the picture
   showed as a thin vertical band; taking the image out of the flow with
   absolute positioning removes flex from the question entirely. */
.ship-rook-btn { position: relative; }
.ship-rook-btn img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  display: block; pointer-events: none;
}
.rook-chat-avatar img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; pointer-events: none;
}
.ship-welcome-rook .ship-welcome-name { color: #7ad4a0; }
.ship-welcome-rook .ship-welcome-text { color: #c8ddd4; }
.ship-welcome-rook .ship-welcome-go { background: rgba(24, 44, 38, 0.6); border-color: rgba(100, 180, 140, 0.28); color: #b8e0cc; }
.ship-welcome-rook .ship-welcome-go:hover { background: rgba(36, 60, 50, 0.8); border-color: rgba(100, 180, 140, 0.45); }
