/* ====== FFT Style Variables ====== */
:root {
  --fft-bg-top:    #f5efe3;
  --fft-bg-bottom: #e0d4c0;
  --fft-border:    #b7aa93;
  --fft-inner:     rgba(255, 255, 255, 0.45);
  --fft-shadow:    rgba(0, 0, 0, 0.55);
  --fft-header-bg-top:    #d9ceb7;
  --fft-header-bg-bottom: #c4b79f;
}

/* ====== Font Face ====== */
@font-face {
  font-family: "Badr Bold";
  src: url('fonts/Badr Bold/Badr Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  unicode-range: U+0020-002F, U+003A-007E, U+00A0-00FF, U+0100-017F, U+0180-024F, U+1E00-1EFF, U+2000-206F, U+20A0-20CF, U+2100-214F, U+2190-21FF, U+2200-22FF, U+2C60-2C7F, U+A720-A7FF, U+FB00-FB4F;
  /* Exclude numbers (U+0030-0039) so they use fallback font */
}

/* ====== Global layout / FFT-style look ====== */
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-y: auto;
  background: url('images/bg-tile.png') repeat;
  background-size: 22% auto;
  background-position: -20% 0;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
  color: #221b11;
  font-family: "Badr Bold", "Trebuchet MS", "Verdana", sans-serif;
}

/* Numbers will automatically use fallback font due to unicode-range exclusion */

.screen {
  width: 100%;
  max-width: 1400px;
  padding: 0 24px 24px 24px;
  box-sizing: border-box;
  margin: 0 auto;
}

.title-header {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.9) 20%, rgba(0, 0, 0, 0.7) 40%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.3) 75%, rgba(0, 0, 0, 0.1) 90%, rgba(0, 0, 0, 0) 100%);
  padding: 14px 24px 14px 24px;
  color: #eae0cf;
  font-size: 22px;
  font-weight: bold;
  margin: 0;
  text-align: left;
  width: 100%;
  position: relative;
  margin-left: 30px;
}

.main-panel {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr;
  gap: 16px;
  color: #221b11;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Base FFT panel */
.fft-panel {
  background: linear-gradient(to bottom, var(--fft-bg-top), var(--fft-bg-bottom));
  border: 1px solid var(--fft-border);
  border-radius: 6px;
  padding: 14px 18px;
  box-shadow:
    0 0 0 1px var(--fft-inner) inset,
    0 6px 18px var(--fft-shadow);
  position: relative;
  color: #221b11;
}

/* FFT panel header */
.fft-panel__header {
  background: linear-gradient(to bottom,
    var(--fft-header-bg-top),
    var(--fft-header-bg-bottom)
  );
  border-radius: 4px 4px 0 0;
  padding: 6px 10px;
  margin: -14px -18px 10px -18px; /* let header touch panel edges */
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,0.35);
}

/* Legacy panel class - now uses FFT style */
.panel {
  background: linear-gradient(to bottom, var(--fft-bg-top), var(--fft-bg-bottom));
  border: 1px solid var(--fft-border);
  border-radius: 6px;
  padding: 14px 18px;
  box-shadow:
    0 0 0 1px var(--fft-inner) inset,
    0 6px 18px var(--fft-shadow);
  position: relative;
  color: #221b11;
}

.panel-title {
  background: linear-gradient(to bottom,
    var(--fft-header-bg-top),
    var(--fft-header-bg-bottom)
  );
  border-radius: 4px 4px 0 0;
  padding: 6px 10px;
  margin: -14px -18px 10px -18px;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(0,0,0,0.35);
  position: relative;
  top: 0;
  left: 0;
}

.panel-content {
  font-size: 16px;
  margin-top: 6px;
  line-height: 1.5;
}

