html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;;
  min-height: 100%;
  background: #d3d3d3;
}

[data-bs-theme="dark"] body {
  background: #212529;
}

.footer {
  position: sticky;
  bottom: 0;
  width: 100%;
  min-height: 30px;
  margin-top: auto;
  line-height: 14px;
  background-color: hsl(0, 0%, 96%);
  font-size: 10px;
  padding-top: 8px;
  padding-bottom: 8px;
}

[data-bs-theme="dark"] .footer {
  background-color: hsl(0, 0%, 10%);
}

.qso-area {
  font-family: "Courier New", Courier, monospace;
  font-size: larger;
}

.qsoList {
  background: white;
}

[data-bs-theme="dark"] .qsoList {
  background: #1a1d20;
}

table {
  width: 100%;
  position: relative;
}

thead,
tbody tr {
  width: 100%;
  table-layout: fixed;
  display: table;
}

/* Column widths optimized for data */
thead th:nth-child(1), tbody td:nth-child(1) { width: 4%; } /* # */
thead th:nth-child(2), tbody td:nth-child(2) { width: 9%; white-space: nowrap; } /* Date */
thead th:nth-child(3), tbody td:nth-child(3) { width: 5%; } /* Time */
thead th:nth-child(4), tbody td:nth-child(4) { width: 12%; } /* Callsign */
thead th:nth-child(5), tbody td:nth-child(5) { width: 5%; } /* Band */
thead th:nth-child(6), tbody td:nth-child(6) { width: 5%; } /* Mode */
thead th:nth-child(7), tbody td:nth-child(7) { width: 5%; } /* RS */
thead th:nth-child(8), tbody td:nth-child(8) { width: 5%; } /* RR */
thead th:nth-child(9), tbody td:nth-child(9) { width: 8%; } /* Op. */
thead th:nth-child(10), tbody td:nth-child(10) { width: 17%; } /* Sig Info */
thead th:nth-child(11), tbody td:nth-child(11) { width: 25%; } /* Comment */

/* Resizable columns */
thead th {
  position: relative;
  user-select: none;
}

thead th .col-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  background: transparent;
}

thead th .col-resizer:hover,
thead th .col-resizer.resizing {
  background: rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] thead th .col-resizer:hover,
[data-bs-theme="dark"] thead th .col-resizer.resizing {
  background: rgba(255, 255, 255, 0.3);
}

tbody {
  overflow-y: inherit;
  max-height: 380px;
  position: absolute;
  width: 100%;
}
thead tr {
  background-color: #a9a9a9;
  color: #000;
}

/* Stacked cell layout for primary content with metadata */
.cell-stacked {
  vertical-align: top;
  padding: 4px 8px !important;
}

.cell-primary {
  font-weight: 500;
  line-height: 1.2;
}

.cell-meta {
  font-size: 0.75em;
  color: #28a745;
  line-height: 1.2;
  margin-top: 2px;
}

[data-bs-theme="dark"] thead tr {
  background-color: #495057;
  color: #fff;
}

tbody tr:nth-child(even) {
  background-color: #f5f5f5;
}

tbody tr:nth-child(odd) {
  background-color: #fff;
}

[data-bs-theme="dark"] tbody tr:nth-child(even) {
  background-color: #2a2a2a;
}

[data-bs-theme="dark"] tbody tr:nth-child(odd) {
  background-color: #1a1d20;
}

[data-bs-theme="dark"] tbody tr {
  color: #dee2e6;
}

tbody tr {
  cursor: pointer;
}

tbody tr.row-selected {
  background-color: #cce5ff !important;
}

[data-bs-theme="dark"] tbody tr.row-selected {
  background-color: #264f78 !important;
}

[data-bs-theme="dark"] .cell-meta {
  color: #5cb85c;
}

/* Comment cell styling */
.comment-cell {
  font-size: 0.85em;
  color: #666;
  font-style: italic;
}

[data-bs-theme="dark"] .comment-cell {
  color: #aaa;
}

/* Callsign link styling */
.cell-primary a {
  color: inherit;
  text-decoration: none;
}

.cell-primary a:hover {
  text-decoration: underline;
  color: #007bff;
}

[data-bs-theme="dark"] .cell-primary a:hover {
  color: #4dabf7;
}

@media (min-width: 1200px) {
  .input-example {
    font-size: x-small;
  }
  label {
    font-size: small;
  }
}

li.nav-item {
    margin-right: 10px;
}

/* Resizable layout */
.resizable-container {
  display: flex;
  width: 100%;
  min-height: 500px;
  position: relative;
}

.resizable-panel {
  overflow: visible;
  padding: 0 15px;
}

#table-panel.resizable-panel {
  overflow: auto;
}

#form-panel {
  flex: 0 0 35%;
  min-width: 300px;
  max-width: 70%;
}

#table-panel {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
}

#table-panel .qsoList {
  flex: 1;
  overflow-y: auto;
}

.resizable-splitter {
  flex: 0 0 8px;
  background: #ddd;
  cursor: col-resize;
  position: relative;
  z-index: 10;
  transition: background 0.2s;
}

.resizable-splitter:hover {
  background: #999;
}

[data-bs-theme="dark"] .resizable-splitter {
  background: #495057;
}

[data-bs-theme="dark"] .resizable-splitter:hover {
  background: #6c757d;
}

.resizable-splitter::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 40px;
  background: #fff;
  border-radius: 2px;
  opacity: 0.5;
}

/* Font size controls */
.font-size-controls {
  display: flex;
  gap: 4px;
}

.font-size-controls .btn {
  padding: 2px 8px;
  line-height: 1.2;
  min-width: 28px;
  margin-top: 5px;
  margin-bottom: 5px;
}


