/* EO Planet shared components (ATF 2): buttons, chips, inputs, tabs. Tokens only. */

/* ---- Button ----
   One button for the whole site. Size: --sm 36 / (md) 42 / --lg 48. Variant:
   --primary  Neon fill, black ink (one per view)      hover: Air White fill, black ink
   --secondary gray-3 fill, halo ink                   hover: gray-2 fill
   --outline  Medium Gray edge, halo ink               hover: halo edge, gray-4 fill
   --ghost    no edge, gray-2-light ink                hover: gray-4 fill, halo ink
   Each variant sets its own background on every state, so Bootstrap's .btn:hover cannot clear it. */
html body .eo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--stack-s);
  height: var(--ctl-md);
  padding: 0 var(--sp-3);
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  font-size: var(--fs-label);
  line-height: var(--lh-label);
  font-weight: var(--fw-medium);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background-color: transparent;
  color: var(--eo-text);
}
html body .eo-btn--sm { height: var(--ctl-sm); padding: 0 var(--sp-2); }
html body .eo-btn--lg { height: var(--ctl-lg); padding: 0 var(--sp-4); font-size: var(--fs-body); line-height: var(--lh-label); }
html body .eo-btn--block { display: flex; width: 100%; }
html body .eo-btn svg,
html body .eo-btn img { flex: none; }

html body .eo-btn--primary,
html body .eo-btn--primary:hover,
html body .eo-btn--primary:focus,
html body .eo-btn--primary:active {
  background-color: var(--eo-neon);
  border-color: var(--eo-neon);
  color: var(--eo-black);
}
html body .eo-btn--secondary,
html body .eo-btn--secondary:hover,
html body .eo-btn--secondary:focus {
  background-color: var(--eo-gray-3-dark);
  border-color: var(--eo-gray-3-dark);
  color: var(--eo-halo);
}
html body .eo-btn--outline,
html body .eo-btn--outline:hover,
html body .eo-btn--outline:focus {
  background-color: transparent;
  border-color: var(--eo-border-control);
  color: var(--eo-text);
}
html body .eo-btn--ghost,
html body .eo-btn--ghost:hover,
html body .eo-btn--ghost:focus {
  background-color: transparent;
  border-color: transparent;
  color: var(--eo-text-2);
}
html body .eo-btn:disabled,
html body .eo-btn.disabled,
html body .btn:disabled,
html body .btn.disabled {
  background-color: var(--eo-surface-2);
  border-color: var(--eo-surface-2);
  color: var(--eo-text-3);
  border-radius: var(--radius-m);
  opacity: 1;
  filter: none;
  transform: none;
  cursor: not-allowed;
}

/* ---- Follow toggle ----
   .eo-follow (with .eo-btn .eo-btn--sm): "팔로우" = Neon fill, black ink.
   .is-following: "팔로잉" + check, both Neon, on a Neon edge (no fill). */
html body .eo-follow,
html body .eo-follow:hover,
html body .eo-follow:focus {
  background-color: var(--eo-neon);
  border-color: var(--eo-neon);
  color: var(--eo-black);
}
html body .eo-follow.is-following,
html body .eo-follow.is-following:hover,
html body .eo-follow.is-following:focus {
  background-color: transparent;
  border-color: var(--eo-neon);
  color: var(--eo-neon);
}
html body .eo-follow.is-following::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5L6 12L13.5 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5L6 12L13.5 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- Like / vote toggle ----
   .eo-like (with .eo-btn .eo-btn--sm): Neon edge, Neon icon and count.
   .is-liked / .active: Neon fill, black icon and count. Icons inherit currentColor. */
html body .eo-like,
html body .eo-like:hover,
html body .eo-like:focus {
  background-color: transparent;
  border-color: var(--eo-neon);
  color: var(--eo-neon);
}
html body .eo-like.is-liked,
html body .eo-like.active,
html body .eo-like.is-liked:hover,
html body .eo-like.active:hover {
  background-color: var(--eo-neon);
  border-color: var(--eo-neon);
  color: var(--eo-black);
}
html body .eo-like svg path[stroke]:not([stroke="none"]) { stroke: currentColor; }
html body .eo-like svg path[fill]:not([fill="none"]) { fill: currentColor; }

/* ---- Icon button: 36 square (12 radius), --round for avatars so ring and hit area are circles ---- */
html body .eo-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ctl-sm);
  height: var(--ctl-sm);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  background-color: var(--eo-gray-3-dark);
  color: var(--eo-halo);
  cursor: pointer;
}
html body .eo-icon-btn--round { border: 0; border-radius: var(--radius-pill); background-color: transparent; }
html body .eo-icon-btn--round > img,
html body .eo-icon-btn--round > .eo-avatar { width: 100%; height: 100%; margin: 0; }

/* ---- Avatar ---- */
html body .eo-avatar {
  display: inline-block;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  object-fit: cover;
  background-color: var(--eo-gray-3-dark);
}
html body .eo-avatar--s { width: 24px; height: 24px; }
html body .eo-avatar--l { width: 48px; height: 48px; }
html body .eo-avatar--xl { width: 80px; height: 80px; }

