/* ===== SENT REQUEST HISTORY ===== */

.yc-history {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 16px 56px;
}

.yc-history__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--accent-color-strong);
}

.yc-history__count {
  color: var(--text-color);
  margin: 0 0 20px;
  font-size: 0.9375rem;
  font-weight: 400;
}

.yc-history__empty {
  color: var(--gray);
  font-size: 1rem;
  padding: 1.5rem 0 0;
}

.yc-history__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yc-history__item {
  background: var(--white-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.yc-history__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.yc-history__summary::-webkit-details-marker {
  display: none;
}

.yc-history__summary-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.yc-history__date {
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.01em;
}

.yc-history__apartment-count {
  color: var(--gray);
  font-size: 0.9rem;
}

.yc-history__summary-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.yc-badge--sent {
  background: rgba(27, 127, 77, 0.12);
  color: var(--success-color);
}

.yc-history__chevron {
  color: var(--gray);
  transition: transform var(--transition-base);
}

.yc-history__item[open] .yc-history__chevron {
  transform: rotate(180deg);
}

.yc-history__apartments {
  list-style: none;
  margin: 0;
  padding: 0 18px 16px;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--gray-bg);
  padding-top: 14px;
}

.yc-history__apartment {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
}

.yc-history__apartment-media {
  display: block;
}

.yc-history__apartment-media img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 0 0 0 12px;
  display: block;
}

.yc-history__apartment-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.yc-history__apartment-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--transition-base);
}

a.yc-history__apartment-title:hover {
  color: var(--primary-color);
}

.yc-history__apartment-price {
  font-size: 0.85rem;
  color: var(--gray);
}

.yc-history__apartment--unavailable .yc-history__apartment-title {
  color: var(--gray);
  font-style: italic;
  font-weight: 500;
}

.yc-history__apartment--unavailable img {
  opacity: 0.5;
  filter: grayscale(1);
}

.yc-history__more {
  display: block;
  margin: 20px auto 0;
}

.yc-history__login {
  text-align: center;
  padding: 2rem;
  color: var(--gray);
}

@media (max-width: 480px) {
  .yc-history {
    padding: 8px 8px 30px;
  }

  .yc-history__title {
    font-size: 24px;
  }

  .yc-history__summary {
    padding: 12px 14px;
  }

  .yc-history__apartment {
    grid-template-columns: 56px 1fr;
  }

  .yc-history__apartment-media img {
    width: 56px;
    height: 42px;
  }
}
