/* ====================================
   display-skeleton-1.css  スケルトンローディング
==================================== */

/* display: grid / flex が hidden 属性の display:none を上書きするのを防ぐ */
[hidden] { display: none !important; }

/* ===== デモコンテナ（2パターン縦並び）===== */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
  gap: 24px;
}

/* ===== パターンブロック ===== */
.sk-pattern {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  max-width: 680px;
  width: 100%;
}

.sk-pattern-label {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* ===== CSS 変数（色の調整用）===== */
.sk-pattern {
  --sk-color:     #E8ECF0;
  --sk-highlight: #F4F6F9;
}

/* ===== shimmer アニメーション ===== */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--sk-color) 25%,
    var(--sk-highlight) 50%,
    var(--sk-color) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* ===== pulse アニメーション ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.pulse {
  background: var(--sk-color);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ===== フェードイン（コンテンツ表示時）===== */
@keyframes sk-fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sk-real-area {
  animation: sk-fadeIn 0.4s ease;
}

/* ===== スケルトン共通 ===== */
.sk-line {
  height: 12px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.sk-line:last-child { margin-bottom: 0; }
.sk-line--title { height: 16px; width: 70%; }
.sk-line--short { width: 40%; }

/* ===== Pattern 1: カード型グリッド ===== */
.sk-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.sk-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  overflow: hidden;
}

.sk-thumb {
  height: 100px;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* Pattern 1: 実コンテンツカード */
.sk-real-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}
.sk-real-thumb {
  height: 100px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: #DBEAFE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.sk-real-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #1a2332;
}
.sk-real-body-text {
  margin: 0 0 8px;
  font-size: 12px;
  color: #5a6a7a;
  line-height: 1.5;
}
.sk-real-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #E8F0FE;
  color: #2B7FE8;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

/* ===== Pattern 2: リスト型 ===== */
.sk-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.sk-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
}
.sk-list-item:last-child { border-bottom: none; }

.sk-list-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* Pattern 2: 実コンテンツアイテム */
.sk-real-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
}
.sk-real-item:last-child { border-bottom: none; }

.sk-real-item-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background: #FEF9C3;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.sk-real-item-body { flex: 1; }
.sk-real-item-name {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: #1a2332;
}
.sk-real-item-model {
  margin: 0 0 4px;
  font-size: 12px;
  color: #5a6a7a;
}
.sk-real-item-price {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #2B7FE8;
}

/* ===== コントロール（読み込む・リセットボタン）===== */
.demo-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.sk-load-btn {
  padding: 6px 20px;
  font-size: 13px;
  color: #fff;
  background: #2B7FE8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s;
}
.sk-load-btn:hover    { background: #1a6fd4; }
.sk-load-btn:disabled { background: #9AB8E8; cursor: not-allowed; }

.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

/* ===== プロンプトブロック（2パターン分割）===== */
.prompt-block { margin-bottom: 20px; }
.prompt-block:last-child { margin-bottom: 0; }
.prompt-block-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* ===== レスポンシブ ===== */
@media (max-width: 540px) {
  .sk-card-grid { grid-template-columns: 1fr; }
  .sk-pattern   { padding: 16px; }
}
