/* My profile, and the agent's copy of the config tabs. */

/* icon() emits an SVG with no width or height and there is a global
   `svg { width:16px; height:16px }` default. Anything below that draws an icon
   at a different size sets it explicitly. */

/* ---- Avatar with a picture ---- */
/* .avatar is a flex circle sized in styles.css. The image fills it and is
   cropped rather than squashed, because a headshot squashed to a circle looks
   like a mistake. */
.avatar.has-photo {
  overflow: hidden;
  background: var(--border);
  padding: 0;
}
.avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Profile form ---- */
.profile-card { max-width: 720px; }

.profile-photo-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
/* Grid children default to min-width:auto, so a long CRM address pushes the
   next column off the card instead of wrapping. */
.profile-card .form-grid .field { min-width: 0; }
.profile-card .form-grid .field input,
.profile-card .form-grid .field textarea { min-width: 0; overflow-wrap: anywhere; }
.profile-card .field .muted.small { margin-top: 4px; line-height: 1.45; }

.check-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
}

.wide-select {
  margin-top: 10px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  min-width: 260px;
  max-width: 100%;
}

/* A hover note next to a label. The bubble itself is .tip-pop in app.css,
   appended to <body> so a modal cannot clip it; this is just the "?" itself. */
.tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
}
.tip:hover, .tip:focus { background: #dbeafe; color: #1d4ed8; outline: none; }

/* ---- Voicemail ---- */
.vm-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.vm-row svg { width: 14px; height: 14px; }

/* ---- Scope banners on the shared config tabs ---- */
.cfg-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 13px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.5;
}
.cfg-banner.office {
  border-color: var(--border);
  background: var(--bg);
  color: var(--muted);
}
.cfg-banner .btn { margin-left: auto; }

/* The Settings tab strip is long once an agent has all ten config tabs, so it
   wraps rather than scrolling sideways off the card. */
.settings-tabs { flex-wrap: wrap; row-gap: 6px; }

/* ---- Email notification switches ---- */

.notif-master {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  margin-bottom: 6px;
}
.notif-master.on { border-color: #fbbf24; background: #fffbeb; }
.notif-master input { margin-top: 3px; flex: none; }
.notif-master > div { min-width: 0; }

.notif-list { transition: opacity .14s; }
/* Dimmed rather than removed while the master is on, so it is obvious the
   individual choices are still there and will come back. */
.notif-list.dimmed { opacity: .42; pointer-events: none; }

.notif-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}
.notif-row:last-child { border-bottom: none; }
.notif-text { min-width: 0; overflow-wrap: anywhere; }
.notif-text .muted.small { line-height: 1.45; margin-top: 2px; }

/* A real switch rather than a checkbox: the row is a preference, not a
   selection, and a track that slides says which way is on without a label. */
.notif-switch { position: relative; flex: none; width: 38px; height: 21px; cursor: pointer; margin-top: 2px; }
.notif-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.notif-switch span {
  position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1;
  transition: background .14s; pointer-events: none;
}
.notif-switch span::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #fff; transition: transform .14s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .35);
}
.notif-switch input:checked + span { background: var(--green); }
.notif-switch input:checked + span::after { transform: translateX(17px); }
.notif-switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.notif-hour { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 7px; font-size: 12.5px; }
.notif-hour select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 7px; }

/* ---- Batch photo import ---- */
.pi-table {
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pi-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
}
.pi-row:last-child { border-bottom: 0; }
.pi-row > div { min-width: 0; }
.pi-pick {
  flex: none;
  max-width: 220px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .pi-row { flex-wrap: wrap; }
  .pi-pick { max-width: 100%; width: 100%; }
  .profile-photo-row { flex-wrap: wrap; }
}

/* ---- Account setup checklist ----
   Top of My profile until it is finished, then one quiet line. Green is
   "the CRM can see this is done"; a tick is somebody saying so. */

.setup-card { margin-bottom: 14px; }
.setup-card.done .card-body { padding: 12px 16px; }
.setup-done-row { display: flex; gap: 11px; align-items: center; }
.setup-done-row svg { width: 20px; height: 20px; color: #059669; flex: none; }

.setup-bar {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 12px;
}
.setup-bar span { display: block; height: 100%; background: #059669; transition: width .2s; }

.setup-list { display: grid; gap: 2px; }
.setup-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 9px;
  min-width: 0;
}
.setup-item:hover { background: var(--bg); }
.setup-tick {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e2e8f0; color: var(--muted);
  font-size: 11.5px; font-weight: 700;
}
.setup-tick svg { width: 13px; height: 13px; }
.setup-item.done .setup-tick { background: #d1fae5; color: #065f46; }
.setup-go {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}
.setup-go:hover { color: var(--blue); text-decoration: underline; }
.setup-item.done .setup-go { color: var(--muted); font-weight: 500; }
.setup-go .tag.good { background: #d1fae5; color: #065f46; }
.setup-mark { flex: none; display: flex; gap: 5px; align-items: center; cursor: pointer; }

@media (max-width: 720px) {
  .setup-item { flex-wrap: wrap; }
  .setup-mark { margin-left: 32px; }
}
