/* Channel About tab (/@channel?page=about) */
.et-cha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  font-family: var(--et-font);
  color: var(--et-text);
}
.et-cha__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.et-cha-card { min-width: 0; }
.et-cha__side { position: sticky; top: 76px; display: grid; gap: 16px; }

.et-cha-card {
  padding: 20px 22px;
  border: 1px solid var(--et-line);
  border-radius: 16px;
  background: var(--et-surface);
}
.et-cha-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.et-cha-card__head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 700 17px/1.3 var(--et-font);
  color: var(--et-text);
}
.et-cha-card__head h2 svg { color: var(--color-primary); flex: none; }
#html .et-cha .et-ch-btn--sm { height: 32px; padding: 0 13px; font-size: 13px; gap: 5px; }
.et-cha-empty { margin: 0; color: var(--et-muted); font-size: 14px; line-height: 1.6; }
.et-cha-note { margin: 8px 0 0; color: var(--et-muted); font-size: 12.5px; line-height: 1.5; }

/* Description */
.et-cha-desc__body { position: relative; max-height: 340px; overflow: hidden; font-size: 15px; line-height: 1.7; color: var(--et-text); overflow-wrap: anywhere; }
.et-cha-desc__body.is-open { max-height: none; }
.et-cha-desc__body:not(.is-open)::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  background: linear-gradient(to bottom, transparent, var(--et-surface));
  pointer-events: none;
}
.et-cha-desc__body p { margin: 0 0 12px; }
.et-cha-desc__body h4 { margin: 18px 0 8px; font: 700 15px/1.4 var(--et-font); color: var(--et-text); }
.et-cha-desc__body h4:first-child { margin-top: 0; }
.et-cha-desc__body ul,
.et-cha-desc__body ol { margin: 0 0 12px; padding-left: 22px; }
.et-cha-desc__body li { margin: 3px 0; }
.et-cha-desc__body ul li::marker { color: var(--color-primary); }
.et-cha-desc__body a { color: var(--color-primary); font-weight: 500; }
.et-cha-desc__body > :last-child { margin-bottom: 0; }
.et-cha-tag { white-space: nowrap; }
.et-cha-more {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-primary);
  font: 600 14px/1.4 var(--et-font);
  cursor: pointer;
}
.et-cha-more:hover { text-decoration: underline; }