/* Party Member Settings alignment */
.party-member-row {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(174, 182, 207, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.party-member-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.party-member-label {
  font-weight: 600;
  min-width: 120px;
  flex-shrink: 0;
}

.party-member-dropdowns {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.member-type-select {
  min-width: 90px;
  padding: 4px 6px;
  font-size: 15px;
}

.member-job-select {
  min-width: 140px;
  padding: 4px 6px;
  font-size: 15px;
}

.member-secondary-select {
  min-width: 140px;
  padding: 4px 6px;
  font-size: 15px;
}

.member-secondary-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.member-secondary-label {
  white-space: nowrap;
  flex-shrink: 0;
}

/* FFT list styles */
.fft-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fft-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  border-bottom: 1px solid rgba(0,0,0,0.14);
}

.fft-list li:last-child {
  border-bottom: none;
}

/* Small right-aligned numeric column */
.fft-num {
  min-width: 3em;
  text-align: right;
}

/* Tiny caption text at the bottom */
.fft-caption {
  margin-top: 6px;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.8;
}

.panel-content label {
  display: block;
  margin-bottom: 8px;
  cursor: pointer;
  line-height: 1.5;
}

.panel-content select {
  font-size: 15px;
  padding: 4px 6px;
  margin-right: 4px;
}

.panel-content input[type="checkbox"],
.panel-content input[type="radio"] {
  margin-right: 6px;
  transform: scale(1.2);
}

.inline {
  display: inline-block;
  margin-right: 16px;
}

/* Make radio button groups in settings display horizontally - only apply to Settings panel in left column */
.left-column .panel-content > div:not(.buttons) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.left-column .panel-content > div:not(.buttons) strong {
  margin-right: 4px;
  flex-shrink: 0;
}

.hint {
  font-size: 14px;
  opacity: 0.75;
  margin-top: 8px;
  line-height: 1.5;
}

.buttons {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.btn {
  padding: 6px 14px;
  border: 2px solid #c0c8e0;
  background: linear-gradient(to bottom, #2f446f, #1c2741);
  color: #f4f8ff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,0,0,0.7);
}

.btn.secondary {
  border-color: #8d96b4;
  background: linear-gradient(to bottom, #323b59, #181d30);
  opacity: 0.9;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 0 2px rgba(0,0,0,0.9);
}

.results-panel {
  font-size: 16px;
  line-height: 1.6;
}

.results-section-title {
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #8a93ad;
  margin: 10px 0 6px;
  padding-bottom: 2px;
}

.row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}

.row .label {
  opacity: 0.9;
}

.row .value {
  font-weight: 600;
}

.job-list {
  margin-left: 12px;
  margin-top: 4px;
}

.job-list li {
  list-style: square;
  margin-bottom: 4px;
  line-height: 1.6;
}

.small {
  font-size: 14px;
  opacity: 0.8;
}

.footer-bar {
  margin-top: 6px;
  font-size: 11px;
  text-align: right;
  opacity: 0.75;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
  .main-panel {
    grid-template-columns: 1fr;
  }
  
  .screen {
    padding: 16px;
  }
  
  .title-header {
    font-size: 18px;
    padding-left: 40px;
    margin-left: 0;
  }
  
  .panel {
    padding: 12px 14px;
  }
  
  .panel-title {
    margin: -12px -14px 8px -14px;
    padding: 5px 8px;
    font-size: 0.9rem;
  }
  
  .panel-content {
    font-size: 15px;
  }
  
  .member-type-select,
  .member-job-select,
  .member-secondary-select {
    width: 70%;
    min-width: 70%;
    max-width: 70%;
    box-sizing: border-box;
  }
  
  .member-secondary-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
  }
  
  .member-secondary-label {
    display: none;
  }
  
  .party-member-dropdowns {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .left-column .panel-content > div:not(.buttons) {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .left-column .panel-content label {
    margin-bottom: 0;
  }
  
  .buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .screen {
    padding: 12px;
  }
  
  .title-header {
    font-size: 16px;
    padding-left: 40px;
  }
  
  .panel-content {
    font-size: 14px;
  }
  
  .panel-title {
    font-size: 0.85rem;
  }
}

@media (max-height: 800px) {
  
  .screen {
    padding: 12px;
  }
}

/* ====== Link Styling ====== */
a {
  color: #4a6fa5;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2d4a6f;
  text-decoration: underline;
}

a:visited {
  color: #6b4a8f;
}

a:visited:hover {
  color: #4d2d6f;
}

/* Links List */
.links-list {
  margin-top: 4px;
  padding-left: 20px;
  list-style-type: disc;
}

.links-list li {
  margin-bottom: 8px;
}

.links-list a {
  font-size: 1.05em;
  font-weight: bold;
  color: #4a6fa5;
  text-decoration: none;
  transition: color 0.2s ease;
}

.links-list a:hover {
  color: #2d4a6f;
  text-decoration: underline;
}

.links-list a:visited {
  color: #6b4a8f;
}

.links-list a:visited:hover {
  color: #4d2d6f;
}

