/* ================================================================
   ASP Offer Manager — フロントCSS
   ================================================================ */

/* --- 共通 --- */
.aom-label { font-weight: 600; color: #666; }

.aom-offer__btn {
    display: inline-block;
    padding: 10px 24px;
    background: #e8530e;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s;
    text-align: center;
}
.aom-offer__btn:hover { background: #c7440b; }

.aom-link {
    color: #e8530e;
    text-decoration: underline;
    font-weight: 600;
}

/* --- 単一案件: カード --- */
.aom-offer--card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5em 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.aom-offer__header {
    display: flex;
    gap: 16px;
    padding: 16px;
    align-items: flex-start;
}

.aom-offer__img {
    width: 120px;
    height: auto;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: contain;
}

.aom-offer__info { flex: 1; min-width: 0; }

.aom-offer__name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.aom-offer__genre,
.aom-offer__sub {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.aom-offer__genre { background: #e3f2fd; color: #1565c0; }
.aom-offer__sub   { background: #f3e5f5; color: #7b1fa2; }

.aom-offer__payout {
    margin-top: 8px;
}

.aom-payout-value {
    font-size: 22px;
    font-weight: 800;
    color: #e8530e;
}

.aom-offer__approval {
    padding: 8px 16px;
    font-size: 13px;
    color: #555;
    border-top: 1px solid #f0f0f0;
}

.aom-offer__footer {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.aom-offer__footer .aom-offer__btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* --- 単一案件: シンプル --- */
.aom-offer--simple {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin: 1em 0;
    background: #fff;
}

.aom-offer--simple .aom-offer__name { flex: 1; font-weight: 600; }
.aom-offer--simple .aom-offer__payout { font-weight: 700; color: #e8530e; margin-right: 12px; }
.aom-offer--simple .aom-offer__btn { padding: 6px 16px; font-size: 13px; }

/* --- 単一案件: バナー --- */
.aom-offer--banner { margin: 1.5em 0; text-align: center; }
.aom-offer__banner-img { max-width: 100%; height: auto; border-radius: 6px; }

/* --- ランキング: リスト --- */
.aom-ranking { margin: 2em 0; }
.aom-ranking__title { font-size: 20px; font-weight: 700; margin-bottom: 16px; border-bottom: 2px solid #e8530e; padding-bottom: 8px; }

.aom-ranking__list { list-style: none; padding: 0; margin: 0; counter-reset: rank; }

.aom-ranking__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.aom-ranking__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.aom-ranking__item[data-rank="1"] .aom-ranking__rank { background: #ffd700; color: #fff; }
.aom-ranking__item[data-rank="2"] .aom-ranking__rank { background: #c0c0c0; color: #fff; }
.aom-ranking__item[data-rank="3"] .aom-ranking__rank { background: #cd7f32; color: #fff; }

.aom-ranking__body { flex: 1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.aom-ranking__name { flex: 1; font-weight: 600; min-width: 200px; }
.aom-ranking__payout { font-weight: 700; color: #e8530e; font-size: 15px; }
.aom-ranking__link { font-size: 13px; }

/* --- ランキング: カード --- */
.aom-ranking--cards .aom-ranking__card-wrap {
    position: relative;
    margin-bottom: 1em;
}

.aom-ranking__badge {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #e8530e;
    color: #fff;
    padding: 2px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
}

.aom-ranking__card-wrap[data-rank="1"] .aom-ranking__badge { background: #ffd700; color: #333; }
.aom-ranking__card-wrap[data-rank="2"] .aom-ranking__badge { background: #c0c0c0; color: #333; }
.aom-ranking__card-wrap[data-rank="3"] .aom-ranking__badge { background: #cd7f32; color: #fff; }

/* --- テーブル --- */
.aom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.aom-table th,
.aom-table td {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.aom-table thead th {
    background: #f5f5f5;
    font-weight: 700;
}

.aom-table__rank { text-align: center; font-weight: 800; width: 50px; }
.aom-table__payout { font-weight: 700; color: #e8530e; white-space: nowrap; }
.aom-table__link { white-space: nowrap; }

/* --- 比較テーブル --- */
.aom-comparison { margin: 2em 0; overflow-x: auto; }
.aom-comparison__title { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.aom-table--comparison th { background: #fafafa; min-width: 100px; }
.aom-table--comparison td { min-width: 150px; }

/* --- レスポンシブ --- */
@media (max-width: 600px) {
    .aom-offer__header { flex-direction: column; }
    .aom-offer__img { width: 100%; max-width: 200px; }
    .aom-ranking__body { flex-direction: column; align-items: flex-start; gap: 4px; }
    .aom-offer--simple { flex-direction: column; align-items: flex-start; }
}

/* ================================================================
   Business Profile Card v3
   ================================================================ */

/* Card */
.bp-card { border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; margin: 0 0 1em; background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,0.05); }

/* Rank header (h2 with business name) */
.bp-rank-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%); border-radius: 10px 10px 0 0; border: 1px solid #ddd; border-bottom: none; }
.bp-rank-top { background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%); }
.bp-rank-1 { background: linear-gradient(135deg, #FFF8DC 0%, #FFD700 100%); }
.bp-rank-2 { background: linear-gradient(135deg, #f0f0f0 0%, #C0C0C0 100%); }
.bp-rank-3 { background: linear-gradient(135deg, #FFF0E6 0%, #CD7F32 100%); }
.bp-rank-num { font-size: 24px; font-weight: 900; white-space: nowrap; }
.bp-rank-name { font-size: 20px; font-weight: 800; color: #1a1a2e; }
.bp-rank-header + .bp-card { border-radius: 0 0 10px 10px; border-top: none; margin-top: 0; }

/* Header (catch copy only) */
.bp-header { padding: 8px 12px 2px; }
.bp-catch { font-size: 16px; color: #e8530e; font-weight: 700; margin: 0; line-height: 1.4; }

/* Image */
.bp-image-area { text-align: center; padding: 2px 12px 4px; }
.bp-image { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid #f0f0f0; }

/* URL */
.bp-url-area { text-align: center; padding: 2px 12px 6px; }
.bp-official-url { font-size: 12px; color: #0073aa; text-decoration: none; }
.bp-official-url:hover { text-decoration: underline; }

/* Specs grid */
.bp-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #f0f0f0; margin: 0 10px; border-radius: 6px; overflow: hidden; }
.bp-spec { background: #fff; padding: 6px 8px; text-align: center; }
.bp-spec-label { display: block; font-size: 10px; color: #888; margin-bottom: 2px; }
.bp-spec-value { font-size: 14px; font-weight: 700; color: #333; }
.bp-highlight { color: #e8530e; font-size: 16px; }

/* Pay area */
.bp-pay-area { padding: 6px 12px 2px; }
.bp-pay-section { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid #f5f5f5; }
.bp-pay-section:first-child { border-top: none; }
.bp-pay-label { font-size: 11px; color: #666; font-weight: 600; white-space: nowrap; min-width: 80px; flex-shrink: 0; }
.bp-pay-icons { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bp-pay-icon { display: inline-block; vertical-align: middle; }
.bp-pay-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }

/* Description */
.bp-description { padding: 8px 12px; font-size: 13px; line-height: 1.8; color: #444; border-top: 1px solid #f0f0f0; }
.bp-description p { margin: 0 0 8px !important; padding: 0 !important; }
.bp-description p:last-child { margin-bottom: 0 !important; }
.bp-description strong { color: #1a1a2e; }

/* Author comment */
.bp-author-comment { display: flex; gap: 10px; padding: 10px 12px; background: #f8f9fa; border-top: 1px solid #f0f0f0; align-items: flex-start; }
.bp-author-avatar { flex-shrink: 0; }
.bp-author-avatar img { border-radius: 50%; border: 2px solid #ddd; }
.bp-author-bubble { position: relative; background: #fff; border: 1px solid #ddd; border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.6; color: #555; flex: 1; }
.bp-author-bubble::before { content: ''; position: absolute; left: -7px; top: 12px; width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-right: 7px solid #ddd; }
.bp-author-bubble::after { content: ''; position: absolute; left: -6px; top: 13px; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 6px solid #fff; }

/* CTA */
.bp-cta { padding: 8px 12px; text-align: center; }
.bp-cta-btn { display: block; padding: 12px 20px; background: #e8530e; color: #fff !important; text-decoration: none !important; border-radius: 8px; font-weight: 800; font-size: 15px; transition: background 0.2s; text-align: center; }
.bp-cta-btn:hover { background: #c7440b; }

/* Reviews section */
.bp-reviews-section { border-top: 1px solid #f0f0f0; }
.bp-reviews-title { font-size: 14px; font-weight: 700; padding: 10px 12px 4px; color: #333; border-bottom: 1px dashed #e0e0e0; margin: 0 12px; padding-left: 0; }
.bp-review { display: flex; gap: 10px; padding: 10px 12px; border-top: 1px solid #f5f5f5; align-items: flex-start; }
.bp-review:first-of-type { border-top: none; }
.bp-review-avatar { width: 40px; height: 40px; min-width: 40px; border-radius: 50%; flex-shrink: 0; border: 2px solid #e0e0e0; }
.bp-review-meta { flex: 1; min-width: 0; }
.bp-review-info { font-size: 12px; color: #666; display: block; }
.bp-review-stars { font-size: 13px; letter-spacing: 1px; display: block; margin: 1px 0 4px; }
.bp-review-body { font-size: 13px; line-height: 1.6; color: #555; margin: 4px 0 0; }

/* Ranking wrapper */
.bp-ranking { margin: 1.5em 0; }
.bp-ranking-title { font-size: 20px; font-weight: 800; border-bottom: 3px solid #e8530e; padding-bottom: 6px; margin-bottom: 14px; }
.bp-ranking-item { margin-bottom: 14px; }

/* Bottom CTA */
.bp-cta-bottom { padding: 0 12px 12px; text-align: center; }

/* Responsive — スマホでも横並び維持 */
@media (max-width: 600px) {
  .bp-specs { grid-template-columns: repeat(2, 1fr); }
  /* 著者コメント: 横並び維持 */
  .bp-author-comment { flex-direction: row; align-items: flex-start; }
  .bp-author-avatar img { width: 40px; height: 40px; }
  .bp-author-bubble { font-size: 12px; }
  /* クチコミ: 横並び維持 */
  .bp-review { flex-direction: row; align-items: flex-start; }
  .bp-review-avatar { width: 38px; height: 38px; min-width: 38px; }
  .bp-review-info { font-size: 11px; }
  .bp-review-body { font-size: 12px; }
  /* ランキング見出し: 横並び維持 */
  .bp-rank-header { flex-direction: row; gap: 8px; }
  .bp-rank-num { font-size: 18px; }
  .bp-rank-name { font-size: 16px; }
  /* 対応カード: 中央揃え */
  .bp-pay-section { flex-direction: column; align-items: center; text-align: center; }
  .bp-pay-icons { justify-content: center; }
}
