/* The two choices after a ship of the sea is beaten, and the ceasefire talks (owner, 2026-10-18). Before fit.css. */

/* ---- the boarding's card for a ship of the sea: her hold in a row of chips, the two choices side by side ---- */
#modal-panel .out-body { display: flex; flex-direction: column; gap: 8px; }
.out-hold { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.out-good { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.out-line { margin: 0; line-height: 1.35; }
.out-choices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.out-choices.one { grid-template-columns: minmax(0, 1fr); }
.out-choice { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 6px 10px; text-align: left; white-space: normal; }
.out-choice > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.out-choice b { line-height: 1.2; }
.out-choice small { font-size: 12px; line-height: 1.3; opacity: 0.9; overflow-wrap: anywhere; }
@media (max-height: 520px), (max-width: 699px) {
  #modal-panel .out-body { gap: 5px; }
  .out-text { display: none; }
  .out-choice { min-height: 48px; padding: 4px 8px; gap: 6px; }
  .out-choice .choice-ico { width: 22px; height: 22px; }
  .out-choice small { font-size: 11px; }
}
@media (max-width: 420px) {
  .out-choices { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}

/* ---- the struck ship's card: two choices take the row the four took (styles.css, feel.css) ---- */
#surrender .sur-choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#surrender .sur-two .sur-choice small { display: block; font-size: 11px; line-height: 1.25; }
body.touch #surrender .sur-two .sur-choice:nth-child(1) { grid-column: 1 / 3; }
body.touch #surrender .sur-two .sur-choice:nth-child(2) { grid-column: 3 / 5; }
@media (max-width: 699px), (max-height: 520px) {
  #surrender .sur-two .sur-choice small { display: none; }
}

/* ---- the ceasefire talks ---- */
#ceasefire { position: fixed; left: 50%; top: calc(var(--sa-t, 0px) + 70px); transform: translateX(-50%); width: min(430px, calc(100vw - 16px)); max-height: calc(100vh - var(--sa-t, 0px) - 80px); overflow-y: auto; z-index: 42; pointer-events: auto; }
#ceasefire.hidden { display: none; }
#ceasefire .cf-card { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: rgba(10, 12, 16, 0.95); border: 1px solid rgba(240, 234, 220, 0.6); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
#ceasefire .cf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#ceasefire .cf-x { min-width: 32px; min-height: 32px; padding: 0 8px; }
#ceasefire .cf-line { margin: 0; font-size: 12.5px; line-height: 1.35; }
#ceasefire .cf-rows { display: flex; flex-direction: column; gap: 4px; }
#ceasefire .cf-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 4px; border-radius: 4px; }
#ceasefire .cf-row.focus { background: rgba(232, 220, 192, 0.08); }
#ceasefire .cf-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; font-size: 12.5px; }
#ceasefire .cf-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
#ceasefire .cf-row .btn { flex: none; min-height: 32px; white-space: nowrap; }
#ceasefire .cf-pay { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
#ceasefire .cf-seg { display: inline-flex; gap: 4px; }
#ceasefire .cf-seg .btn.on, #ceasefire .cf-good.on { outline: 2px solid var(--brass, #c9a227); }
#ceasefire .cf-all { min-height: 34px; white-space: nowrap; }
#ceasefire .cf-goods { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#ceasefire .cf-good { display: inline-flex; align-items: center; gap: 3px; min-height: 30px; padding: 2px 6px; }
#ceasefire .warn { color: #e0b25a; }
@media (max-width: 699px), (max-height: 520px) {
  #ceasefire { top: calc(var(--sa-t, 0px) + 6px); left: calc(var(--sa-l, 0px) + 8px); transform: none; width: min(400px, calc(100vw - 16px - var(--sa-l, 0px) - var(--sa-r, 0px))); max-height: calc(100vh - var(--sa-t, 0px) - 12px); }
  body:has(#ceasefire:not(.hidden)) #hud-captain { visibility: hidden; }
  #ceasefire .cf-card { gap: 4px; padding: 6px 8px; }
  #ceasefire .cf-line { font-size: 11.5px; }
  #ceasefire .cf-name { font-size: 11.5px; }
  #ceasefire .cf-row .btn, #ceasefire .cf-all { min-height: 30px; padding: 2px 8px; }
}
@media (max-width: 300px) {
  #ceasefire .cf-row { flex-wrap: wrap; }
  #ceasefire .cf-pay { flex-direction: column; align-items: stretch; }
}
/* a narrow phone (480×270): four choices were pictures only; two have the room for their word beside the picture */
@media (max-width: 560px) and (max-height: 520px) {
  body.simple.touch #surrender .sur-two .sur-choice { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 4px; }
  body.simple.touch #surrender .sur-two .sur-choice .choice-ico { width: 20px; height: 20px; margin: 0; flex: none; }
  body.simple.touch #surrender .sur-two .sur-choice > span { display: block; min-width: 0; }
  body.simple.touch #surrender .sur-two .sur-choice b { display: none; }
  body.simple.touch #surrender .sur-two .sur-choice { padding-inline: 4px; }
  body.simple.touch #surrender .sur-two .sur-choice .sur-short { display: block; font-size: 10.5px; line-height: 1.1; white-space: normal; overflow-wrap: anywhere; }
}

/* ---- a ship of the sea hired as a guard (owner, 2026-10-25): the card where the talks' card stands, the chip ---- */
#seahire { position: fixed; left: 50%; top: calc(var(--sa-t, 0px) + 70px); transform: translateX(-50%); width: min(400px, calc(100vw - 16px)); max-height: calc(100vh - var(--sa-t, 0px) - 80px); overflow-y: auto; z-index: 42; pointer-events: auto; }
#seahire.hidden { display: none; }
#seahire .hr-card { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: rgba(10, 12, 16, 0.95); border: 1px solid rgba(240, 234, 220, 0.6); border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
#seahire .hr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#seahire .hr-x { min-width: 32px; min-height: 32px; padding: 0 8px; }
#seahire .enc-h { display: flex; align-items: center; gap: 6px; min-width: 0; }
#seahire .enc-h .ico-md { width: 26px; height: 26px; flex: none; border-radius: 50%; }
#seahire .hr-ship { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; }
#seahire .hr-ship b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
#seahire .hr-stats { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; }
#seahire .hr-buys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#seahire .hr-buy { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 40px; padding: 3px 4px; white-space: nowrap; }
#seahire .hr-buy span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; }
#seahire .hr-line { margin: 0; font-size: 12px; line-height: 1.35; }
#seahire .hr-line > span:first-child { display: inline-flex; align-items: center; gap: 3px; }
#hire-chip { position: fixed; z-index: 30; display: flex; flex-direction: column; gap: 4px; pointer-events: auto; top: calc(var(--sa-t, 0px) + 150px); right: calc(var(--sa-r, 0px) + 8px); }
#hire-chip.hidden { display: none; }
#hire-chip .hr-chip { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px 0 4px; border: 1px solid rgba(232, 196, 106, 0.7); border-radius: 13px; background: rgba(10, 12, 16, 0.82); color: #efe6d2; font: 600 12px/1 var(--k-font-sans, sans-serif); font-variant-numeric: tabular-nums; cursor: pointer; }
#hire-chip .hr-chip .ico-sm { width: 18px; height: 18px; }
#hire-chip .hr-bar { position: relative; width: 34px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
#hire-chip .hr-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #7fb06a; }
#hire-chip .hr-chip.low .hr-bar i { background: #d2473a; }
#hire-chip .hr-w { font-size: 10.5px; color: #c9bfa6; }
@media (max-width: 699px), (max-height: 520px) {
  #seahire { top: calc(var(--sa-t, 0px) + 6px); left: calc(var(--sa-l, 0px) + 8px); transform: none; width: min(380px, calc(100vw - 16px - var(--sa-l, 0px) - var(--sa-r, 0px))); max-height: calc(100vh - var(--sa-t, 0px) - 12px); }
  body:has(#seahire:not(.hidden)) #hud-captain { visibility: hidden; }
  #seahire .hr-card { gap: 4px; padding: 6px 8px; }
  #seahire .hr-line, #seahire .hr-stats { font-size: 11.5px; }
  #seahire .hr-buy { min-height: 36px; }
}
