/* ============================================================
   みんなのこえ（voices-section）共有スタイル
   top-page.css から抽出（TOP / 当選報告など複数ページで共有）
   ============================================================ */
/* みんなの声セクション */
.voices-section {
    margin: 24px auto 16px;
    padding: 8px 8px 8px 4px;
    background: #FFEA83;
    display: flex;
    height: 450px;
    max-height: 450px;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.voices-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px;
}

.voices-header {
    display: flex;
    padding: 4px 16px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    background: #FFF;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    width: fit-content;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-icons img {
    height: 40px;
    width: auto;
    display: block;
    animation: bounce 1s ease-in-out infinite;
}

/* 各クッキーに異なるアニメーション遅延を適用 */
.header-icons img:nth-child(1) {
    animation-delay: 0s;
}

.header-icons img:nth-child(2) {
    animation-delay: 0.2s;
}

/* 跳ねるアニメーション */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.voices-container {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    width: 100%;
    justify-content: flex-start;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* スクロールバーを非表示 */
.voices-container::-webkit-scrollbar {
    display: none;
}

.x-embed-wrapper {
    flex: 0 0 auto;
    width: 175px;
    max-width: 175px;
    transform: scale(0.55);
    transform-origin: top left;
}

/* Twitter埋め込み */
.x-embed-wrapper iframe {
    width: 314px !important;
    max-width: 314px !important;
}

/* Twitter blockquoteのマージン調整 */
.x-embed-wrapper .twitter-tweet {
    margin: 0 !important;
}

/* 見つからないツイートを非表示 */
.x-embed-wrapper.tweet-not-found {
    display: none;
}

/* スクロール矢印 */
.voices-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.3s ease;
    pointer-events: auto;
    user-select: none;
}

.voices-scroll-arrow.active {
    display: flex;
}

.voices-scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.voices-scroll-arrow.left {
    left: 8px;
}

.voices-scroll-arrow.right {
    right: 8px;
}

.voices-scroll-arrow svg {
    width: 20px;
    height: 20px;
    fill: #6F6969;
}

/* 追加読み込みローディング */
.voices-loading-more {
    flex: 0 0 auto;
    width: 60px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voices-loading-more .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(111, 105, 105, 0.2);
    border-top-color: #6F6969;
    border-radius: 50%;
    animation: voices-spin 0.8s linear infinite;
}

@keyframes voices-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ループ用複製要素 */
.x-embed-wrapper.loop-clone {
    /* 複製要素は見た目は同じ */
}

/* ============================================================
   PC表示用スタイル（みんなのこえセクション）
   ============================================================ */
@media (min-width: 769px) {
    /* PCではガチャコンテナと同じ幅に制限 */
    .voices-section {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
        border-radius: 12px;
    }

    /* 2投稿表示用に幅を調整 */
    .x-embed-wrapper {
        width: 190px;
        max-width: 190px;
    }

    /* スクロール矢印を常に表示可能に */
    .voices-scroll-arrow {
        opacity: 0.7;
    }

    .voices-scroll-arrow:hover {
        opacity: 1;
    }

    /* 矢印の位置調整 */
    .voices-scroll-arrow.left {
        left: 4px;
    }

    .voices-scroll-arrow.right {
        right: 4px;
    }
}
