/* ─── Mastodon Feed – v0.0.0.3 ───────────────────────────────────────────── */

.ansico-mastodon-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid rgba(15, 20, 25, 0.14);
  border-radius: 14px;
  overflow: hidden;
}

/* ── Posts ──────────────────────────────────────────────────────────────── */

.ansico-mastodon-feed__item {
  position: relative;
  margin: 0;
  background: #fff;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.ansico-mastodon-feed__item + .ansico-mastodon-feed__item {
  border-top: 1px solid rgba(15, 20, 25, 0.1);
}

.ansico-mastodon-feed__item:hover {
  background: #f7f9fa;
}

.ansico-mastodon-feed__link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  outline-offset: -2px;
}

.ansico-mastodon-feed__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  position: relative;
  pointer-events: none;
}

.ansico-mastodon-feed__content a,
.ansico-mastodon-feed__avatar {
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.ansico-mastodon-feed__avatar-wrap {
  flex: 0 0 38px;
}

.ansico-mastodon-feed__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: #e8edf2;
}

.ansico-mastodon-feed__avatar--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6364ff 0%, #1d9bf0 100%);
}

.ansico-mastodon-feed__body {
  flex: 1 1 auto;
  min-width: 0;
}

.ansico-mastodon-feed__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.ansico-mastodon-feed__identity {
  min-width: 0;
  flex: 1 1 auto;
}

.ansico-mastodon-feed__name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f1419;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.ansico-mastodon-feed__username {
  display: block;
  font-size: 13px;
  color: #536471;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.ansico-mastodon-feed__date {
  font-size: 13px;
  color: #536471;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
  padding-top: 1px;
}

.ansico-mastodon-feed__content {
  color: #0f1419;
  font-size: 14px;
  line-height: 1.5;
}

.ansico-mastodon-feed__content p {
  margin: 0 !important;
  padding: 0 !important;
}

.ansico-mastodon-feed__content a {
  color: inherit;
  text-decoration: none;
}

.ansico-mastodon-feed__content a:hover {
  text-decoration: underline;
}

.ansico-mastodon-feed__content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-top: 8px;
  display: block;
  border: 1px solid rgba(15, 20, 25, 0.08);
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

/* ── Profile header ─────────────────────────────────────────────────────── */

.ansico-mastodon-feed__profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid rgba(15, 20, 25, 0.1);
}

.ansico-mastodon-feed__profile-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ansico-mastodon-feed__profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: #e8edf2;
  transition: opacity 0.12s ease;
}

.ansico-mastodon-feed__profile-avatar:hover {
  opacity: 0.85;
}

.ansico-mastodon-feed__profile-info {
  min-width: 0;
}

.ansico-mastodon-feed__profile-name-link {
  text-decoration: none;
}

.ansico-mastodon-feed__profile-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #0f1419;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.ansico-mastodon-feed__profile-name-link:hover .ansico-mastodon-feed__profile-name {
  text-decoration: underline;
}

/* Acct with tooltip */
.ansico-mastodon-feed__profile-acct-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.ansico-mastodon-feed__profile-acct {
  display: block;
  font-size: 13px;
  color: #536471;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  text-decoration: none;
  max-width: 180px;
}

.ansico-mastodon-feed__profile-acct:hover {
  text-decoration: underline;
  color: #1d9bf0;
}

/* Tooltip */
.ansico-mastodon-feed__profile-acct-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: rgba(15, 20, 25, 0.88);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.ansico-mastodon-feed__profile-acct-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 10px;
  border: 5px solid transparent;
  border-top-color: rgba(15, 20, 25, 0.88);
}

.ansico-mastodon-feed__profile-acct-wrap:hover .ansico-mastodon-feed__profile-acct-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.ansico-mastodon-feed__profile-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ansico-mastodon-feed__profile-logo {
  width: 20px;
  height: 20px;
  color: #6364ff;
  flex-shrink: 0;
}

.ansico-mastodon-feed__follow-btn {
  display: inline-block;
  padding: 6px 14px;
  background: #0f1419;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.ansico-mastodon-feed__follow-btn:hover {
  background: #272c30;
  transform: scale(1.03);
}

/* ── Remote follow dialog ───────────────────────────────────────────────── */

.ansico-mastodon-feed__follow-dialog {
  border: none;
  border-radius: 16px;
  padding: 24px;
  width: min(340px, 90vw);
  box-shadow: 0 8px 40px rgba(15, 20, 25, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ansico-mastodon-feed__follow-dialog::backdrop {
  background: rgba(15, 20, 25, 0.5);
  backdrop-filter: blur(2px);
}

.ansico-mastodon-feed__follow-dialog-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f1419;
  margin: 0 0 6px;
}

.ansico-mastodon-feed__follow-dialog-desc {
  font-size: 14px;
  color: #536471;
  margin: 0 0 16px;
  line-height: 1.5;
}

.ansico-mastodon-feed__follow-input-row {
  display: flex;
  align-items: center;
  border: 1px solid rgba(15, 20, 25, 0.2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color 0.15s ease;
}

.ansico-mastodon-feed__follow-input-row:focus-within {
  border-color: #1d9bf0;
}

.ansico-mastodon-feed__follow-at {
  padding: 10px 8px 10px 12px;
  font-size: 14px;
  color: #536471;
  background: #f7f9fa;
  white-space: nowrap;
  border-right: 1px solid rgba(15, 20, 25, 0.1);
  user-select: none;
}

.ansico-mastodon-feed__follow-input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: #0f1419;
  background: #fff;
  min-width: 0;
}

.ansico-mastodon-feed__follow-input::placeholder {
  color: #aab8c2;
}

.ansico-mastodon-feed__follow-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ansico-mastodon-feed__follow-cancel {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(15, 20, 25, 0.2);
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #536471;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.ansico-mastodon-feed__follow-cancel:hover {
  background: #f7f9fa;
}

.ansico-mastodon-feed__follow-go {
  padding: 8px 16px;
  background: #6364ff;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.1s ease;
}

.ansico-mastodon-feed__follow-go:hover {
  background: #4f50e0;
  transform: scale(1.03);
}

/* ── Notice ─────────────────────────────────────────────────────────────── */

.ansico-mastodon-feed--notice {
  padding: 12px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  color: #536471;
  background: #fff;
  border: 1px solid rgba(15, 20, 25, 0.12);
  border-radius: 14px;
}
