/* 추천 뉴스블록 모달 스타일 */

/* 모달 콘텐츠 컨테이너 */
.recommendation-modal-content {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  width: 100%;
}

/* 추천 목록 컨테이너 */
.recommendations-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1rem;
  margin-bottom: 1rem;
  /* 스크롤바 스타일 */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) var(--light-bg);
  /* 컨테이너 높이 안정화 */
  min-height: 300px;
}

/* WebKit 브라우저용 스크롤바 스타일 */
.recommendations-container::-webkit-scrollbar {
  width: 8px;
}

.recommendations-container::-webkit-scrollbar-track {
  background: var(--light-bg);
  border-radius: 4px;
}

.recommendations-container::-webkit-scrollbar-thumb {
  background-color: var(--primary-light);
  border-radius: 4px;
}

/* 추천 카드 */
.recommendation-card {
  display: flex;
  flex-direction: column;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  /* 카드 높이 안정화 */
  min-height: 120px;
  height: auto;
  box-sizing: border-box;
}

.recommendation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 카드 헤더 */
.recommendation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0; /* 헤더 크기 고정 */
}

/* 날짜 표시 */
.recommendation-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* 카드 본문 */
.recommendation-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1; /* 남은 공간 채우기 */
  min-height: 100px; /* 본문 최소 높이 */
}

/* 제목 */
.recommendation-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  word-break: break-word;
}

/* 썸네일 */
.recommendation-thumbnail {
  float: right;
  margin: 0 0 0.75rem 1rem;
  width: 120px;
  height: 80px;
  overflow: hidden;
  border-radius: 0.375rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recommendation-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recommendation-thumbnail:hover img {
  transform: scale(1.05);
}

/* 요약 내용 */
.recommendation-summary {
  display: block;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dark);
  word-break: break-word;
  flex: 1; /* 요약 내용이 최대한 공간 차지 */
  min-height: 3em; /* 최소 3줄 정도의 높이 */
}

/* 푸터 */
.recommendation-footer {
  margin-top: 1rem;
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* 로딩 인디케이터 */
.loading-indicator {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 0.75rem;
}

.loading-indicator .spinner {
  width: 30px;
  height: 30px;
}

.loading-indicator p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* 배지 스타일 */
.recommendation-header .badge {
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-primary {
  background-color: var(--primary-color);
  color: white;
}

.badge-info {
  background-color: #3b82f6;
  color: white;
}

.badge-success {
  background-color: var(--success-color);
  color: white;
}

.badge-warning {
  background-color: var(--warning-color);
  color: white;
}

.badge-secondary {
  background-color: #6b7280;
  color: white;
}

/* 모달 크기 최적화 */


/* 빈 데이터 스타일 */
.empty-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-light);
  text-align: center;
}

.empty-data i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-data p {
  font-size: 1.1rem;
}

/* 반응형 조정 */
@media (max-width: 768px) {
  .recommendation-thumbnail {
    width: 100px;
    height: 70px;
  }

  .recommendation-title {
    font-size: 1rem;
  }

  .recommendation-summary {
    font-size: 0.9rem;
  }

  #recommendations-modal .modal {
    width: 95%;
  }
}