/* the farm's browser page: dash.css gives the sign, the meadow and the paper; this adds the screen */
.wrap.wide { max-width: 1480px; padding-top: 20px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.top .chip { background: var(--paper); color: var(--ink); border: 3px solid #2f251b; box-shadow: 0 3px 0 #2f251b; }
.chip.off .dot { background: #9aa3b2; box-shadow: none; }
.chip.wait .dot { background: var(--hp-mid); box-shadow: 0 0 6px var(--hp-mid); }
.btn {
  font: 10px/1 var(--font-px); padding: 11px 14px; background: var(--paper); border: 3px solid var(--ink);
  border-radius: 6px; box-shadow: 0 3px 0 var(--ink); color: var(--ink);
}
.btn:hover { background: #fff; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--clay); color: #fff; border-color: #6b2f1f; box-shadow: 0 3px 0 #6b2f1f; }
.btn.primary:hover { background: #e4865f; }
.btn:disabled { opacity: .5; cursor: default; }
.small-btn { font-size: 8px; padding: 8px 10px; }
.form-error { color: var(--bad); min-height: 1em; margin: 8px 0 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.intro { max-width: 760px; margin-bottom: 14px; }
.intro h2 { font-size: 12px; line-height: 1.6; margin-bottom: 12px; }

.bar { display: flex; gap: 10px; margin: 0 0 14px; }
.bar input {
  flex: 1; min-width: 0; font: 22px/1 var(--font-body); padding: 8px 12px; color: var(--ink); background: var(--white);
  border: 3px solid var(--ink); border-radius: 6px; box-shadow: inset 0 3px 0 var(--paper-2);
}
.bar input:focus { outline: 3px solid var(--clay); outline-offset: 1px; }

.screen-frame { position: relative; padding: 8px; background: #2b2f3a; border-color: var(--ink); overflow: hidden;
  box-shadow: 0 var(--px) 0 var(--shadow); }
.screen { width: 100%; height: 70vh; background: #1b1f2a; border-radius: 4px; overflow: hidden; }
.screen canvas { image-rendering: auto; }
.screen-msg {
  position: absolute; inset: 8px; display: grid; place-items: center; margin: 0; color: #fff; text-align: center;
  font: 10px/1.8 var(--font-px); background: rgba(27, 31, 42, .82); border-radius: 4px; padding: 20px;
}
.help { margin: 10px 2px 18px; color: #f4f1e8; text-shadow: 1px 1px 0 #1b2410; }
.toast { margin-left: 10px; font: 8px/1 var(--font-px); color: #1b2410; background: var(--hp-mid); padding: 4px 6px; border-radius: 3px; text-shadow: none; }

.tabs-panel { margin-bottom: 20px; }
.tab-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tab-list li { display: flex; gap: 14px; align-items: baseline; padding: 6px 10px; background: var(--white);
  border: 2px solid var(--paper-2); border-radius: 4px; min-width: 0; }
.tab-list b { font-weight: 400; flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-list span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

@media (max-width: 760px) {
  .screen { height: 56vh; }
  .top-actions .chip { display: none; }
}

/* profiles: one tab per profile, its dot green when it runs */
.profiles { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ptab {
  display: inline-flex; align-items: center; gap: 8px; font: 9px/1 var(--font-px); padding: 9px 12px; color: var(--ink);
  background: var(--tan-2); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 3px 0 var(--ink);
}
.ptab:hover { background: var(--paper); }
.ptab[aria-selected="true"] { background: var(--paper); border-color: var(--clay-2); box-shadow: 0 3px 0 var(--clay-2); color: var(--clay-2); }
.ptab .dot { width: 8px; height: 8px; background: #9aa3b2; }
.ptab.up .dot { background: var(--hp-good); box-shadow: 0 0 6px var(--hp-good); }
.ptab.wait .dot { background: var(--hp-mid); }
.add-form { display: inline-flex; gap: 8px; align-items: center; }
.add-form input { font: 20px/1 var(--font-body); padding: 6px 10px; width: 14em; border: 3px solid var(--ink); border-radius: 6px; background: var(--white); color: var(--ink); }
.bar-error:empty { display: none; }
.bar-error { color: #fff; background: rgba(122, 42, 29, .85); padding: 6px 10px; border-radius: 4px; margin: -4px 0 12px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 24px; }
.btn.danger { background: #f6d8d1; border-color: #7a2a1d; box-shadow: 0 3px 0 #7a2a1d; color: #7a2a1d; }
.confirm { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #fff; text-shadow: 1px 1px 0 #1b2410; }

/* the connection bar: DIRECT or VIA PROXY for the selected profile, and what sites see */
.conn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 14px; padding: 10px 12px;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 6px; box-shadow: 0 3px 0 var(--ink);
}
.conn-label { font: 8px/1 var(--font-px); color: var(--muted); }
.switch { display: inline-flex; border: 3px solid var(--ink); border-radius: 6px; overflow: hidden; }
.seg { font: 9px/1 var(--font-px); padding: 9px 12px; background: var(--white); color: var(--muted); border: 0; cursor: pointer; }
.seg + .seg { border-left: 3px solid var(--ink); }
.seg:hover { color: var(--ink); }
.seg[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg[aria-pressed="true"]::before { content: "● "; }
#conn-proxy[aria-pressed="true"] { background: var(--hp-good); color: #1b2410; }
.seg:disabled { cursor: default; opacity: .6; }
.conn-country { font: 20px/1 var(--font-body); padding: 4px 8px; color: var(--ink); background: var(--white);
  border: 3px solid var(--ink); border-radius: 6px; max-width: 16em; }
.conn-state { flex: 1 1 18em; min-width: 0; font: 20px/1.2 var(--font-body); color: var(--ink); }
.conn-state b { font-weight: 400; color: #2f5d16; }
.conn-state.bad { color: #7a2a1d; }
.proxy-form { flex-wrap: wrap; flex-basis: 100%; }
.proxy-form input { width: 26em; max-width: 100%; }
.proxy-hint { flex-basis: 100%; margin: 2px 0 0; color: var(--muted); }
.proxy-error { flex-basis: 100%; margin: 0; }
@media (max-width: 760px) { .conn-label { display: none; } }

/* whose a profile is (the manager sees every Claude's), ASSIGN, and the screen for someone only watching the farm */
.ptab .powner { font: 16px/1 var(--font-body); color: var(--muted); margin-left: 2px; }
.ptab[aria-selected="true"] .powner { color: var(--clay-2); }
.add-form { flex-wrap: wrap; }
.for-pick, .assign { display: inline-flex; align-items: center; gap: 8px; font: 8px/1 var(--font-px); color: #fff;
  text-shadow: 1px 1px 0 #1b2410; }
.for-pick select, .assign select { font: 20px/1 var(--font-body); padding: 4px 8px; color: var(--ink); background: var(--white);
  border: 3px solid var(--ink); border-radius: 6px; max-width: 16em; text-shadow: none; }
#denied .btn { text-decoration: none; display: inline-block; }
@media (max-width: 640px) {
  .add-form input { width: 100%; flex: 1 1 100%; }
  .for-pick, .assign { flex-wrap: wrap; }
  .for-pick select, .assign select { max-width: 100%; }
}

/* typing into the farm's browser: a bar under the screen; the phone keyboard's hidden box */
.type-bar { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; position: relative; }
.type-text { flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 8px 10px; border: 3px solid var(--ink, #1f2a44);
  border-radius: 6px; background: #fffdf5; }
.kbd-sink { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0;
  resize: none; font-size: 16px; /* 16px: iOS doesn't zoom the page in on focus */ }
#kbd-btn { display: none; }
@media (hover: none), (pointer: coarse) { #kbd-btn { display: inline-block; } }
@media (max-width: 760px) { .type-bar { flex-wrap: wrap; } .type-text { flex-basis: 100%; order: 3; } }
