/* ======================================================
   POPSHOP™ CONTACT IMPORTER — STYLES
   File: shop/contact-importer.css
   Pass: PASS 10 — PS-4011
====================================================== */

/* ── Shell ─────────────────────────────────────────── */
.psci-importer {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 320px;
  max-height: 70vh;
}

/* ── Search row ─────────────────────────────────────── */
.psci-search-row { padding: 8px 0 4px; }
.psci-search {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.psci-search:focus { border-color: var(--ps-primary, #7c3aed); }

/* ── Group chips ─────────────────────────────────────── */
.psci-groups {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  padding: 6px 0 8px;
  scrollbar-width: none;
}
.psci-groups::-webkit-scrollbar { display: none; }

.psci-group-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid #ddd;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  color: #555;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.psci-group-btn.active,
.psci-group-btn:hover {
  background: var(--ps-primary, #7c3aed);
  border-color: var(--ps-primary, #7c3aed);
  color: #fff;
}

/* ── Contact list ────────────────────────────────────── */
.psci-list-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.psci-list { display: flex; flex-direction: column; }

.psci-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 6px;
}
.psci-contact-row:hover  { background: #f9f6ff; }
.psci-contact-row.selected { background: #f0ebff; }

.psci-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ps-primary, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.psci-contact-info { flex: 1; min-width: 0; }
.psci-contact-name {
  font-size: 14px;
  font-weight: 500;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.psci-contact-sub {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.psci-check-wrap { flex-shrink: 0; width: 22px; text-align: center; }
.psci-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  font-size: 12px;
  color: #fff;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.psci-contact-row.selected .psci-check {
  background: var(--ps-primary, #7c3aed);
  border-color: var(--ps-primary, #7c3aed);
}

/* ── Empty state ─────────────────────────────────────── */
.psci-empty {
  padding: 24px 12px;
  text-align: center;
  color: #aaa;
  font-size: 13px;
}

/* ── Footer ──────────────────────────────────────────── */
.psci-footer {
  padding: 10px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.psci-manual-entry {
  display: flex;
  gap: 6px;
  align-items: center;
}
.psci-input-sm {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 13px;
  outline: none;
}
.psci-input-sm:focus { border-color: var(--ps-primary, #7c3aed); }

.psci-btn-sm {
  padding: 7px 14px;
  border-radius: 7px;
  background: #f0ebff;
  border: none;
  color: var(--ps-primary, #7c3aed);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.psci-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Buttons ─────────────────────────────────────────── */
.psci-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, background 0.15s;
}
.psci-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.psci-btn.primary {
  background: var(--ps-primary, #7c3aed);
  color: #fff;
}
.psci-btn.secondary {
  background: #f0ebff;
  color: var(--ps-primary, #7c3aed);
}
.psci-btn.text {
  background: transparent;
  color: #888;
}

/* ── Denied state ────────────────────────────────────── */
.psci-denied {
  text-align: center;
  padding: 16px 8px 8px;
}
.psci-denied-icon { font-size: 36px; margin-bottom: 10px; }
.psci-denied-msg  { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.psci-denied-hint { font-size: 13px; color: #777; margin: 0 0 16px; }
.psci-denied-actions { display: flex; gap: 10px; justify-content: center; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  .psci-importer { max-height: 80vh; }
  .psci-actions  { flex-direction: column; }
  .psci-btn      { width: 100%; text-align: center; }
}
