/* 日本IT産業入門 - コンポーネント */

/* ブックマークボタン */
.bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #9ca3af;
    padding: 0 0.3rem;
    transition: transform 0.2s ease;
    vertical-align: middle;
}

.bookmark-btn:hover {
    transform: scale(1.2);
}

.bookmark-btn.bookmarked {
    color: #f59e0b;
}

/* トースト通知 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* 学習履歴ウィジェット */
.review-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-width: 280px;
}

.review-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.review-widget-title {
    font-weight: bold;
    font-size: 0.9rem;
    color: #1f2937;
}

.review-widget-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #6b7280;
}

.review-widget-content {
    font-size: 0.85rem;
    color: #4b5563;
}

.review-widget.collapsed .review-widget-content {
    display: none;
}

/* 状態バッジ */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-badge.overdue {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.today {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.soon {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.ok {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.unread {
    background: #f3f4f6;
    color: #6b7280;
}

/* 検索結果ドロップダウン */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #f3f4f6;
}

.search-result-item .title {
    font-weight: bold;
    font-size: 0.85rem;
    color: #1f2937;
}

.search-result-item .chapter {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ブックマーク一覧 */
.bookmark-list {
    list-style: none;
    padding: 0;
}

.bookmark-group {
    margin-bottom: 1.5rem;
}

.bookmark-group-title {
    font-weight: bold;
    color: #1f2937;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #d1d5db;
    margin-bottom: 0.5rem;
}

.bookmark-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.bookmark-item a {
    color: #2563eb;
    flex: 1;
}

.bookmark-item .remove-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

/* 学習履歴一覧 */
.review-list {
    list-style: none;
    padding: 0;
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.review-item-info {
    flex: 1;
}

.review-item-title {
    font-weight: bold;
    color: #1f2937;
}

.review-item-meta {
    font-size: 0.8rem;
    color: #6b7280;
}