/* ---- Badge: 24 tall pill, black ink on brand fills ---- */
html body .eo-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--sp-2);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  background-color: var(--eo-gray-3-dark);
  color: var(--eo-halo);
}
html body .eo-badge--online { background-color: var(--eo-blue); color: var(--eo-black); }
html body .eo-badge--offline { background-color: var(--eo-green); color: var(--eo-black); }
html body .eo-badge--onoffline { background-color: var(--eo-gray-1-dark); color: var(--eo-black); }
html body .eo-badge--vod { background-color: var(--eo-halo); color: var(--eo-black); }
html body .eo-badge--accent { background-color: var(--eo-neon); color: var(--eo-black); }
html body .eo-badge--outline { background-color: transparent; border-color: var(--eo-border-control); color: var(--eo-text); }

/* ---- Card: gray-5 surface, equal inset on all four sides, stacked children use --stack-m ---- */
html body .eo-card {
  display: flex;
  flex-direction: column;
  gap: var(--stack-m);
  padding: var(--card-pad);
  border-radius: var(--radius-m);
  background-color: var(--eo-gray-5-dark);
  color: var(--eo-text);
}
html body .eo-card--compact { padding: var(--card-pad-s); }
html body a.eo-card,
html body .eo-card--link { cursor: pointer; text-decoration: none; }
html body .eo-card-list { display: flex; flex-direction: column; gap: var(--card-gap); }

/* ---- Menu (dropdowns): raised surface with a visible edge ---- */
html body .dropdown-menu,
html body .eo-menu {
  background-color: var(--eo-gray-3-dark);
  border: 1px solid var(--eo-gray-2-dark);
  border-radius: var(--radius-m);
  padding: var(--stack-s) 0;
  color: var(--eo-text);
}
html body .dropdown-menu .dropdown-item,
html body .eo-menu__item {
  padding: var(--card-pad-s) var(--card-pad);
  color: var(--eo-text);
}
html body .dropdown-menu .text-muted,
html body .eo-menu .eo-meta { color: var(--eo-text-on-raised) !important; }

/* ---- Count with a separator ("3 / 3"): the slash sits on the figures' optical center ---- */
html body .eo-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
html body .eo-count__sep { display: inline-block; margin: 0 0.15em; transform: translateY(-0.02em); }

/* ---- Chip ---- */
html body .eo-chip {
  height: var(--ctl-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-4);
  padding: 0 var(--sp-2);
  border: 1px solid var(--eo-border-control);
  border-radius: var(--radius-pill);
  background-color: var(--eo-surface-2);
  color: var(--eo-text);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: var(--fw-medium);
  cursor: pointer;
}
html body .eo-chip:not(.eo-chip--active):not(.active):hover {
  background-color: var(--eo-gray-4-dark);
  border-color: var(--eo-gray-1-dark);
}
html body .eo-chip--active,
html body .eo-chip.active,
html body .eo-chip--active:hover {
  background-color: var(--eo-neon);
  border-color: var(--eo-neon);
  color: var(--eo-black);
}
html body .eo-chip--active *,
html body .eo-chip.active * {
  color: inherit;
}
html body .eo-chip:disabled,
html body .eo-chip.disabled {
  background-color: var(--eo-surface-2);
  border-color: var(--eo-surface-2);
  color: var(--eo-text-3);
  cursor: not-allowed;
}

/* ---- Input ---- */
html body .eo-input,
html body .form-control,
html body .search-form .search {
  background-color: var(--eo-surface-2);
  color: var(--eo-text);
  border: 1px solid var(--eo-border-control);
  border-radius: var(--radius-m);
  font-size: var(--fs-body-s);
  line-height: var(--lh-body-s);
}
html body .search-form .search {
  border: 0;
  border-radius: 0;
  background-color: transparent;
}
html body .eo-input:focus,
html body .form-control:focus {
  border-color: var(--eo-neon);
  background-color: var(--eo-surface-2);
  color: var(--eo-text);
  box-shadow: none;
}
html body .eo-input::placeholder,
html body .search-form .search::placeholder,
html body .form-control::placeholder,
html body textarea::placeholder {
  color: var(--eo-text-3);
  opacity: 1;
}
html body .eo-input:disabled,
html body .form-control:disabled {
  background-color: var(--eo-surface-2);
  border-color: var(--eo-surface-2);
  color: var(--eo-text-3);
}

/* ---- Tab (profile / feed tabs) ---- */
html body .eo-tab {
  color: var(--eo-text-2);
  font-weight: var(--fw-medium);
  border-bottom: 2px solid transparent;
}
html body .eo-tab.active {
  color: var(--eo-text);
  border-bottom-color: var(--eo-neon);
}

/* ---- Comment rows: aligned tool row, even rhythm ---- */
html body .comment-tool {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: var(--gap-8);
  margin-top: var(--sp-1);
}
html body .comment-tool > div,
html body .comment-tool form {
  margin: 0;
}
html body .comment-tool a:not(.eo-btn) {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-4);
  padding: var(--sp-0) var(--sp-1);
  margin: 0;
  border-radius: var(--radius-m);
  color: var(--eo-text-2);
}
html body .list-group-item .comment-profile-container { margin-bottom: var(--sp-1); }
html body .category-select .eo-chip.active,
html body .category-select .eo-chip.active:hover {
  background-color: var(--eo-neon);
  border-color: var(--eo-neon);
  color: var(--eo-black);
}
html body .comment-tool .reply-container {
  flex: 0 0 auto;
  margin-left: 0;
}
html body .comment-tool .like-btn-group,
html body .comment-tool .like-btn-group > div {
  width: auto;
  flex: 0 0 auto;
}

/* Follow button radius follows the component radius */
html body .follow-btn { border-radius: var(--radius-m); }

/* Mobile nav toggle is a button: shared button radius */
html body .navbar-toggler { border-radius: var(--radius-m); }
