/* Rodong Data Viewer Legacy CSS */

/* 検索コントロール */
.search-controls {
  margin-bottom: 2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
}

/* 日付範囲のレイアウト */
.date-range-group {
  flex: 1;
}

.date-range-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.date-input {
  flex: 1;
  min-width: 140px;
}

.date-separator {
  color: #666;
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.9rem;
}

/* 写真リンクのスタイル */
.photo-link {
  color: #007bff !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  font-weight: 500 !important;
}

.photo-link:hover {
  color: #0056b3 !important;
  text-decoration: none !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .date-range-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .date-input {
    min-width: auto;
  }

  .date-separator {
    text-align: center;
    padding: 0.25rem 0;
  }

  /* article-metaはモバイルでも横並びを維持 */
  .article-meta {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0056b3;
}

.btn-primary:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

/* 検索結果 */
.results-header {
  margin-bottom: 1rem;
}

.results-header h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
}

.results-summary {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.results-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 1rem 0;
}

.results-list {
  margin-bottom: 2rem;
}

.result-item {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  background: #fff;
}

.result-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
  transform: translateY(-2px);
}

.article-header {
  margin-bottom: 1rem;
}

.article-title {
  margin: 0.25rem 0 0.5rem 0 !important;
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  line-height: 1.4 !important;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.article-date {
  font-weight: 500;
}

.article-page {
  background: #f8f9fa;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

.article-summary {
  color: #666;
  line-height: 1.6;
}

.article-summary p {
  margin: 0;
}

/* 記事ビューア */
#article-viewer {
  margin-top: 2rem;
}

#article-viewer .article-header {
  border-bottom: 2px solid #eee;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

#article-viewer .article-title {
  font-size: 1.5rem;
  margin: 1rem 0;
}

#article-viewer .article-meta {
  margin-bottom: 0;
}

.article-paragraphs {
  margin-bottom: 2rem;
}

.article-paragraph {
  margin-bottom: 1rem;
  line-height: 1.8;
  text-align: justify;
}

.article-photos {
  margin: 2rem 0;
}

.photo-item {
  margin-bottom: 2rem;
  text-align: center;
}

.article-photo {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-caption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.pagination-button {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.pagination-button:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #007bff;
}

.pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-input-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1rem;
}

.page-input-label {
  font-size: 0.9rem;
  color: #666;
}

.page-input {
  width: 60px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
}

.page-input-separator {
  color: #666;
}

.page-total {
  color: #666;
  font-weight: 500;
}

/* アラート */
.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

/* 朝鮮語フォント */
.korean-text {
  font-family: 'KP CheonRiMa', 'SB ChonLiMa', sans-serif;
  font-weight: 400;
}

/* バッククォートで囲まれた部分のフォント */
code {
  font-family: var(--font-family-code, 'KP CheonRiMa', 'SB ChonLiMa', monospace);
  font-weight: 400;
  background-color: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  color: #e83e8c;
  border: 1px solid #e9ecef;
}

/* ダークモードでのcodeスタイル */
@media (prefers-color-scheme: dark) {
  code {
    background-color: #2d2d2d;
    color: #ff6b9d;
    border-color: #555;
  }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .pagination {
    flex-direction: column;
    gap: 1rem;
  }
  
  .page-input-container {
    margin: 0;
  }
  
  .result-item {
    padding: 1rem;
  }
  
  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #article-viewer .article-title {
    font-size: 1.25rem;
  }
}

/* ライトモードの強制設定 */
.rodong-app {
  background-color: transparent !important;
  color: #333 !important;
}

.rodong-app .form-control {
  background-color: #fff !important;
  border-color: #ddd !important;
  color: #333 !important;
}

.rodong-app .result-item {
  background: transparent !important;
  border-color: #eee !important;
  color: #333 !important;
}

.rodong-app .pagination-button {
  background: #fff !important;
  border-color: #ddd !important;
  color: #333 !important;
}

.rodong-app .pagination-button:hover:not(:disabled) {
  background: #f8f9fa !important;
  border-color: #007bff !important;
}

.rodong-app .form-group label {
  color: #333 !important;
}

.rodong-app .results-header h3 {
  color: #333 !important;
}

.rodong-app .results-summary {
  color: #666 !important;
}

.rodong-app .article-title {
  color: #333 !important;
  margin: 0.25rem 0 0.5rem 0 !important;
}

.rodong-app .article-meta {
  color: #666 !important;
  align-items: center !important;
}

.rodong-app .article-summary {
  color: #666 !important;
}

.rodong-app .page-input-label {
  color: #666 !important;
}

.rodong-app .page-input-separator {
  color: #666 !important;
}

.rodong-app .page-total {
  color: #666 !important;
}

.rodong-app .photo-caption {
  color: #666 !important;
}

/* ダークモードを無効化 - 常にライトモードで表示 */
