/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@keyframes fade-out {
  0%, 80% { opacity: 1; }
  100% { opacity: 0; display: none; }
}

.animate-fade-out {
  animation: fade-out 5s ease-out forwards;
}

/* DNCL Syntax Highlighting */
.dncl-line-num {
  color: #6b7280;
  user-select: none;
  margin-right: 0.75em;
  display: inline-block;
  min-width: 1.5em;
  text-align: right;
}

.dncl-keyword {
  color: #c084fc;
  font-weight: bold;
}

.dncl-loop {
  color: #60a5fa;
  font-weight: bold;
}

.dncl-io {
  color: #34d399;
  font-weight: bold;
}

.dncl-operator {
  color: #fb923c;
  font-weight: bold;
}

.dncl-number {
  color: #fbbf24;
}

.dncl-comment {
  color: #6b7280;
  font-style: italic;
}

/* ストリーミングカーソル点滅 */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.animate-blink {
  animation: blink 0.8s step-end infinite;
}

/* タイピングインジケーター 3点ドット */
@keyframes typing-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1;   }
}
.typing-dot:nth-child(1) { animation: typing-dot 1.2s infinite 0s;    }
.typing-dot:nth-child(2) { animation: typing-dot 1.2s infinite 0.2s;  }
.typing-dot:nth-child(3) { animation: typing-dot 1.2s infinite 0.4s;  }

/* Pagy ページネーション - バリアフリー対応ボタン */
nav.pagy.series-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

nav.pagy.series-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 48px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 10px;
  color: #374151;
  background-color: #ffffff;
  border: 2px solid #e5e7eb;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

nav.pagy.series-nav a:hover:not([aria-disabled="true"]) {
  background-color: #eef2ff;
  border-color: #818cf8;
  color: #4338ca;
}

/* 現在ページ */
nav.pagy.series-nav a[aria-current="page"] {
  background-color: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  font-weight: 700;
  cursor: default;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

/* 無効状態（先頭/末尾の前へ・次へ） */
nav.pagy.series-nav a[aria-disabled="true"]:not([role="separator"]):not([aria-current="page"]) {
  color: #d1d5db;
  border-color: #f3f4f6;
  background-color: #f9fafb;
  cursor: not-allowed;
}

/* 省略記号（…） */
nav.pagy.series-nav a[role="separator"] {
  border: none;
  background: none;
  color: #9ca3af;
  min-width: 28px;
  padding: 0 4px;
  cursor: default;
}

/* 前へ / 次へ ボタン */
nav.pagy.series-nav a[rel="prev"],
nav.pagy.series-nav a[rel="next"] {
  min-width: 72px;
  font-weight: 600;
  color: #4f46e5;
  border-color: #c7d2fe;
}

nav.pagy.series-nav a[rel="prev"]:hover,
nav.pagy.series-nav a[rel="next"]:hover {
  background-color: #eef2ff;
  border-color: #4f46e5;
  color: #3730a3;
}
