/* yh-event-timeline — theme-agnostic styles */

.yh-et-widget {
  padding: 0;
}

.yh-et-banner {
  line-height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
}

.yh-et-banner img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.yh-et-head {
  padding: 16px 18px 0;
}

.yh-et-desc {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-muted, #666);
}

.yh-et-list {
  list-style: none;
  margin: 0;
  padding: 8px 18px 0;
}

.yh-et-item {
  position: relative;
  padding: 0 0 16px 14px;
  border-left: 2px solid color-mix(in srgb, var(--color-primary, #2d7ff9) 35%, var(--color-border, #e5e7eb));
}

.yh-et-item:last-child {
  padding-bottom: 12px;
  border-left-color: transparent;
}

.yh-et-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary, #2d7ff9);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary, #2d7ff9) 18%, var(--color-surface, #fff));
}

.yh-et-meta {
  margin-bottom: 4px;
}

.yh-et-meta time,
.yh-et-time {
  font-size: 12px;
  color: var(--color-muted, #666);
}

.yh-et-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.5;
}

.yh-et-tag--main {
  background: color-mix(in srgb, var(--color-primary, #2d7ff9) 14%, var(--color-surface, #fff));
  color: var(--color-primary, #2d7ff9);
}

.yh-et-tag--red { background: #fdecea; color: #c0392b; }
.yh-et-tag--orange { background: #fff3e6; color: #d35400; }
.yh-et-tag--green { background: #e8f8ef; color: #1e8449; }
.yh-et-tag--blue { background: #eaf2fd; color: #2471a3; }

.yh-et-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.yh-et-link h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.yh-et-link:hover h4 {
  color: var(--color-primary, #2d7ff9);
}

.yh-et-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 4px 18px 16px;
  padding: 8px;
  font-size: 13px;
  text-decoration: none;
  color: var(--color-muted, #666);
  border-top: 1px solid var(--color-border, #e5e7eb);
}

.yh-et-more:hover {
  color: var(--color-primary, #2d7ff9);
}

/* Full page */
.yh-et-page {
  max-width: 860px;
  margin: 0 auto;
}

.yh-et-page-head {
  margin-bottom: 28px;
}

.yh-et-page-banner {
  position: relative;
  margin: -8px 0 20px;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

.yh-et-page-banner img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.yh-et-page-banner-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, color-mix(in srgb, var(--color-bg, #fff) 85%, transparent));
}

.yh-et-page-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.yh-et-page .yh-et-breadcrumb,
.yh-et-page .breadcrumb {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-muted, #666);
}

.yh-et-page .yh-et-breadcrumb a,
.yh-et-page .breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.yh-et-page .yh-et-breadcrumb a:hover,
.yh-et-page .breadcrumb a:hover {
  color: var(--color-primary, #2d7ff9);
}

.yh-et-page .yh-et-breadcrumb .sep,
.yh-et-page .breadcrumb .sep {
  margin: 0 6px;
  opacity: 0.6;
}

.yh-et-page-desc {
  color: var(--color-muted, #666);
  line-height: 1.7;
}

.yh-et-page-count {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--color-muted, #666);
}

.yh-et-timeline-wrap {
  padding: 8px 0 24px;
}

.yh-et-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.yh-et-page-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0 16px;
  position: relative;
  padding-bottom: 28px;
}

.yh-et-page-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--color-primary, #2d7ff9) 25%, var(--color-border, #e5e7eb));
}

.yh-et-axis {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.yh-et-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary, #2d7ff9);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary, #2d7ff9) 15%, var(--color-surface, #fff));
}

.yh-et-card {
  padding: 16px 18px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-surface, #fff);
}

.yh-et-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.yh-et-card-title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  line-height: 1.4;
}

.yh-et-card-title a {
  color: inherit;
  text-decoration: none;
}

.yh-et-card-title a:hover {
  color: var(--color-primary, #2d7ff9);
}

.yh-et-card-excerpt {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-muted, #666);
}

.yh-et-cover {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
}

.yh-et-cover--single .yh-et-cover-cell img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.yh-et-cover--gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.yh-et-cover--gallery .yh-et-cover-cell img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.yh-et-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--color-muted, #666);
}

.yh-et-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
  opacity: 0.5;
}

.yh-et-load-more {
  text-align: center;
  padding: 8px 0 32px;
}

.yh-et-load-btn {
  appearance: none;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-surface, #fff);
  color: inherit;
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.yh-et-load-btn:hover {
  border-color: var(--color-primary, #2d7ff9);
  color: var(--color-primary, #2d7ff9);
}

.yh-et-load-more.is-loading .yh-et-load-btn {
  opacity: 0.6;
  pointer-events: none;
}

.yh-et-load-status {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-muted, #666);
}

.yh-et-load-more.is-loading .yh-et-load-status,
.yh-et-load-more.is-ended .yh-et-load-status {
  display: block;
}

.yh-et-load-more.is-ended .yh-et-load-btn {
  display: none;
}

.yh-et-load-spin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-border, #e5e7eb);
  border-top-color: var(--color-primary, #2d7ff9);
  border-radius: 50%;
  animation: yh-et-spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.yh-et-load-more.is-ended .yh-et-load-spin {
  display: none;
}

@keyframes yh-et-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .yh-et-cover--gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