/* Social accounts */
.et-cha-social {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.et-cha-social__item {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--et-line);
  border-radius: 14px;
  background: var(--et-surface);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.et-cha-social__item:hover { border-color: var(--et-brand); box-shadow: 0 8px 20px -10px var(--et-brand); transform: translateY(-1px); }
.et-cha-social__link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  color: var(--et-text);
  text-decoration: none;
}
.et-cha-social__link:hover,
.et-cha-social__link:focus { color: var(--et-text); text-decoration: none; }
.et-cha-social__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--et-brand);
  color: #fff;
}
.et-cha-social__item[style*="#FFFC00"] .et-cha-social__icon,
.et-cha-pending li[style*="#FFFC00"] .et-cha-social__icon { color: #111; }
.et-cha-social__text { display: grid; min-width: 0; }
.et-cha-social__text strong { font-size: 14px; font-weight: 700; line-height: 1.3; }
.et-cha-social__text small { overflow: hidden; color: var(--et-muted); font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.et-cha-social__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--et-muted);
  cursor: pointer;
}
.et-cha-social__remove:hover { background: rgba(239, 68, 68, .1); color: #EF4444; }

/* Forms */
.et-cha-form {
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed rgba(99, 102, 241, .45);
  border-radius: 14px;
  background: var(--et-accent-soft);
}
.et-cha-form[hidden] { display: none; }
.et-cha-form__row { display: flex; gap: 12px; }
.et-cha-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.et-cha-field { display: grid; gap: 6px; margin: 0; font-weight: 400; }
.et-cha-field > span { font-size: 12.5px; font-weight: 700; color: var(--et-text-secondary, var(--et-text)); }
.et-cha-field--net { flex: 0 0 210px; }
.et-cha-field--grow { flex: 1 1 auto; }
#html .et-cha-field .form-control {
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--et-line);
  border-radius: 10px;
  background: var(--et-surface);
  color: var(--et-text);
  font-size: 14px;
  box-shadow: none;
}
#html .et-cha-field .form-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, .16); }
.et-cha-form__foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.et-cha-msg { margin-right: auto; color: var(--et-muted); font-size: 13px; }
.et-cha-msg.is-error { color: #DC2626; font-weight: 600; }

/* Pending suggestions */
.et-cha-pending { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--et-line); }
.et-cha-pending h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 14px/1.3 var(--et-font); color: var(--et-text); }
.et-cha-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--color-secondary); color: #fff; font-size: 12px; }
.et-cha-pending ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.et-cha-pending li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--et-bg); }
.et-cha-pending .et-cha-social__icon { width: 34px; height: 34px; border-radius: 10px; }
.et-cha-pending__text { display: grid; flex: 1 1 auto; min-width: 0; }
.et-cha-pending__text a { color: var(--et-text); font-size: 14px; font-weight: 700; }
.et-cha-pending__text small { overflow: hidden; color: var(--et-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.et-cha-pending__act { display: flex; gap: 6px; flex: none; }

/* Channel details */
.et-cha-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.et-cha-stats li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--et-bg); }
.et-cha-stats__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--et-accent-soft); color: var(--color-primary); }
.et-cha-stats li > span:last-child { display: grid; min-width: 0; }
.et-cha-stats small { color: var(--et-muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.et-cha-stats strong { overflow: hidden; font-size: 16px; font-weight: 800; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.et-cha-stats strong small { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.et-cha-url {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--et-line);
  border-radius: 999px;
}
.et-cha-url__text { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--et-muted); font-size: 14px; }
.et-cha-url__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.et-cha-url__text svg { flex: none; color: var(--color-primary); }

/* Categories */
.et-cha-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.et-cha-cats a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--et-line);
  border-radius: 999px;
  color: var(--et-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s, color .2s, background-color .2s;
}
.et-cha-cats a:hover { border-color: var(--color-primary); background: var(--et-accent-soft); color: var(--color-primary); text-decoration: none; }
.et-cha-cats b { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: var(--et-bg); color: var(--et-muted); font-size: 12px; text-align: center; }

/* Contact */
.et-cha-dl { display: grid; gap: 2px; margin: 0; }
.et-cha-dl > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--et-line); }
.et-cha-dl > div:last-child { border-bottom: 0; }
.et-cha-dl dt { display: flex; align-items: center; gap: 8px; color: var(--et-muted); font-size: 13.5px; font-weight: 600; }
.et-cha-dl dt svg { color: var(--color-primary); }
.et-cha-dl dd { margin: 0; overflow-wrap: anywhere; font-size: 14.5px; font-weight: 600; }
.et-cha-dl dd a { color: var(--color-primary); }
.et-cha-reveal { padding: 0; border: 0; background: none; color: var(--color-primary); font: 600 14px/1.4 var(--et-font); cursor: pointer; }
.et-cha-reveal:hover { text-decoration: underline; }
#html .et-cha-contact__msg { margin-top: 14px; }

/* More info (custom profile fields) */
.et-cha-more-info h5 { margin: 0 0 6px; font-size: 14px; }

/* 300x250 ad */
.et-cha-ad { width: 300px; max-width: 100%; }
.et-cha-ad__label { display: block; margin-bottom: 6px; color: var(--et-muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.et-cha-ad .et-ad-slot { margin: 0; }

/* Night mode */
html.et-night .et-cha-card,
html.et-night .et-cha-social__item { background: var(--gray-800); border-color: var(--gray-700); }
html.et-night .et-cha-desc__body:not(.is-open)::after { background: linear-gradient(to bottom, transparent, var(--gray-800)); }
html.et-night .et-cha-stats li,
html.et-night .et-cha-pending li,
html.et-night .et-cha-cats b { background: var(--gray-900); }
html.et-night .et-cha-stats__icon { background: rgba(99, 102, 241, .18); color: #A5B4FC; }
html.et-night .et-cha-form { background: rgba(99, 102, 241, .08); }
html.et-night#html .et-cha-field .form-control { background: var(--gray-900); border-color: var(--gray-700); color: var(--gray-50); }
html.et-night .et-cha-url,
html.et-night .et-cha-cats a,
html.et-night .et-cha-dl > div { border-color: var(--gray-700); }

/* Responsive */
@media (max-width: 991px) {
  .et-cha { grid-template-columns: minmax(0, 1fr); }
  .et-cha__side { position: static; justify-items: center; }
}
@media (max-width: 600px) {
  .et-cha-card { padding: 16px; border-radius: 14px; }
  .et-cha-card__head { flex-wrap: wrap; }
  .et-cha-form__row,
  .et-cha-form__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
  .et-cha-field--net { flex: none; }
  .et-cha-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .et-cha-stats li { flex-direction: column; align-items: flex-start; gap: 8px; }
  .et-cha-dl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .et-cha-pending li { flex-wrap: wrap; }
  .et-cha-pending__act { width: 100%; }
}
