/**
 * 広告スロット・関連UIのスタイル
 * assets/css/ad-styles.css
 * 
 * Phase 1-2: 広告枠レイアウト + プレースホルダー
 */

/* ========================================
   広告スロット共通
   ======================================== */

.ad-slot {
    width: 100%;
    text-align: center;
    overflow: hidden;
    margin: 16px 0;
}

.ad-slot-home_top {
    margin-top: 0;
    margin-bottom: 20px;
}

.ad-slot-home_bottom {
    margin-top: 30px;
    margin-bottom: 0;
}

.ad-slot-result_top {
    margin-bottom: 16px;
}

.ad-slot-result_bottom {
    margin-top: 20px;
}

.ad-slot-title_infeed {
    margin: 12px 0;
}

/* ========================================
   プレースホルダー（開発・審査中用）
   ======================================== */

.ad-placeholder {
    border: 2px dashed #CFD8DC;
    border-radius: 8px;
    background: #FAFAFA;
}

.ad-placeholder-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    color: #90A4AE;
    font-size: 13px;
}

.ad-placeholder-icon {
    font-size: 20px;
}

.ad-placeholder-label {
    font-weight: bold;
    color: #78909C;
}

.ad-placeholder-info {
    font-size: 11px;
    background: #ECEFF1;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ========================================
   関連商品レコメンド（結果画面用）
   ======================================== */

.ad-product-recommendations {
    margin-top: 20px;
    padding: 16px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 10px;
}

.ad-recommendations-title {
    font-size: 14px;
    font-weight: bold;
    color: #F57F17;
    margin: 0 0 12px 0;
    text-align: center;
}

.ad-recommendations-grid {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.ad-product-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #FFE082;
    border-radius: 8px;
    font-size: 13px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ad-product-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.ad-product-icon {
    font-size: 20px;
}

.ad-product-name {
    font-weight: bold;
    color: #424242;
}

.ad-product-link {
    padding: 3px 10px;
    background: #FF9800;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    transition: background 0.2s;
}

.ad-product-link:hover {
    background: #F57C00;
}

.ad-product-link-rakuten {
    background: #BF0000;
}

.ad-product-link-rakuten:hover {
    background: #9C0000;
}

/* ========================================
   有料プラン誘導バナー
   ======================================== */

.ad-upgrade-banner {
    margin: 20px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #E3F2FD 0%, #F3E5F5 100%);
    border: 1px solid #CE93D8;
    border-radius: 10px;
}

.ad-upgrade-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.ad-upgrade-icon {
    font-size: 28px;
}

.ad-upgrade-text {
    flex: 1;
}

.ad-upgrade-text strong {
    display: block;
    font-size: 14px;
    color: #4A148C;
    margin-bottom: 2px;
}

.ad-upgrade-text p {
    margin: 0;
    font-size: 12px;
    color: #7B1FA2;
}

.ad-upgrade-button {
    padding: 8px 20px;
    background: linear-gradient(135deg, #7B1FA2, #9C27B0);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ad-upgrade-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(123, 31, 162, 0.4);
}

/* ========================================
   ユーザーTierバッジ（ヘッダー用）
   ======================================== */

.user-tier-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 6px;
    vertical-align: middle;
}

.user-tier-badge.tier-guest {
    background: rgba(255, 255, 255, 0.2);
    color: #E0E0E0;
}

.user-tier-badge.tier-free {
    background: rgba(33, 150, 243, 0.2);
    color: #BBDEFB;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.user-tier-badge.tier-paid {
    background: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.4);
}

/* ========================================
   フッター: アフィリエイト表記
   ======================================== */

.footer-affiliate-notice {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #455A64;
    font-size: 11px;
    color: #78909C;
}

.footer-affiliate-notice a {
    color: #90CAF9;
    text-decoration: none;
}

.footer-affiliate-notice a:hover {
    text-decoration: underline;
}

/* ========================================
   レスポンシブ
   ======================================== */

@media (max-width: 768px) {
    .ad-placeholder-inner {
        flex-direction: column;
        gap: 4px;
        padding: 12px;
    }
    
    .ad-recommendations-grid {
        flex-direction: column;
    }
    
    .ad-product-card {
        justify-content: center;
    }
    
    .ad-upgrade-content {
        flex-direction: column;
        text-align: center;
    }
}
