/* Booked voyages: one stable compact row; date history floats outside it; all cabinets stay visible. */
.sailing-booked .page-head {
  margin-bottom: 16px;
}
.sailing-booked .sailing-section-title {
  margin-bottom: 10px;
}
.sailing-booked .sailing-port-card {
  margin-bottom: 13px;
  border-radius: 7px;
}
.sailing-booked .sailing-port-heading {
  padding: 12px 14px;
}
.sailing-booked .sailing-port-name {
  font-size: 13px;
}
.sailing-booked-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--sailing-green);
}
.sailing-booked-table {
  table-layout: fixed;
  min-width: 1180px;
}
.sailing-booked-table th:nth-child(1) {
  width: 250px;
}
.sailing-booked-table th:nth-child(2),
.sailing-booked-table th:nth-child(3) {
  width: 100px;
}
.sailing-booked-table th:nth-child(4) {
  width: auto;
}
.sailing-booked-table th:nth-child(5) {
  width: 100px;
}
.sailing-booked-table th:nth-child(6) {
  width: 160px;
}
.sailing-booked-table tbody tr,
.sailing-booked-table tbody td {
  height: 48px;
}
.sailing-booked-table td {
  padding: 0 11px;
}
.sailing-booked-table .sailing-ship-cell {
  min-height: 30px;
}
.sailing-booked-table .sailing-vessel {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sailing-booked-table .sailing-change-dot {
  top: 6px;
}
.sailing-booked .sailing-table-full {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.sailing-booked-quotes {
  margin: 14px 0;
  color: #738397;
  font-size: 12px;
}
.sailing-booked-quotes > summary {
  cursor: pointer;
  padding: 7px 0;
}
.sailing-detail-price {
  display: flex;
  gap: 10px;
  font-size: 12px;
}
.sailing-booked-orders {
  display: grid;
  grid-template-columns: repeat(4, 100px);
  justify-content: start;
  align-content: center;
  gap: 2px 12px;
  padding: 4px 0;
}
.sailing-booked-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 11px;
  line-height: 14px;
}
.sailing-booked-inline span {
  color: var(--sailing-green);
  white-space: normal;
  overflow-wrap: anywhere;
}
.sailing-booked-inline small {
  margin: 0;
  padding: 0;
  color: #8090a1;
  font-size: 10px;
  line-height: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sailing-current-booking {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #f3f8f5;
  border: 1px solid #dce9e2;
  border-radius: 6px;
}
.sailing-current-booking p { margin: 5px 0 0; font-size: 12px; }
.sailing-history-trigger {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #748397;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}
.sailing-history-trigger.has-changes {
  color: #cb5151;
}
.sailing-history-popover {
  position: fixed;
  z-index: 230;
  width: min(630px, calc(100vw - 20px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 12px 14px 9px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #dfe7ed;
  border-radius: 7px;
  box-shadow: 0 8px 28px #23374726;
  color: #304052;
  font-size: 12px;
}
.sailing-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.sailing-history-heading strong {
  font-size: 12px;
  font-weight: 600;
}
.sailing-history-heading small {
  display: block;
  margin-top: 3px;
  color: #8090a1;
  font-size: 11px;
}
.sailing-history-heading > button {
  display: flex;
  padding: 2px;
  border: 0;
  background: transparent;
  color: #7c8b9e;
  cursor: pointer;
}
.sailing-history-table-scroll {
  overflow-x: auto;
}
.sailing-history-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11px;
}
.sailing-history-table th {
  padding: 5px;
  background: #f6f8fa;
  color: #8290a1;
  font-weight: 400;
  text-align: left;
}
.sailing-history-table th:first-child {
  width: 33%;
}
.sailing-history-table th:nth-child(2),
.sailing-history-table th:nth-child(3) {
  width: 20%;
}
.sailing-history-table th:last-child {
  width: 27%;
}
.sailing-history-table td {
  padding: 6px 5px;
  height: 38px;
  border-bottom: 1px solid #e8edf1;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.sailing-history-table strong {
  font-weight: 500;
}
.sailing-history-table small {
  display: block;
  color: #8a97a7;
  font-size: 11px;
}
.sailing-history-table em {
  color: #348877;
  margin-left: 5px;
  font-size: 11px;
  font-style: normal;
}
.sailing-history-reason {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sailing-history-table a {
  color: #348877;
  font-size: 11px;
}
.sailing-history-pagination,
.sailing-history-pagination > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sailing-history-pagination {
  margin-top: 8px;
  color: #8190a1;
  font-size: 11px;
}
.sailing-history-pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 3px;
  color: #348877;
  cursor: pointer;
}
.sailing-history-pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}
.sailing-history-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: #8a97a6;
  font-size: 11px;
}
.sailing-history-footer button,
.sailing-history-message button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #348877;
  font: inherit;
  cursor: pointer;
}
.sailing-history-message {
  font-size: 12px;
  padding: 14px 0;
}
.sailing-booked-reference {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 14px;
  border-top: 1px solid #e9edf1;
  padding: 9px 0;
  font-size: 11px;
}
.sailing-booked-reference small {
  color: #8391a3;
  font-size: 11px;
}
.sailing-booked-reference button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: #348877;
  cursor: pointer;
}
@media (max-width: 650px) {
  .sailing-history-popover {
    padding: 10px;
  }
  .sailing-history-table th:first-child {
    width: 34%;
  }
  .sailing-history-table th:nth-child(2),
  .sailing-history-table th:nth-child(3) {
    width: 22%;
  }
  .sailing-history-table th:last-child {
    width: 22%;
  }
  .sailing-history-table td {
    padding: 6px 3px;
  }
  .sailing-history-footer {
    align-items: flex-start;
  }
}

.sailing-order-maintenance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #7b899c;
}
.sailing-order-maintenance input[readonly] {
  background: #f6f8fa;
}

.sailing-update-targets {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #f4f8f6;
  border-radius: 5px;
  color: #527367;
  font-size: 12px;
}
.sailing-update-targets span {
  overflow-wrap: anywhere;
}
.sailing-update-targets small {
  font-size: 11px;
  color: #80918b;
}

.sailing-compact-date-dot {
  position: absolute;
  left: -3px;
  top: 6px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.sailing-compact-date-dot > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e25151;
}

.sailing-viewer-note {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #7a8a9d;
  font-size: 11px;
}

.sailing-history-date-short {
  display: none;
}
.sailing-history-table small {
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .sailing-history-date-full {
    display: none;
  }
  .sailing-history-date-short {
    display: inline;
  }
  .sailing-history-table td:nth-child(2),
  .sailing-history-table td:nth-child(3) {
    white-space: nowrap;
  }
}
