/* HOBB Phone Desk — Home PC bar (phone) + phone-folders dialog (desktop). 2026-09-27-phone1 */

.sb-phone-desk {
  max-width: 680px;
  margin: 6px auto 8px;
  padding: 8px 10px;
  border: 1px solid var(--chat-border, #2c3a33);
  border-radius: 12px;
  background: var(--chat-surface, #18211d);
  color: var(--chat-text, #e8efe9);
  font-size: 0.82rem;
}

.sb-pd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sb-pd-led {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--chat-border, #2c3a33);
  border-radius: 10px;
  background: #1d2823;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.sb-pd-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c9a227;
  box-shadow: 0 0 6px rgba(201, 162, 39, 0.7);
  flex-shrink: 0;
}
.sb-pd-led[data-state="online"] .sb-pd-dot {
  background: #2ecc71;
  box-shadow: 0 0 8px rgba(46, 204, 113, 0.8);
}
.sb-pd-led[data-state="offline"] .sb-pd-dot,
.sb-pd-led[data-state="nologin"] .sb-pd-dot {
  background: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.7);
}

.sb-pd-btn {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--chat-border, #2c3a33);
  border-radius: 10px;
  background: #243029;
  color: var(--teal, #3fd0a4);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.sb-pd-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.sb-pd-btn[hidden] {
  display: none;
}
.sb-pd-primary {
  background: var(--teal-dim, #1f8a6b);
  color: #fff;
  border-color: transparent;
}

.sb-pd-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #1a3d32;
}
.sb-pd-chip[hidden] {
  display: none;
}
.sb-pd-chip-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-pd-chip-hint {
  flex: 1;
  color: var(--chat-muted, #9fb1a7);
  font-size: 0.74rem;
}

.sb-pd-x {
  border: none;
  background: transparent;
  color: var(--chat-muted, #9fb1a7);
  font-size: 1rem;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
}

.sb-pd-status {
  margin: 8px 0 0;
  color: var(--teal, #3fd0a4);
  font-size: 0.78rem;
}

.sb-pd-sheet,
.sb-pd-offline {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--chat-border, #2c3a33);
}
.sb-pd-sheet[hidden],
.sb-pd-offline[hidden] {
  display: none;
}
.sb-pd-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.sb-pd-list {
  list-style: none;
  margin: 6px 0;
  padding: 0;
  max-height: 42vh;
  overflow-y: auto;
}
.sb-pd-item {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid var(--chat-border, #2c3a33);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sb-pd-item:active {
  background: #1a3d32;
}
.sb-pd-up {
  color: var(--teal, #3fd0a4);
}
.sb-pd-empty {
  padding: 10px;
  color: var(--chat-muted, #9fb1a7);
}
.sb-pd-note {
  margin: 6px 0 0;
  color: var(--chat-muted, #9fb1a7);
  font-size: 0.72rem;
  line-height: 1.35;
}

.sb-pd-name,
.sb-pd-text {
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid var(--chat-border, #2c3a33);
  border-radius: 8px;
  background: #121915;
  color: inherit;
  font: inherit;
  font-size: 16px; /* 16px stops iPhone Safari zooming on focus */
}
.sb-pd-text {
  resize: vertical;
  min-height: 120px;
}

.sb-pd-offline p {
  margin: 0 0 8px;
}

/* Desktop dialog: which folders the phone may use */
.sb-pd-dlg {
  width: min(560px, 92vw);
  border: 1px solid var(--chat-border, #2c3a33);
  border-radius: 12px;
  background: var(--chat-surface, #18211d);
  color: var(--chat-text, #e8efe9);
  padding: 14px 16px;
}
.sb-pd-dlg::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.sb-pd-reach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--chat-border, #2c3a33);
  word-break: break-all;
}

/* Phone: hide desktop-only controls (Path-A pills need Little Helper on this device) */
body.sb-phone #chatViewBarMid .fs-op-pill:not(.fs-op-pill--cancel),
body.sb-phone #dutyPcPairPanel,
body.sb-phone .composer-append-hint,
body.sb-phone #hobbFsmHud .hobb-fsm-chip,
body.sb-phone #hobbLedCaption,
body.sb-phone .slogan-helper-hint {
  display: none !important;
}
