/* Settings › Tools › Inbox › Channels — scoped to #channels-settings / .channels-main */

#channels-settings.channels-main,
.channels-main {
  min-width: 0;
  padding-bottom: 76px;
  color: var(--text);
}

.channels-main .set-head {
  margin-bottom: 8px;
}

.channels-main .channels-page__head .set-head__title {
  font-size: 22px;
  font-weight: 500;
}

.channels-section {
  margin: 0 0 36px;
}

.channels-section__heading {
  margin-bottom: 18px;
  max-width: 720px;
}

.channels-section__heading h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.channels-section__heading p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.channels-grid {
  display: grid;
  gap: 20px;
  max-width: 640px;
}

.channels-grid--web,
.channels-grid--team {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 220px;
  padding: 22px 16px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
}

.channel-card__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.channel-card__link:hover h3 {
  color: var(--brand-ink);
}

.channel-card__link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 8px;
}

.channel-card__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--brand-ink);
}

.channel-card__icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.channel-card h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.channel-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}

.channel-connect-btn:hover {
  text-decoration: underline;
}

.channel-connect-btn--wide {
  max-width: 100%;
  text-align: center;
  line-height: 1.35;
}

.channel-email-count {
  margin-top: auto;
  font-size: 12px;
}

.channel-email-count__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

.channel-email-count__link:hover {
  text-decoration: underline;
}

.channel-card__status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 650;
  color: var(--success, #027a48);
}

.channel-card__status:empty {
  margin: 0;
  min-height: 0;
}

.channels-migration {
  max-width: 720px;
  margin-top: 8px;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
}

.channels-migration h2 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.channels-migration > p {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.channels-migration__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.channel-outline-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.channel-outline-action:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong, var(--border));
}

.channel-outline-action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
}

.channels-migration__feedback {
  min-height: 18px;
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.channels-migration__feedback:empty {
  margin: 0;
  min-height: 0;
}

@media (max-width: 640px) {
  .channels-grid--web,
  .channels-grid--team {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .channels-migration__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .channel-outline-action {
    justify-content: center;
  }
}

/* a channel that cannot be connected yet says so */
.channel-connect-btn:disabled { opacity: .55; cursor: not-allowed; }
.channel-card__why { margin: 8px 12px 0; color: var(--text-muted); font-size: 12.5px; line-height: 1.45; text-align: center; }
/* moving channels to a help desk is not possible yet, and the section says so */
.channel-outline-action:disabled,
.channel-outline-action:disabled:hover { background: var(--surface); opacity: .55; cursor: not-allowed; }
.channels-migration > p.channels-migration__why { margin: 10px 0 0; }
