/* latin */
@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/orbitron/v31/yMJRMIlzdpvBhQQL_Qq7dy1biN15.woff2)
    format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: "Sono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/sono/v6/aFTO7PNiY3U2Cqf_aYEN64CYaK18YUhHma9UZrHlF80.woff2)
    format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
    U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: "Sono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/sono/v6/aFTO7PNiY3U2Cqf_aYEN64CYaK18YUhGma9UZrHlF80.woff2)
    format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Sono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/sono/v6/aFTO7PNiY3U2Cqf_aYEN64CYaK18YUhIma9UZrHl.woff2)
    format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin */
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacemono/v14/i7dPIFZifjKcF5UAWdDRYEF8RXi4EwQ.woff2)
    format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* vietnamese */
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacemono/v14/i7dMIFZifjKcF5UAWdDRaPpZUFqaHi6WZ3S_Yg.woff2)
    format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0,
    U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacemono/v14/i7dMIFZifjKcF5UAWdDRaPpZUFuaHi6WZ3S_Yg.woff2)
    format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/spacemono/v14/i7dMIFZifjKcF5UAWdDRaPpZUFWaHi6WZ3Q.woff2)
    format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Mono", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 12pt;
}
h1 {
  margin-left: 0px;
}

input[type="number"] {
  font-size: 9pt;
  width: 4em;
}
input[type="text"] {
  font-size: 9pt;
}
@media print {
  .output-region {
    font-size: 9pt !important;
    overflow: visible !important;
    border: none !important;
  }
  .world-table {
    font-size: 9pt !important;
  }
  .trade-table {
    font-size: 9pt !important;
  }
}

.world-table {
  color: inherit;
  text-align: left;
  padding: 10px;
  border-spacing: 20px 0px;
}

.world-table td,
.world-table th {
  padding: 2px 12px;
}

.world-table th:nth-child(4),
.world-table td:nth-child(4) {
  min-width: 100px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .world-table th:nth-child(4),
  .world-table td:nth-child(4) {
    min-width: 110px;
  }
}

.trade-table {
  color: inherit;
  text-align: left;
  padding: 1cqi;
  border-spacing: 15px 2px;
}

.trade-table td,
.trade-table th {
  padding: 2px 12px;
}

.App {
  background-image: url("galaxy1.png");
  background-size: cover;
  background-repeat: repeat;
  background-attachment: fixed;
  background-position: center;
  display: flex;
  flex-direction: column;
  background-color: black;
  align-items: left;
  min-height: 100vh;
  width: 100vw;
  color: white;
  font-family: "Space Mono", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: auto;
}

/* Fix for mobile devices where background-attachment: fixed causes issues */
@media (max-width: 768px) {
  .App {
    background-attachment: scroll;
    background-size: cover;
    min-height: 100vh;
  }
}

.key-region {
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: "Space Mono", sans-serif;
  font-weight: 400;
  width: fit-content;
  gap: 0 2em;
  padding: 5px 1em 5px 1em;
  margin-bottom: 1em;
  display: flex;
  flex-direction: column;
}

.world-entry-form {
  display: flex;
  flex-direction: row;
}

.world-entry-form * {
  display: flex;
}

.world-entry-form label {
  flex: 1;
}

.world-entry-form input[type="text"] {
  width: 130px;
}

.world-text-entry {
  flex-direction: column;
}

.world-text-entry > div {
  padding: 2px;
}

.world-text-entry label {
  padding-right: 10px;
}

.control-container {
  padding: 2px 5px 2px 10px;
  display: flex;
  align-items: start;
}

.control-container label {
  padding-left: 5px;
  font-size: 12pt;
}

#entry-buttons input {
  flex: 1;
  margin: 0 5px;
}

#world-suggestions {
  display: none;
}

#world-suggestions option {
  display: none;
}

.output-region {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.3);
  overflow: auto;
  width: fit-content;
}

.table-entry {
  padding-left: 0em;
  color: white;
}

