/* 設計書入門 - コンポーネント */

.note {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 4px 4px 0;
}

.term-box {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.compare-table th { background: #e2e8f0; }

.plantuml-section {
    background: #f0f4f8;
    border: 1px solid #cbd5e0;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.plantuml-title {
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.plantuml-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

.breadcrumb {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
}

.breadcrumb a { color: #4a5568; }

.refs {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #cbd5e0;
    font-size: 0.85rem;
    color: #666;
}

.bookmark-btn {
    cursor: pointer;
    font-size: 1.2rem;
    color: #a0aec0;
    background: none;
    border: none;
    padding: 0 0.3rem;
    transition: transform 0.2s;
}

.bookmark-btn:hover { transform: scale(1.2); }
.bookmark-btn.active { color: #ecc94b; }

.review-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.8rem;
    z-index: 100;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 200;
}

.toast.show { opacity: 1; }

/* 復習ウィジェット */
.review-tracker-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 0.8rem;
    z-index: 100;
    width: 200px;
}
.review-tracker-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
}
.review-tracker-icon { margin-right: 0.5rem; }
.review-tracker-title { flex: 1; font-weight: bold; color: #2d3748; }
.review-tracker-toggle { background: none; border: none; cursor: pointer; font-size: 1rem; color: #666; }
.review-tracker-body { padding: 0.75rem; }
.review-tracker-widget.collapsed .review-tracker-body { display: none; }
.review-tracker-chapter { font-weight: bold; color: #2d3748; margin-bottom: 0.5rem; }
.review-tracker-stat { display: flex; justify-content: space-between; padding: 0.2rem 0; }
.stat-label { color: #666; }
.stat-value { font-weight: 500; }
.status-badge { font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 3px; margin-left: 0.3rem; }
.status-badge.overdue { background: #fee2e2; color: #991b1b; }
.status-badge.today { background: #fef3c7; color: #92400e; }
.status-badge.soon { background: #dbeafe; color: #1e40af; }
.status-badge.ok { background: #dcfce7; color: #166534; }
.review-tracker-actions { margin-top: 0.5rem; display: flex; justify-content: space-between; }
.review-tracker-link { color: #2b6cb0; text-decoration: none; font-size: 0.75rem; }
.review-tracker-clear { background: none; border: none; color: #e53e3e; cursor: pointer; font-size: 0.75rem; }

/* 検索結果 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
}
.search-result-item {
    display: block;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
}
.search-result-item:hover, .search-result-item.selected { background: #f7fafc; }
.search-result-title { font-weight: 500; }
.search-result-title mark { background: #fef3c7; }
.search-result-meta { font-size: 0.75rem; color: #666; margin-top: 0.2rem; }
.search-result-chapter { margin-right: 0.5rem; }
.search-no-results { padding: 1rem; color: #666; text-align: center; }

/* ページナビ */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}
.page-nav a { color: #2b6cb0; text-decoration: none; }
.page-nav a:hover { text-decoration: underline; }

/* ブックマークボタン */
.bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #a0aec0;
    padding: 0 0.3rem;
    transition: transform 0.2s;
}
.bookmark-btn:hover { transform: scale(1.2); }
.bookmark-btn.bookmarked { color: #ecc94b; }

/* ブックマークトースト */
.bookmark-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 300;
}
.bookmark-toast.show { opacity: 1; }
