/* style.css */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;600&display=swap');

body {
  font-family: "Noto Serif JP", serif;
  background-color: #f7f5ef;
  color: #222;
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

/* --- 浮動ボタンのスタイル (左上の丸い検索ボタン) --- */
.floating-btn {
    position: fixed; /* 画面に固定 */
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* 丸い形に */
    background-color: #555;
    border: none;
    cursor: pointer;
    z-index: 900; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;

    /* アイコンのスタイル */
    /* 指定されたURLの画像を背景として使用（カラーを白に変更して視認性を確保） */
    background-image: url('https://img.icons8.com/?size=100&id=132&format=png&color=FFFFFF'); 
    background-size: 60%; /* ボタンに合わせてサイズ調整 */
    background-repeat: no-repeat;
    background-position: center;
    text-indent: -9999px; /* ボタン内のテキスト「検索」を非表示にする */
}

.floating-btn:hover {
    background-color: #333;
}
/* ----------------------------------- */

header {
  text-align: center;
  padding: 40px 20px 20px;
  background-color: #e8e4da;
  border-bottom: 2px solid #ccc;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

/* ヘッダーのサブタイトル */
.subtitle {
  font-size: 0.9rem;
  color: #555;
}

/* --- 検索オーバーレイのスタイル --- */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* 半透明の黒背景 */
    display: none; /* 初期状態では非表示 */
    justify-content: center;
    align-items: flex-start; /* 上部に寄せる */
    padding-top: 5vh;
    z-index: 1000;
    overflow-y: auto;
}

.search-box {
    position: relative;
    width: 90%;
    max-width: 600px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

#search-input {
    width: 90%;
    padding: 10px;
    font-size: 1.1rem;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.close-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    background: none;
    border: none;
    color: #555;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

#search-results-container {
    max-height: 70vh; /* 結果が長すぎるときのために高さを制限 */
    overflow-y: auto;
}

/* 検索結果のカードスタイル */
.search-result-card {
    background: #f7f5ef;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    cursor: pointer;
}
.search-result-card:hover {
    background-color: #e8e4da;
}
.search-result-card .symptom-title {
    font-size: 1.1rem;
    font-weight: 600;
}
.search-result-card .search-snippet {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}
/* ----------------------------------- */


.symptom-list {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
}

.symptom-card {
  background: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.symptom-card:hover {
  background-color: #f0ece2;
}

.symptom-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px; /* タイトルとサブタイトルの間に少しスペースを追加 */
}

/* カード内のサブタイトル (英名) のスタイルを調整 */
.symptom-card .subtitle {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
    font-weight: 400; /* 太字を解除して控えめに */
}

.symptom-date {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.symptom-detail {
  display: none;
  font-size: 0.95rem;
  margin-top: 10px;
  color: #333;
  border-top: 1px dashed #ccc;
  padding-top: 10px;
}

/* カテゴリタグを目立たせる */
.symptom-detail .category-tag {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-top: 15px;
    border-top: none;
    padding-top: 0;
}

footer {
  text-align: center;
  padding: 20px;
  color: #777;
  border-top: 1px solid #ccc;
  background-color: #f3f1ea;
  font-size: 0.9rem;
}

/* ここからフッターリンクのスタイル */
.footer-links {
    margin-top: 10px;
    margin-bottom: 10px; /* 著作権表示との間隔 */
    display: flex; /* 要素を横並びにする */
    justify-content: center; /* 中央に配置 */
    flex-wrap: wrap; /* 画面幅が狭い場合に折り返す */
    align-items: center;
}

.footer-link,
.footer-button {
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    margin: 0 5px;
    padding: 5px 10px;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 3px;
    display: inline-block;
}

.footer-link:hover {
    color: #000;
    text-decoration: underline;
}

.footer-button {
    background-color: #d1ccbf; /* ボタンの背景色 */
    border: 1px solid #c0bcb0;
    cursor: pointer;
}

.footer-button:hover {
    background-color: #c0bcb0;
    color: #000;
}

.link-separator {
    color: #aaa;
    margin: 0 5px;
    font-size: 0.8rem;
}
/* ここまでフッターリンクのスタイル */


/* --- 投稿ボタンのスタイル（フッターに移動） --- */

/* 投稿ボタンのセクション（フッター内上部に配置） */
.footer-post-section {
    text-align: center;
    padding-bottom: 20px; /* リンクセクションとの間隔 */
    margin-bottom: 10px;
    border-bottom: 1px solid #e8e4da; /* 区切り線 */
}

/* 投稿ボタンのスタイル */
.submit-form-button {
    display: inline-block;
    background-color: #a33; /* 辞典のトーンに合わせた暖色系 */
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none; /* リンクの下線を消す */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    cursor: pointer;
}

.submit-form-button:hover {
    background-color: #b94444; /* ホバーで少し明るく */
    transform: translateY(-2px); /* わずかに浮き上がらせる */
}

/* --- 静的コンテンツのスタイル（terms.html, privacy.html用） --- */

.static-content {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.static-content h2 {
    margin-top: 30px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e8e4da;
    font-size: 1.2rem;
    font-weight: 600;
}

.static-content p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #333;
}

.static-content .back-to-top {
    margin-top: 40px;
    text-align: center;
}

.static-content .back-to-top a {
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.static-content .back-to-top a:hover {
    background-color: #f0ece2;
}

/* --------------------------------------------------------- */
/* --- カスタム同意モードバナーのスタイル (追加) --- */
/* --------------------------------------------------------- */

/* バナー全体 */
.consent-banner {
    position: fixed; /* 画面下部に固定 */
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #222; /* 暗めの背景で目立たせる */
    color: #fff;
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    z-index: 2000; /* 他の要素より手前に表示 */
    display: flex; 
    justify-content: center;
    align-items: center;
    gap: 30px; 
    font-size: 0.95rem;
}

/* JavaScriptで制御される非表示状態 */
.consent-banner.hidden {
    display: none; 
}

/* テキストエリア */
.consent-text h2 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 5px;
    color: #fff;
    font-weight: 600;
    /* 既存のh2のスタイルを上書きして、バナー内h2の境界線を消す */
    border-bottom: none; 
    padding-bottom: 0;
}

.consent-text p {
    margin-bottom: 5px;
    line-height: 1.4;
    color: #ccc;
    /* 既存のpのスタイルを上書き */
    font-size: 0.95rem; 
    color: #ccc; 
}

/* プライバシーポリシーへのリンク */
.banner-link {
    color: #ffd700; /* ゴールドで見やすく */
    text-decoration: underline;
    font-size: 0.85rem;
    /* 既存のリンクスタイルとの競合を防ぐ */
    margin: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    background-color: transparent;
}

/* ボタンのコンテナ */
.consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ボタン共通 */
.consent-button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s, opacity 0.2s;
    min-width: 100px;
}

/* 同意 (Accept) ボタン */
.consent-button.accept {
    background-color: #a33; /* 辞典のメインカラーに合わせる */
    color: #fff;
}

.consent-button.accept:hover {
    background-color: #b94444;
}

/* 拒否 (Deny) ボタン */
.consent-button.deny {
    background-color: #ccc;
    color: #333;
}

.consent-button.deny:hover {
    opacity: 0.8;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .consent-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px 10px;
        text-align: center;
    }
    .consent-text {
        text-align: left;
    }
    .consent-actions {
        width: 100%;
        justify-content: space-between; /* ボタンを左右に広げる */
    }
    .consent-button {
        flex-grow: 1; /* ボタンを均等幅にする */
        padding: 12px 10px;
    }
}
/* --- /カスタム同意モードバナーのスタイル --- */