/* =========================================================
   Base & Layout
   ========================================================= */
html, body {
  height: 100%;
  margin: 0;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

.page-gutter {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* ensures textarea can stretch */
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-logo {
  height: 28px;       /* scale here */
  width: auto;        /* preserve aspect ratio */
  flex-shrink: 0;     /* prevent shrinking */
}

.min-wage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.min-wage-inputs-wrapper {
  display: inline-block;
  white-space: nowrap;   /* critical part: keep the whole group together */
}

.min-wage-inputs {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}


/* =========================================================
   Typography
   ========================================================= */
   
.title {
  margin: 10px 0 10px;
  font-weight: 600;
  font-size: clamp(24px, 5vw, 32px);
  color: #bababa;
  letter-spacing: 0.4px;
}

.text-with-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 570px;
  margin: 10px 0 10px;
}

.text {
  margin: 0;
  font-weight: 300;
  font-size: clamp(14px, 4.5vw, 16px);
  color: #808080;
  line-height: 1.4;
  letter-spacing: 0.3px;
  flex: 1 1 auto;
  min-width: 0;
}

.link {
  font-weight: 300;
  font-size: clamp(14px, 4.5vw, 16px);
  color: #6ec495;
  text-decoration: underline;
  text-underline-offset: 2px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.link:hover {
  text-decoration-thickness: 2px;
}

.worker-key {
  color: #808080;
  font-family: "Fira Code", monospace;
  font-size: clamp(12px, 1.5vw, 14px);
}

.worker-key-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}


/* Generic worker-value for payment / origins */
.worker-value {
  color: #6ec495;
  font-family: "Fira Code", monospace;
  font-size: clamp(12px, 1.5vw, 14px);
  background: transparent;
  border: none;
  padding: 0;
  display: inline;   /* use inline so it stays with the label */
  width: 42ch;       /* allow it to shrink/grow naturally */
  box-sizing: content-box;
  outline: none;
}

/* Minimum wage inputs */
.mw-input {
  color: #808080;              /* grey default */
  font-family: "Fira Code", monospace;
  font-size: clamp(12px, 1.5vw, 14px);
  background: transparent;      /* no box */
  border: none;
  padding: 0;
  display: inline-block;
  width: 8ch;                 /* fixed width for numbers */
  box-sizing: content-box;
  outline: none;
  text-align: left;
  transition: color 0.15s ease;
}

.mw-input:focus,
.mw-input:not(:placeholder-shown) {
  color: #6ec495;              /* green when user types */
}

.short-field {
  width: 5ch;   /* safer if you ever allow double digits like 16, 32, etc. */
}


.worker-section-title {
  color: #bababa;   /* slightly lighter than #808080 */
  letter-spacing: 0.4px;
}

/* =========================================================
   Button
   ========================================================= */
   .crosshair-btn {
    --corner-offset: -2px;
    --corner-thickness: 1.5px;
    --corner-color: #4ea277;
  
    width: 180px;              /* fixed width */
    height: 40px;              /* fixed height */
    margin: 30px 30px 30px;
    padding: 0;                /* padding handled by height */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #2c5639;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
    transition: background 0.15s ease;
  
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .crosshair-btn:hover {
    background: rgba(0, 255, 0, 0.08);
  }
  
  .crosshair-btn:active {
    background: limegreen;
    animation: flicker 0.2s;
  }
  
  @keyframes flicker {
    0%, 100% { background: limegreen; }
    50% { background: #00ff00; }
  }
  
  /* Button corner decorations */
  .crosshair-btn::before,
  .crosshair-btn::after,
  .crosshair-btn .c1,
  .crosshair-btn .c2 {
    content: "";
    position: absolute;
    width: 12px;
    height: 8px;
    pointer-events: none;
  }
  
  .crosshair-btn::before {
    top: var(--corner-offset);
    left: var(--corner-offset);
    border-top: var(--corner-thickness) solid var(--corner-color);
    border-left: var(--corner-thickness) solid var(--corner-color);
  }
  
  .crosshair-btn::after {
    top: var(--corner-offset);
    right: var(--corner-offset);
    border-top: var(--corner-thickness) solid var(--corner-color);
    border-right: var(--corner-thickness) solid var(--corner-color);
  }
  
  .crosshair-btn .c1 {
    bottom: var(--corner-offset);
    left: var(--corner-offset);
    border-bottom: var(--corner-thickness) solid var(--corner-color);
    border-left: var(--corner-thickness) solid var(--corner-color);
  }
  
  .crosshair-btn .c2 {
    bottom: var(--corner-offset);
    right: var(--corner-offset);
    border-bottom: var(--corner-thickness) solid var(--corner-color);
    border-right: var(--corner-thickness) solid var(--corner-color);
  }

  .button-row {
    width: 100%;
    display: flex;
  }
  /*
  @media (min-width: 601px) {
    .button-row {
      justify-content: flex-start;
      padding-left: 40px;
    }
  }
  
  @media (max-width: 600px) {
    .button-row {
      justify-content: center;
    }
  }
  */
  

/* =========================================================
   Textarea / Console
   ========================================================= */
.textarea-wrap {
  flex: 1;
  display: flex;
  min-height: 0;
  padding-top: 10px;
}

.textarea-wrap textarea {
  flex: 1;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 10px;
  background-color: #000;
  color: #fff;
  border: 1px solid #444;
  font-family: "Fira Code", monospace;
  font-size: clamp(12px, 1.5vw, 14px);
  line-height: 1;
  white-space: pre;
  resize: vertical;
  overflow-y: auto;
}

/* =========================================================
   Mobile refinements
   ========================================================= */
@media (max-width: 600px) {
  .text-with-link {
    max-width: 100%;
  }

  .title,
  .text {
    letter-spacing: 0.2px;
  }

  .hide-on-mobile {
    display: none;
  }
}

/* =========================================================
   iOS Safari form normalization & zoom prevention
   ========================================================= */

/* Reset appearance for inputs, textareas, selects, buttons */
input,
textarea,
select,
button {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  background-image: none;
  font-family: "Fira Code", monospace;
  line-height: 1.2;
}

/* Force minimum font-size 16px on iOS to prevent auto-zoom */
input,
textarea,
select {
  font-size: 16px;
  -webkit-text-size-adjust: 100%; /* prevent iOS text scaling */
}

/* Remove inner shadows on iOS Safari */
input {
  -webkit-box-shadow: none;
  box-shadow: none;
}

/* Ensure custom radios render correctly */
.radio-option input {
  -webkit-appearance: none;
  appearance: none;
}

/* Optional: prevent zooming on orientation change or pinch-zoom */
html {
  -webkit-text-size-adjust: 100%; /* prevents iOS zooming on focus */
}
   


/* ============================================
   Radio button color control
   ============================================ */
   .radio-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: "Fira Code", monospace;
    font-size: clamp(12px, 1.5vw, 14px);
  }
  
  /* hide native radio */
  .radio-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  
  /* radio shell */
  .custom-radio {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
  }
  
  /* inner dot */
  .custom-radio::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ec495;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.15s ease;
  }
  
  /* checked */
  .radio-option input:checked + .custom-radio {
    border-color: #6ec495;
  }
  
  .radio-option input:checked + .custom-radio::after {
    opacity: 1;
    transform: scale(1);
  }
  
  /* label colors */
  .radio-label {
    color: #808080;
  }
  
  .radio-option input:checked ~ .radio-label {
    color: #6ec495;
  }
  
  /* hover */
  .radio-option:hover .radio-label {
    color: #9adbb7;
  }
  
  .custom-radio {
    width: 10px;
    height: 10px;
  }
  
  .custom-radio::after {
    width: 5px;
    height: 5px;
  }
  
