/* 全球商机查询：页面壳（顶栏/品牌条/左筛选右结果）全部来自站内共用样式 events.css + product-shell.css + product-components.css，
   这里只放本页特有的补充：品牌条第三列的国家切换、阶段徽标配色、结果行里的金额/附件、筛选区折叠与清空按钮、详情抽屉。 */

/* 品牌条：LOGO | 搜索 | 国家切换 */
.opp-brandbar-inner { grid-template-columns: 330px minmax(320px, 720px) auto; }
.opp-brandbar-inner .event-brand-copy { white-space: normal; }
.event-brand-copy small { display: block; margin-top: 3px; max-width: 190px; font-size: 12px; font-weight: 500; line-height: 1.35; opacity: .85; }
.opp-country { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.opp-country button {
    height: 36px; padding: 0 14px; color: #fff; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.45); border-radius: 999px; font-size: 13px; font-weight: 650; white-space: nowrap;
}
.opp-country button.active { color: #24478f; background: #fff; border-color: #fff; box-shadow: 0 5px 18px rgba(20, 42, 89, .16); }
.opp-country button[disabled] { cursor: not-allowed; opacity: .55; }

/* 筛选区补充 */
.opp-filter .rg-filter-options.opp-single { grid-template-columns: minmax(0, 1fr); }
.opp-filter .rg-filter-option > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-filter .rg-filter-option b { margin-left: 4px; color: #8a96a8; font-weight: 500; font-variant-numeric: tabular-nums; }
.opp-filter .opp-more { grid-column: 1 / -1; padding: 2px 0 0; color: var(--rg-primary); background: none; border: 0; text-align: left; font-size: 13px; }
.opp-filter .opp-more:hover { text-decoration: underline; }
.opp-filter-actions { padding: 14px 18px 18px; border-top: 1px solid var(--rg-border); }
.opp-filter-actions button {
    width: 100%; height: 38px; color: #34445d; background: #f6f8fb; border: 1px solid #dce3ed; border-radius: 7px; font-weight: 600;
}
.opp-filter-actions button:hover { color: var(--rg-primary); border-color: #aac0ee; background: var(--rg-primary-soft); }

/* 结果行：沿用 .rg-result-card，阶段徽标按本页七个阶段配色（蓝/红/橙 用共用色，其余补齐） */
.rg-type-badge.opp-demand { color: #4f3a8c; background: #f1ecfc; border-color: #b8a5ea; }
.rg-type-badge.opp-award { color: #1f6a4a; background: #e8f8ef; border-color: #7fd1a8; }
.rg-type-badge.opp-contract { color: #3d3a8a; background: #ecebfa; border-color: #a8a4e6; }
.rg-type-badge.opp-other { color: #4d5a6c; background: #f1f4f8; border-color: #c3ccd8; }
.event-item-content { min-width: 0; }
.event-item h2 a { cursor: pointer; }
.event-item h2 a:hover { color: var(--rg-blue); }
.opp-amount { color: #24478f; font-weight: 700; font-variant-numeric: tabular-nums; }
.opp-amount small { margin-left: 3px; color: #93a0b2; font-weight: 400; }
.event-meta .opp-source { color: #3475ad; }
.event-list .event-state button { cursor: pointer; }

/* 详情抽屉 */
.opp-btn { height: 38px; padding: 0 16px; color: var(--rg-text, #142542); background: #fff; border: 1px solid #cfd8e6; border-radius: 8px; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.opp-btn.primary { color: #fff; background: var(--rg-primary, #3159ad); border-color: var(--rg-primary, #3159ad); }
.opp-btn[disabled] { opacity: .55; cursor: not-allowed; }
.opp-hint { font-size: 12px; color: var(--rg-muted, #748298); }
.opp-state { padding: 40px 16px; text-align: center; color: var(--rg-muted, #748298); font-size: 14px; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: #e8eef7; color: #41546f; white-space: nowrap; }
.badge.demand { background: #f0ecfa; color: #6d4fb3; } .badge.tender { background: #e4f0fb; color: #1a6bb5; } .badge.change { background: #fbf1de; color: #a16b12; }
.badge.award { background: #e3f5ec; color: #0f8a5f; } .badge.failed { background: #fbe8ec; color: #b93b52; } .badge.contract { background: #ecebfa; color: #5b53a8; } .badge.other { background: #eef1f5; color: #6b7788; }
.opp-drawer { position: fixed; top: 0; right: 0; height: 100vh; width: min(720px, 94vw); background: #fff; box-shadow: -12px 0 40px rgba(6,21,47,.25); transform: translateX(105%); transition: transform .25s; z-index: 11000; display: flex; flex-direction: column; }
.opp-drawer.open { transform: translateX(0); }
.opp-scrim { position: fixed; inset: 0; background: rgba(6,21,47,.45); z-index: 10999; display: none; }
.opp-scrim.show { display: block; }
.opp-drawer .d-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--rg-border, #e2e8f1); }
.opp-drawer .d-head h2 { font-size: 18px; line-height: 1.5; margin: 8px 0 6px; }
.opp-drawer .d-tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--rg-muted, #748298); align-items: center; }
.opp-drawer .d-close { float: right; border: 0; background: #eef1f7; border-radius: 50%; width: 32px; height: 32px; font-size: 20px; cursor: pointer; }
.opp-drawer .d-body { overflow: auto; padding: 14px 20px 90px; flex: 1; }
.opp-drawer h3 { font-size: 14px; margin: 18px 0 8px; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rg-border, #e2e8f1); border-radius: 8px; overflow: hidden; }
.d-grid div { padding: 8px 12px; border-bottom: 1px solid var(--rg-border, #e2e8f1); font-size: 13px; min-width: 0; }
.d-grid div:nth-child(odd) { border-right: 1px solid var(--rg-border, #e2e8f1); }
.d-grid label { display: block; color: var(--rg-muted, #748298); font-size: 11px; margin-bottom: 2px; }
.d-grid span { word-break: break-all; }
.d-timeline { display: flex; flex-wrap: wrap; gap: 6px; }
.d-timeline a { border: 1px solid var(--rg-border, #e2e8f1); border-radius: 6px; padding: 6px 8px; font-size: 12px; text-decoration: none; color: var(--rg-text, #142542); max-width: 100%; }
.d-timeline a.current { border-color: var(--rg-primary, #3159ad); background: var(--rg-primary-soft, #edf3ff); }
.d-timeline a .t { display: block; color: var(--rg-muted, #748298); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.d-content { white-space: pre-wrap; word-break: break-word; background: #f6f8fb; border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.7; max-height: 420px; overflow: auto; }
.d-att { list-style: none; padding: 0; margin: 0; }
.d-att li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--rg-border, #e2e8f1); border-radius: 6px; margin-bottom: 6px; font-size: 13px; }
.d-att li .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-att li .s { color: var(--rg-muted, #748298); font-size: 12px; white-space: nowrap; }
.d-att li a { color: var(--rg-primary, #3159ad); }
.d-actions { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 20px; background: #fff; border-top: 1px solid var(--rg-border, #e2e8f1); display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 980px) {
    .opp-brandbar-inner { grid-template-columns: 230px minmax(260px, 1fr) auto; }
}
@media (max-width: 760px) {
    .opp-brandbar-inner { grid-template-columns: 1fr; }
    .opp-country { justify-content: center; }
    .d-grid { grid-template-columns: 1fr; }
    .d-grid div:nth-child(odd) { border-right: 0; }
}