.blue-button {
  background-image: linear-gradient(#42a1ec, #0070c9);
  border: 1px solid #0077cc;
  border-radius: 4px;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  direction: ltr;
  letter-spacing: -0.022em;
  line-height: 1.47059;
  overflow: visible;
  margin: 2px;
  text-align: center;
  vertical-align: baseline;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  font-size: 12pt;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 2px 16px;
}

.blue-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.blue-button:hover {
  background-image: linear-gradient(#51a9ee, #147bcd);
  border-color: #1482d0;
  text-decoration: none;
}

.blue-button:active {
  background-image: linear-gradient(#3d94d9, #0067b9);
  border-color: #006dbc;
  outline: none;
}

.blue-button:focus {
  box-shadow: rgba(131, 192, 253, 0.5) 0 0 0 3px;
  outline: none;
}

.loading-indicator {
  margin-left: 10px;
  font-size: 0.8em;
  color: #666;
}

.world-suggestions {
  display: none;
}

.skill-entry {
  display: flex;
  flex-direction: row;
  gap: 2em;
  width: 100%;
}

.skill-entry > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5em;
}

@media (max-width: 768px) {
  .skill-entry {
    flex-direction: column;
    gap: 1em;
  }
}

.distance-input {
  width: 50px;
}

.passengers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.passenger-type {
  text-align: center;
  border: 1px solid #ccc !important;
  border-radius: 5px;
  padding: 0.5rem;
  background: none;
  color: white;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
  box-shadow: none;
}

.passenger-type:focus {
  outline: none;
  border: 1px solid #ccc !important;
}

.passenger-type:active {
  background-image: linear-gradient(#3d94d9, #0067b9);
  border: 1px solid #006dbc !important;
}

.passenger-type h4 {
  font-size: 10pt;
  margin: 0;
}

.passenger-count {
  font-size: 12pt;
  font-weight: bold;
  margin-top: 0.5rem;
}

.passenger-button {
  background: none;
  border: none;
  color: white;
  font-size: 12pt;
  font-weight: bold;
  margin-top: 0.5rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.passenger-button:active {
  background-image: linear-gradient(#3d94d9, #0067b9);
  border: 1px solid #006dbc;
  border-radius: 4px;
  padding: 2px 4px;
}

.freight-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.freight-lot {
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 0.25rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  font-family: inherit;
}

.freight-selected {
  background-image: linear-gradient(#3d94d9, #0067b9);
  border: 1px solid #006dbc;
}

.selector-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.selector-container + h1,
.App > h1:first-child {
    text-align: center;
}

.tool-card {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 2rem;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-card h2 {
    color: #51A9EE;
    margin-bottom: 1rem;
    text-align: center;
}

.tool-card p {
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  text-align: left;
}

.tool-card button {
  align-self: center;
}

.manifest-container {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.3);
  width: fit-content;
}

.manifest-section {
  margin-bottom: 1rem;
}

.manifest-section h5 {
  margin: 0 0 0.5rem 0;
  color: #51a9ee;
  font-size: 12pt;
}

.manifest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.manifest-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  border: 1px solid #555;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.manifest-unboxed-item {
  display: flex;
  justify-content: center;
  border: none;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.manifest-execute-trades-button {
  width: 100%;
}

.manifest-label {
  font-weight: normal;
  margin-top: 0px;
}

.manifest-first-row {
  line-height: 1;

}

.manifest-value {
  font-weight: bold;
  color: #51a9ee;
}

.manifest-negative {
  color: #b00020;
}

.manifest-trade-box {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.manifest-trade-good {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.manifest-freight {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.manifest-row-break {
  grid-column: 1 / -1;
  height: 0;
}

.manifest-delete {
  background: none;
  border: none;
  color: #b00020;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: 10pt;
  margin-right: 0.5rem;
  align-self: flex-start;

}

.manifest-delete-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #b00020;
  color: #b00020;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  font-size: 10px;
  border-radius: 2px;
  box-sizing: border-box;
}

.freight-item {
  padding: 0.25rem 0.5rem;
  border: 1px solid #555;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 10pt;
}

.manifest-goods {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.goods-item {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  border: 1px solid #555;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
}

.manifest-button {
  background: linear-gradient(135deg, #6a6a6a 0%, #4a4a4a 100%);
  border: 1px solid #555;
  border-radius: 4px;
  color: white;
  padding: 4px 12px;
  font-size: 10pt;
  font-family: "Space Mono", sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  margin: 0 0.5rem 0 0.15rem;
}

.manifest-button:active {
  background-image: linear-gradient(#3d94d9, #0067b9);
  border: 1px solid #006dbc;
}

.manifest-summary {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #555;
  border-radius: 3px;
  font-size: 10pt;
}

.summary-line {
  text-align: center;
}

.summary-line strong {
  color: #51a9ee;
}

@media (max-width: 768px) {
  .manifest-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .world-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

.purchased-input {
  width: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #555;
  color: white;
  padding: 0.25rem;
  border-radius: 3px;
  font-family: inherit;
  text-align: center;
}

.purchased-input:focus {
  outline: none;
  border-color: #3d94d9;
  background: rgba(255, 255, 255, 0.15);
}

.purchased-input-active {
  color: #51a9ee !important;
}

datalist {
  font-size: 9pt;
  line-height: 1.2;
}

datalist option {
  padding: 2px 4px;
  margin: 0;
  line-height: 1.2;
  font-size: 9pt;
}

.trade-section {
  font-size: 14pt;
}

.badge-carried {
  margin-left: 0.25rem;
  padding: 0 0.3rem;
  border: 1px solid #1976d2;
  color: #1976d2;
  border-radius: 2px;
  font-size: 10px;
}

/* Trade header layout (replaces prior inline styles) */
.trade-header-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.trade-header-row h2 {
  margin-bottom: 0em;
}
.trade-header-title {
  margin: 0 0 1rem 0;
}

.trade-header-classifications {
  font-weight: normal;
  font-size: 16pt;
  color: #888;
}

.trade-illegal-toggle {
  font-weight: normal;
  font-size: .95rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0px 0px 24px 4px;
}
