/* style.css */

/* ボタンとカウントを囲むコンテナ */
.like-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* いいねボタンの基本スタイル */
.like-button {
    display: inline-flex; /* アイコンとテキストを横並びにする */
    align-items: center;
    justify-content: center;
    gap: 8px; /* アイコンとテキストの間隔 */
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 50px; /* 角を丸くして柔らかい印象に */
    background-color: #fff;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease-in-out; /* 全ての変更を滑らかに */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ボタンにマウスを乗せた時のスタイル */
.like-button:hover:not(:disabled) { /* disabledでない時だけホバーを効かせる */
    transform: translateY(-2px); /* 少し上に浮き上がる */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #aaa;
}

/* ハートアイコンのスタイル */
.heart-icon {
    width: 20px;
    height: 20px;
    stroke: #e74c3c; /* アイコンの線の色（赤色） */
    fill: none; /* 中は透明に */
    transition: all 0.3s ease;
}

/* --- いいね！済みのスタイル --- */

/* いいね！済みのボタン（.liked クラスが付与された時） */
.like-button.liked {
    border-color: #e74c3c;
    color: #e74c3c;
    animation: button-pop 0.3s ease-out; /* ポップするアニメーション */
}

/* いいね！済みのボタン内のハートアイコン */
.like-button.liked .heart-icon {
    fill: #e74c3c; /* ハートの中を赤く塗りつぶす */
    stroke: #e74c3c; /* 線の色も同じ赤に */
}

/* いいね！済みのボタンが無効化された時のスタイル */
.like-button:disabled {
    cursor: default; /* カーソルを通常に */
    opacity: 0.8; /* 少し薄くして押せないことを示す */
}


/* カウント数のスタイル */
.like-count {
    font-size: 18px;
    font-weight: bold;
    color: #555;
    margin-left: 12px;
}

/* ボタンがポップするアニメーションの定義 */
@keyframes button-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}