/**
 * フロントエンドスタイル - SWELL対応
 *
 * @package PrizeInfo
 */

/* ==========================================================================
   商品リスト全体のコンテナ
   ========================================================================== */
.prizeinfo-product-list {
    margin: 2em 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 月セクション */
.prizeinfo-month-section {
    margin-bottom: 3em;
}

.prizeinfo-month-heading {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5em !important;
    padding-bottom: 0.5em;
    border-bottom: 3px solid #4CAF50;
    position: relative;
}

.prizeinfo-month-heading::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #81C784);
}

/* ==========================================================================
   個別商品カード
   ========================================================================== */
.prizeinfo-product {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5em;
    margin-bottom: 2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.prizeinfo-product:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.prizeinfo-product-name {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1em !important;
    line-height: 1.5;
}

/* 商品画像 */
.prizeinfo-product-image {
    text-align: center;
    margin: 1.5em 0;
}

.prizeinfo-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 商品詳細テーブル */
.prizeinfo-product-details {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.prizeinfo-product-details th,
.prizeinfo-product-details td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.prizeinfo-product-details th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    width: 120px;
    white-space: nowrap;
}

.prizeinfo-product-details td {
    background: #fff;
    color: #212529;
}

.prizeinfo-product-details tr:last-child th,
.prizeinfo-product-details tr:last-child td {
    border-bottom: none;
}

/* 引用元リンク（画像の下に小さく表示） */
.prizeinfo-source-link {
    /* スタイルはインラインで設定 */
}

.prizeinfo-source-link a {
    transition: opacity 0.3s ease;
}

.prizeinfo-source-link a:hover {
    opacity: 0.7;
}

/* ==========================================================================
   アンケート機能（独自コンテンツ）
   ========================================================================== */
.prize-survey {
    /* 背景色とスタイルはインラインスタイルで設定 */
}

.prize-survey .survey-question {
    /* スタイルはインラインで設定 */
}

.prize-survey .survey-buttons {
    /* グリッドレイアウトはインラインで設定 */
}

.survey-btn {
    /* 基本スタイルはインラインで設定 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.survey-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

.survey-btn.survey-yes:hover,
.survey-btn.survey-yes.voted {
    background: #4CAF50 !important;
    border-color: #4CAF50 !important;
    color: #fff !important;
}

.survey-btn.survey-no:hover,
.survey-btn.survey-no.voted {
    background: #FF9800 !important;
    border-color: #FF9800 !important;
    color: #fff !important;
}

.survey-btn.voted {
    animation: votedBounce 0.6s ease;
}

@keyframes votedBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.vote-count {
    font-weight: 600;
}

.survey-note {
    /* スタイルはインラインで設定 */
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 768px) {
    .prizeinfo-product {
        padding: 1.2em;
    }

    .prizeinfo-product-details th {
        width: 100px;
        font-size: 0.9em;
    }

    /* スマホでもボタンは2列のまま（グリッドレイアウトで対応済み） */
}

/* ==========================================================================
   SWELL テーマとの互換性
   ========================================================================== */

/* SWELLのスタイルをオーバーライドしない */
.prizeinfo-product-list h2,
.prizeinfo-product-list h4,
.prizeinfo-product-list p,
.prizeinfo-product-list table {
    all: revert;
}

/* エラーメッセージ */
.prizeinfo-error,
.prizeinfo-no-products {
    padding: 1em;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    margin: 1em 0;
}
