/**
 * check-in-feed.css
 * チェックインフィードコンポーネント
 */

.check-in-feed {
  max-width: 800px;
  margin: 0 auto;
}

.check-in-feed__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.check-in-feed__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text, #212121);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.check-in-feed__refresh {
  padding: 8px 12px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: var(--color-text-light, #757575);
  transition: all 0.2s ease;
}

.check-in-feed__refresh:hover:not(:disabled) {
  background: #f5f5f5;
  transform: rotate(180deg);
}

.check-in-feed__refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.check-in-feed__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  animation: feed-card-enter 0.3s ease-out;
}

@keyframes feed-card-enter {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.feed-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.feed-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.feed-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.feed-card__avatar:hover {
  transform: scale(1.1);
  border-color: #ff6b35;
}

.feed-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-card__avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--color-text-light, #757575);
}

.feed-card__user-info {
  flex: 1;
}

.feed-card__user-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text, #212121);
  cursor: pointer;
  transition: color 0.2s ease;
}

.feed-card__user-name:hover {
  color: #ff6b35;
}

.feed-card__time {
  font-size: 13px;
  color: var(--color-text-light, #757575);
}

.feed-card__content {
  margin-bottom: 16px;
}

.feed-card__action {
  font-size: 14px;
  color: var(--color-text-light, #757575);
  margin-bottom: 12px;
}

.feed-card__place {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feed-card__place:hover {
  background: #e0e0e0;
  transform: translateX(4px);
}

.feed-card__place-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #e0e0e0;
  flex-shrink: 0;
}

.feed-card__place-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-card__place-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--color-text-light, #757575);
}

.feed-card__place-info {
  flex: 1;
}

.feed-card__place-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text, #212121);
  margin-bottom: 4px;
}

.feed-card__place-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: white;
  color: var(--color-text-light, #757575);
  font-size: 12px;
  border-radius: 6px;
}

.feed-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.feed-card__points {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.feed-card__points.points-high {
  background: linear-gradient(135deg, #ffd700 0%, #ff6b35 100%);
  color: white;
}

.feed-card__points.points-medium {
  background: linear-gradient(135deg, #ffe66d 0%, #ff8833 100%);
  color: white;
}

.feed-card__points.points-low {
  background: linear-gradient(135deg, #ffe0cc 0%, #ffb380 100%);
  color: #ff6b35;
}

.feed-card__first-visit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--gradient-secondary, linear-gradient(135deg, #4ecdc4 0%, #8de0dc 100%));
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
}

.feed-card__comment {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text, #212121);
  line-height: 1.5;
}

.feed-card__image {
  width: 100%;
  border-radius: 12px;
  margin-top: 12px;
  overflow: hidden;
}

.feed-card__image img {
  width: 100%;
  height: auto;
  display: block;
}

.check-in-feed__load-more {
  text-align: center;
  margin-top: 24px;
}

.check-in-feed__load-more-btn {
  padding: 12px 32px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text, #212121);
  cursor: pointer;
  transition: all 0.2s ease;
}

.check-in-feed__load-more-btn:hover:not(:disabled) {
  background: #f5f5f5;
  border-color: #bdbdbd;
  transform: translateY(-2px);
}

.check-in-feed__load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.check-in-feed__loading {
  text-align: center;
  padding: 40px 20px;
}

.check-in-feed__empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-light, #757575);
}

.check-in-feed__empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.check-in-feed__empty-message {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 8px 0;
}

.check-in-feed__empty-hint {
  font-size: 14px;
  margin: 0;
}

.check-in-feed__error {
  text-align: center;
  padding: 40px 20px;
  background: #ffebee;
  border-radius: 12px;
  color: #c62828;
}

@media (max-width: 768px) {
  .check-in-feed {
    padding: 0 16px;
  }

  .feed-card {
    padding: 16px;
  }

  .feed-card__place {
    flex-direction: column;
    align-items: flex-start;
  }

  .feed-card__place-image {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 576px) {
  .check-in-feed__title {
    font-size: 20px;
  }

  .feed-card__avatar {
    width: 40px;
    height: 40px;
  }

  .feed-card__place-image {
    height: 160px;
  }
}

/* Place Detail Page - Check-in Section Styles */
.place-checkins-section {
  padding: var(--spacing-xl, 32px) var(--spacing-lg, 24px);
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.place-checkins-section__container {
  max-width: 800px;
  margin: 0 auto;
}

/* Count Badge */
.check-in-feed__count-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8833 100%);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  margin-left: 8px;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Place-specific overrides */
.place-checkins-section .check-in-feed__title {
  font-size: 20px;
}

.place-checkins-section .feed-card__place {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .place-checkins-section {
    padding: var(--spacing-xl, 32px) var(--spacing-md, 16px);
  }

  .place-checkins-section .check-in-feed__title {
    font-size: 18px;
  }

  .check-in-feed__count-badge {
    font-size: 12px;
    padding: 3px 10px;
  }
}

/* ==========================================================================
   ダークモード対応
   ========================================================================== */

[data-theme='dark'] .feed-card {
  background: var(--color-surface, #1e1e1e);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .feed-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .check-in-feed__refresh {
  background: var(--color-surface, #1e1e1e);
  border-color: var(--color-border, #333333);
}

[data-theme='dark'] .check-in-feed__refresh:hover:not(:disabled) {
  background: var(--color-surface-light, #2c2c2c);
}

[data-theme='dark'] .feed-card__avatar {
  border-color: var(--color-border, #333333);
}

[data-theme='dark'] .feed-card__avatar-placeholder {
  background: var(--color-surface-light, #2c2c2c);
}

[data-theme='dark'] .feed-card__place {
  background: var(--color-surface-light, #2c2c2c);
}

[data-theme='dark'] .feed-card__place:hover {
  background: var(--color-border, #333333);
}

[data-theme='dark'] .feed-card__place-image {
  background: var(--color-surface-light, #2c2c2c);
}

[data-theme='dark'] .feed-card__place-category {
  background: var(--color-surface, #1e1e1e);
}

[data-theme='dark'] .feed-card__footer {
  border-top-color: var(--color-border, #333333);
}

[data-theme='dark'] .feed-card__comment {
  background: var(--color-surface-light, #2c2c2c);
}

[data-theme='dark'] .check-in-feed__load-more-btn {
  background: var(--color-surface, #1e1e1e);
  border-color: var(--color-border, #333333);
  color: var(--color-text, #ffffff);
}

[data-theme='dark'] .check-in-feed__load-more-btn:hover:not(:disabled) {
  background: var(--color-surface-light, #2c2c2c);
  border-color: var(--color-text-secondary, #757575);
}

[data-theme='dark'] .check-in-feed__error {
  background: rgba(198, 40, 40, 0.15);
  color: #ef9a9a;
}

[data-theme='dark'] .place-checkins-section {
  background: linear-gradient(
    180deg,
    var(--color-surface, #1e1e1e) 0%,
    var(--color-surface-light, #2c2c2c) 100%
  );
}
