/* Connected apps screen — styles for app/os/connected-apps.js.
   Reuses the color/spacing tokens defined on :root in app/css/member.css (--bg, --panel,
   --ink, --dim, --rule, --accent, --pill, --radius) rather than redefining them. Phone-first
   at 390px; every tap target is at least 44px tall. */

.oe-ca-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem 0.25rem;
}
.oe-ca-back {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--pill, 999px);
  border: 1px solid var(--rule, #f4f4f714);
  background: var(--panel, #131319);
  color: var(--ink, #f4f4f7);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.oe-ca-header h2 {
  flex: 1;
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink, #f4f4f7);
}
.oe-ca-pill {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--pill, 999px);
  background: var(--panel-2, #1a1a22);
  border: 1px solid var(--rule, #f4f4f714);
  color: var(--dim, #9a9aa8);
  font-size: 0.75rem;
  white-space: nowrap;
}
.oe-ca-pill-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  border-radius: 4px;
  overflow: hidden;
  margin-right: -0.35rem;
}
.oe-ca-pill-icon svg { width: 100%; height: 100%; display: block; }

.oe-ca-search { padding: 0.5rem 1rem 0.75rem; }
.oe-ca-search-input {
  width: 100%;
  height: 44px;
  box-sizing: border-box;
  padding: 0 0.9rem;
  border-radius: var(--radius, 1.25rem);
  border: 1px solid var(--rule, #f4f4f714);
  background: var(--panel, #131319);
  color: var(--ink, #f4f4f7);
  font-size: 0.95rem;
}
.oe-ca-search-input::placeholder { color: var(--dim, #9a9aa8); }

.oe-ca-body { padding: 0 1rem 2rem; }

.oe-ca-section { margin-bottom: 1.25rem; }
.oe-ca-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.oe-ca-section-head h3 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dim, #9a9aa8);
}
.oe-ca-viewall {
  background: none;
  border: none;
  color: var(--accent, #8b7cff);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.4rem;
}

.oe-ca-list { display: flex; flex-direction: column; gap: 0.5rem; }

.oe-ca-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: var(--radius, 1.25rem);
  background: var(--panel, #131319);
  border: 1px solid var(--rule, #f4f4f714);
}
.oe-ca-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.oe-ca-icon svg { width: 100%; height: 100%; display: block; }

.oe-ca-main { flex: 1; min-width: 0; }
.oe-ca-name {
  color: var(--ink, #f4f4f7);
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oe-ca-line {
  color: var(--dim, #9a9aa8);
  font-size: 0.8rem;
  margin-top: 0.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oe-ca-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.oe-ca-chip {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--pill, 999px);
  background: var(--panel-2, #1a1a22);
  border: 1px solid var(--rule, #f4f4f714);
  color: var(--dim, #9a9aa8);
}
.oe-ca-chip--ok { color: #8ee0c0; border-color: #3ddc9744; }

.oe-ca-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.9rem;
  border-radius: var(--pill, 999px);
  border: 1px solid var(--rule, #f4f4f714);
  background: var(--panel-2, #1a1a22);
  color: var(--ink, #f4f4f7);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.oe-ca-btn--connect,
.oe-ca-btn--add-on-mac {
  background: var(--accent, #8b7cff);
  border-color: var(--accent, #8b7cff);
  color: var(--on-accent, #f6f4ff);
}
.oe-ca-btn--added { color: #8ee0c0; border-color: #3ddc9744; background: #162323; }
.oe-ca-btn--pair-first { color: #f0e0c4; border-color: #e8c48a44; background: #242122; }
.oe-ca-btn--soon { color: var(--dim, #9a9aa8); cursor: default; opacity: 0.7; }

.oe-ca-empty { padding: 1rem 0; color: var(--dim, #9a9aa8); font-size: 0.85rem; }
.oe-ca-empty strong { display: block; font-size: 1rem; color: var(--ink, #f4f4f7); }
.oe-ca-empty p { margin: 0.35rem 0 0.6rem; }

@media (max-width: 420px) {
  .oe-ca-header h2 { font-size: 1rem; }
  .oe-ca-pill span:last-child { display: none; }
}
