/**
 * お気に入り機能のスタイル
 */

/* お気に入りボタン */
.favorite-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
    color: #ff9900;
    background: #fff;
    border: 2px solid #ff9900;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    user-select: none;
}

.favorite-btn:hover {
    background: #fff8f0;
    border-color: #ff6600;
    color: #ff6600;
}

.favorite-btn.active {
    color: #fff;
    border-color: #ff9900;
    background: #ff9900;
}

.favorite-btn.active:hover {
    background: #ff6600;
    border-color: #ff6600;
}

/* 記事内のボタン配置（ボタンが左、更新日が右） */
.contents03 .list {
    position: relative;
}

.contents03 .date {
    float: right;
}

.contents03 .favorite-btn {
    float: left;
    margin-top: 0;
}

/* フロートクリア */
.contents03 .list::after {
    content: "";
    display: block;
    clear: both;
}

/* 動画詳細ページのお気に入りボタン（タイトルの上、右寄せ） */
.page-detail-favorite {
    display: block;
    float: right;
    margin: 0 0 5px 0;
    clear: right;
}

/* タイトルは左寄せでボタンの下に配置 */
.page-title {
    clear: left;
    display: block;
}

/* スマホ対応：動画詳細ページのボタン */
@media screen and (max-width: 480px) {
    .page-detail-favorite {
        font-size: 12px;
        padding: 5px 10px;
        margin: 0 0 5px 0;
    }
}

/* すべて削除ボタンのホバーエフェクト */
#clear-all-btn:hover {
    background: #c82333;
}

/* スマホ対応 */
@media screen and (max-width: 480px) {
    #clear-all-btn {
        padding: 8px 20px !important;
        font-size: 13px !important;
    }
}

/* ===== ヘッダー固定とお気に入りリンク（PC版のみ） ===== */

/* モバイルでPC専用要素を非表示 */
@media screen and (max-width: 900px) {
    .pc-only {
        display: none !important;
    }

    /* スマホ版ハンバーガーメニュー内のお気に入りリンク */
    .favorite-menu a {
        font-weight: bold !important;
        color: #ff9900 !important;
    }
}

/* PC版ヘッダー固定 */
@media screen and (min-width: 901px) {
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
    }

    /* ヘッダー固定時のコンテンツ押し下げ */
    body {
        padding-top: 50px !important;
    }

    #contents {
        padding-top: 20px !important;
    }
}

/* お気に入りヘッダーリンク */
#favorite-header-link {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

#favorite-header-link a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #ff9900;
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
}

#favorite-header-link a:hover {
    background: #ff6600;
    transform: scale(1.05);
}

.favorite-icon {
    font-size: 16px;
}

.favorite-text {
    font-size: 14px;
}

.favorite-count {
    display: inline-block;
    min-width: 20px;
    padding: 2px 8px;
    background: #fff;
    color: #ff9900;
    border-radius: 10px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

/* 件数が0件の時は控えめに */
.favorite-count.empty {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}
