/* Business branding, team invitation status and the invitation welcome page (team.js). */

/* ---------- Branding panel ---------- */
.branding-panel {
  margin-top: 18px;
}
.branding-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
}
.branding-controls {
  display: grid;
  gap: 12px;
  align-content: start;
}
.logo-drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 18px;
  border: 1.5px dashed #cfc8f7;
  border-radius: 16px;
  background: #fbfaff;
  color: #3d4160;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 200ms, background-color 200ms, transform 200ms var(--ease-out, ease);
}
.logo-drop:hover,
.logo-drop.dragging {
  border-color: #8f80ea;
  background: #f4f1ff;
}
.logo-drop.dragging {
  transform: scale(1.01);
}
.logo-drop.busy {
  opacity: 0.6;
  pointer-events: none;
}
.logo-drop img {
  max-width: 200px;
  max-height: 64px;
  object-fit: contain;
  margin-bottom: 4px;
}
.logo-drop-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(150deg, #efeaff, #e2dbff);
  color: #5843ce;
}
.logo-drop strong {
  font-size: 14px;
}
.logo-drop small {
  max-width: 300px;
  font-size: 12px;
  line-height: 1.5;
  color: #8a8ea8;
}
#logo-remove {
  justify-self: start;
}
.accent-picker {
  display: grid;
  gap: 8px;
}
.accent-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.accent-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--swatch, #5843ce);
  box-shadow: 0 0 0 1px #dcdcec;
  cursor: pointer;
  transition: transform 180ms var(--ease-spring, ease), box-shadow 200ms;
}
.accent-swatch:hover {
  transform: scale(1.1);
}
.accent-swatch[aria-checked="true"] {
  box-shadow: 0 0 0 2px var(--swatch, #5843ce), 0 4px 10px #1b1a4a26;
  transform: scale(1.08);
}
.accent-custom {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px dashed #c4c3e2;
  color: #5b5f7a;
  cursor: pointer;
}
.accent-custom .icon {
  width: 15px;
  height: 15px;
}
.accent-custom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  min-height: 0;
}

/* Live email header preview (accent via --brand) */
.email-preview {
  --brand: #5843ce;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
  border-radius: 16px;
  background: #f5f5f8;
}
.email-preview > small {
  text-align: center;
  font-size: 11px;
  color: #8a8ea8;
}
.email-card {
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  border-top: 4px solid var(--brand);
  box-shadow: 0 6px 20px #1b1a4a14;
  transition: border-color 300ms;
}
.email-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
}
.email-head img {
  max-height: 28px;
  max-width: 120px;
  object-fit: contain;
}
.email-head span {
  font-weight: 600;
  color: #5b5f7a;
}
.email-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
  color: #14172b;
}
.email-copy {
  margin: 0 0 14px;
  font-size: 12px;
  color: #5b5f7a;
}
.email-cta {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 300ms;
}
.email-foot {
  margin: 14px 0 0;
  font-size: 10px;
  color: #a6a9c2;
}

/* ---------- Team status ---------- */
.team-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.team-status .icon {
  width: 12px;
  height: 12px;
}
.team-status.joined {
  background: #1fbf6a1a;
  color: #128a4b;
}
.team-status.invited {
  background: #f1eefe;
  color: #4a35c0;
}
.team-status.pending {
  background: #f1f1f8;
  color: #5b5f7a;
}
.team-status.expired {
  background: #fff4e5;
  color: #b45309;
}
.team-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.team-actions .button > .icon {
  width: 14px;
  height: 14px;
}

/* ---------- Copyable invitation link ---------- */
.invite-link {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.invite-link input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.invite-link .button {
  white-space: nowrap;
}

/* ---------- Invitation welcome (signed-out) ---------- */
.invite-welcome {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0 0 18px;
  text-align: center;
  animation: rise-in 420ms var(--ease-out, ease) both;
}
.invite-logo {
  max-width: 200px;
  max-height: 64px;
  object-fit: contain;
  margin-bottom: 6px;
}
.invite-monogram {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(150deg, #7a63e8, #4a35c0);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  box-shadow: 0 8px 20px #5843ce40;
}
.invite-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #5843ce;
}
.invite-welcome h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.3px;
}
.invite-welcome p {
  margin: 0;
  max-width: 360px;
  font-size: 14px;
  line-height: 1.55;
  color: #5b5f7a;
}

@media (max-width: 800px) {
  .branding-body {
    grid-template-columns: 1fr;
  }
}

/* Business logo in the sidebar workspace picker */
.workspace-letter.has-logo {
  background: #fff;
  padding: 3px;
  overflow: hidden;
}
.workspace-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Settings page layout ---------- */
.settings-chips {
  position: sticky;
  top: 72px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -4px 0 18px;
  padding: 6px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: #ffffffd9;
  border: 1px solid #e3e4f1;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px #1b1a4a0f;
}
.settings-chips button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #5b5f7a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 200ms, color 200ms;
}
.settings-chips button:hover {
  background: #f1eefe;
  color: #4a35c0;
}
.settings-section {
  scroll-margin-top: 130px;
  margin-bottom: 18px;
}
.settings-section > .panel,
.settings-section > section {
  margin-top: 0;
}
.system-status {
  border: 1px solid #e3e4f1;
  border-radius: 14px;
  background: #fcfcff;
  overflow: hidden;
}
.system-status > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}
.system-status > summary::-webkit-details-marker {
  display: none;
}
.system-status-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  color: #14172b;
}
.system-status-title .icon {
  width: 18px;
  height: 18px;
  color: #5843ce;
}
.system-status > summary small {
  font-size: 12px;
  color: #8a8ea8;
}
.system-status > summary > .icon:last-child {
  margin-left: auto;
  width: 14px;
  height: 14px;
  color: #8a8ea8;
  transition: transform 260ms var(--ease-spring, ease);
}
.system-status[open] > summary > .icon:last-child {
  transform: rotate(180deg);
}
.system-status[open] > summary {
  border-bottom: 1px solid #efeff7;
}
.system-status > :not(summary) {
  margin-left: 18px;
  margin-right: 18px;
}
.system-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 18px 14px;
}
.system-status-head p {
  margin: 0;
  font-size: 13px;
  color: #5b5f7a;
}
@media (max-width: 700px) {
  .settings-chips {
    top: 64px;
    border-radius: 14px;
  }
  .system-status > summary small {
    display: none;
  }
}

/* Phones: quick links become one swipeable row, not a floating box */
@media (max-width: 700px) {
  .settings-chips {
    position: static;
    flex-wrap: nowrap;
    width: auto;
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: 999px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .settings-chips::-webkit-scrollbar {
    display: none;
  }
  .settings-chips button {
    flex: none;
  }
}
