/* ==========================================================================
   投稿「いいね」機能 スタイル (News, Gallery, MemberNews)
   ========================================================================== */

/* --- 詳細画面・モーダル向け メインいいねボタン --- */
.post_like_section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem auto 1.5rem auto;
    width: 100%;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.post_like_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.75rem;
    min-width: 130px;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
    border: 2px solid #ff4b72;
    border-radius: 9999px;
    color: #ff3366;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 75, 114, 0.18);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    outline: none;
}

.post_like_btn:hover {
    background: linear-gradient(135deg, #ff4b72 0%, #ff2a55 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 75, 114, 0.35);
    transform: translateY(-2px) scale(1.03);
}

.post_like_btn:active {
    transform: translateY(1px) scale(0.96);
    box-shadow: 0 2px 8px rgba(255, 75, 114, 0.25);
}

.post_like_btn .like_icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
    color: #ff4b72;
    transition: transform 0.15s ease, color 0.2s ease;
}

.post_like_btn:hover .like_icon {
    color: #ffffff;
}

.post_like_btn .like_label {
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}

.post_like_btn .like_count {
    display: inline-block;
    font-size: 1.05rem;
    font-weight: 700;
    min-width: 1.2rem;
    text-align: center;
}

/* --- カード・一覧向け コンパクトいいねバッジ --- */
.card_like_badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 75, 114, 0.25);
    border-radius: 9999px;
    color: #ff4b72;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 2;
}

.card_like_badge:hover {
    background: #ff4b72;
    color: #ffffff;
    border-color: #ff4b72;
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(255, 75, 114, 0.3);
}

.card_like_badge:active {
    transform: scale(0.94);
}

.card_like_badge .like_icon {
    font-size: 0.9rem;
    line-height: 1;
}

.card_like_badge .like_count {
    font-size: 0.8rem;
    font-weight: 700;
}

/* ギャラリーボックス内の配置：写真の右上にオーバーレイ */
.gallery_box .card_like_badge {
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: auto;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.gallery_box {
    position: relative;
}

/* ニュース一覧・限定公開一覧カード内の配置 */
.news_box .card_like_badge {
    position: absolute;
    right: 8px;
    bottom: 8px;
}

.news_box {
    position: relative;
}

/* ギャラリーモーダル内のいいね */
#dialogGallery .modal_like_wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0 0.5rem 0;
    width: 100%;
}

/* --- マイクロアニメーション --- */

/* ハートのポップ・バウンス効果 */
.like_bounce {
    animation: likePop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.4) forwards;
}

@keyframes likePop {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.45);
    }
    70% {
        transform: scale(0.85);
    }
    100% {
        transform: scale(1);
    }
}

/* 連打時に上にフワッと昇って消える「+1」バブル */
.like_floating_bubble {
    position: absolute;
    pointer-events: none;
    font-weight: 700;
    font-size: 1rem;
    color: #ff3366;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
    animation: floatAndFade 0.75s ease-out forwards;
    z-index: 9999;
}

@keyframes floatAndFade {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translate3d(0, -26px, 0) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, -48px, 0) scale(0.9);
    }
}

/* ==========================================================================
   管理画面用 いいねバッジ & いいねユーザー確認ダイアログ
   ========================================================================== */

.admin_like_badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    padding: 0.25rem 0.65rem !important;
    width: auto !important;
    height: auto !important;
    background: #ffffff !important;
    border: 1.5px solid #ff4b72 !important;
    border-radius: 9999px !important;
    color: #e0245e !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    z-index: 1 !important;
    line-height: 1 !important;
}

.admin_like_badge:hover {
    background: #e0245e !important;
    color: #ffffff !important;
    border-color: #e0245e !important;
    transform: translateY(-1px) scale(1.06) !important;
    box-shadow: 0 4px 12px rgba(224, 36, 94, 0.35) !important;
}

.admin_like_badge .like_icon {
    font-size: 0.9rem !important;
    line-height: 1 !important;
    color: #ff3366 !important;
    display: inline-flex !important;
    align-items: center !important;
}

.admin_like_badge:hover .like_icon {
    color: #ffffff !important;
}

.admin_like_badge .like_count {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

/* プレビュー時 無効化スタイル */
.post_like_btn.preview_disabled {
    opacity: 0.55;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
    filter: grayscale(0.2);
}

/* PC管理画面カード内配置：写真の左上に浮かせる */
.news_box.extend .admin_like_badge,
.gallery_box .admin_like_badge {
    position: absolute !important;
    top: 40px !important;
    left: 8px !important;
    bottom: auto !important;
    right: auto !important;
}

/* アプリ版Agentカード内配置：親コンテナを相対配置し、写真の左上に浮かせる */
.agent .news_box .news_image,
.agent_newsedit .news_box .news_image,
.agent_galleryedit .gallery_box .gallery_image,
.agent_membernewsedit .news_box .news_image {
    position: relative !important;
}

.agent .news_box .admin_like_badge,
.agent_newsedit .news_box .admin_like_badge,
.agent_galleryedit .gallery_box .admin_like_badge,
.agent_membernewsedit .news_box .admin_like_badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    bottom: auto !important;
    right: auto !important;
}

/* いいねユーザー確認ダイアログ（共通ダイアログスタイル踏襲） */
#dialogLikeUsers .dialog_content {
    width: 780px !important;
    max-width: 95% !important;
}

#dialogLikeUsers .like_summary_area {
    display: flex;
    gap: 16px;
    margin: 18px 0;
}

#dialogLikeUsers .like_summary_item {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#dialogLikeUsers .summary_label {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 4px;
    white-space: nowrap;
}

#dialogLikeUsers .summary_value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #212529;
    white-space: nowrap;
}

#dialogLikeUsers .summary_value.highlight {
    color: #e0245e;
}

#dialogLikeUsers .like_users_list_area {
    max-height: 340px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

#dialogLikeUsers .user_list_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

#dialogLikeUsers .user_list_table th {
    position: sticky;
    top: 0;
    background: #f1f3f5;
    color: #495057;
    padding: 10px 14px;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    z-index: 1;
    white-space: nowrap;
}

#dialogLikeUsers .user_list_table th.col_likes,
#dialogLikeUsers .user_list_table td.col_likes {
    white-space: nowrap;
    text-align: center;
    width: 130px;
}

#dialogLikeUsers .user_list_table th.col_date,
#dialogLikeUsers .user_list_table td.col_date {
    white-space: nowrap;
    text-align: center;
    width: 160px;
}

#dialogLikeUsers .user_list_table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
    vertical-align: middle;
}

#dialogLikeUsers .user_list_table tr:last-child td {
    border-bottom: none;
}

#dialogLikeUsers .user_list_table tr:hover {
    background-color: #f8f9fa;
}

#dialogLikeUsers .empty_notice {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #888888;
    font-size: 0.88rem;
}


