/* Bib exchange (stage 1) */
.ex-card{display:block;color:inherit;text-decoration:none}
.ex-card .price,.card .price{font-size:22px;font-weight:700;margin:0}
.ex-card p{margin:6px 0}
.ex-race{margin-top:28px}
.ex-race h3{margin-top:18px}
.ex-source{border:0;padding:0;margin:0 0 14px;display:flex;flex-direction:column;gap:8px}
.ex-source label{display:flex;gap:8px;align-items:center}
.ex-error{color:#b42318;min-height:1em}
[hidden]{display:none!important}
/* Chat (stage 2) */
.ex-messages-link{margin:6px 0 14px}
.ex-unread{background:#c7ef3c;color:#062a32}
.ex-preview{margin:6px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ex-thread{display:flex;flex-direction:column;gap:8px;margin:16px 0;max-height:55vh;overflow-y:auto;padding:4px}
.ex-msg{align-self:flex-start;max-width:82%;background:#eef6f5;border-radius:14px 14px 14px 4px;padding:8px 12px}
.ex-msg.mine{align-self:flex-end;background:#087780;color:#fff;border-radius:14px 14px 4px 14px}
.ex-msg p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.ex-msg small{display:block;margin-top:4px;opacity:.7;font-size:11px}
#ex-chat-form textarea{width:100%;box-sizing:border-box;border-radius:12px;padding:10px;font:inherit}
/* Market: one card per race (same look as catalogue cards) */
.ex-race-card{display:flex;cursor:pointer}
.ex-race-card a.race-title{color:inherit;text-decoration:none}
.ex-race-card .race-title{display:block;font-size:22px;font-weight:800;margin:4px 0}
.ex-race-card .ex-from{margin:8px 0 4px}
.ex-race-card .ex-from strong{font-size:22px}
.ex-race-card .ex-cta{display:block;text-align:center;border-radius:999px;padding:12px;margin-top:12px;font-weight:700;text-decoration:none}
.ex-race-head{margin-bottom:18px}
.ex-race-head h1.race-title{font-size:26px;margin:4px 0}
.ex-offer .price{font-size:20px}
/* Deal and rating (stage 4) */
.ex-rating{font-size:13px;font-weight:700;color:#8a5a00;white-space:nowrap}
.ex-rating small{font-weight:400;color:#6b7c7e}
.ex-rating-new{color:#6b7c7e;font-weight:400}
.ex-reviews{margin-top:22px}
.ex-review{border-top:1px solid #e3eeec;padding:10px 0}
.ex-review p{margin:6px 0}
.ex-stars{color:#e0a100;letter-spacing:1px}
.ex-choice{border:0;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:10px}
.ex-choice label{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #d6e7e4;border-radius:12px;cursor:pointer}
.ex-choice label span{display:flex;flex-direction:column;gap:2px}
.ex-star-input{display:inline-flex;flex-direction:row-reverse;gap:4px;margin:4px 0 8px}
.ex-star-input input{position:absolute;opacity:0;width:1px;height:1px}
.ex-star-input label{font-size:34px;line-height:1;color:#cfd8d6;cursor:pointer}
.ex-star-input input:checked~label,.ex-star-input label:hover,.ex-star-input label:hover~label{color:#e0a100}
.ex-star-input input:focus-visible+label{outline:2px solid #087780;border-radius:4px}
.ex-pills{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 10px}
.ex-pill input{position:absolute;opacity:0;width:1px;height:1px}
.ex-pill span{display:inline-block;padding:8px 12px;border:1px solid #cfe2df;border-radius:999px;cursor:pointer}
.ex-pill input:checked+span{background:#087780;color:#fff;border-color:#087780}
.ex-pill input:focus-visible+span{outline:2px solid #087780}
.ex-rate-cta{display:flex;flex-direction:column;gap:10px}
/* Reports and moderation (stage 5) */
.ex-head-links{gap:8px;flex-wrap:wrap}
.ex-report-link{display:block;margin:14px auto 0;font-size:13px;color:#6b7c7e;text-decoration:underline}
.ex-chat-tools{gap:16px;justify-content:center;margin:6px 0 14px}
.ex-chat-tools .text-btn{font-size:13px;color:#6b7c7e;text-decoration:underline}
.ex-banned{background:#fff4e5;color:#6b3d00}
.ex-mod{margin-bottom:12px}
.ex-mod-actions{gap:8px;flex-wrap:wrap;margin-top:8px}
.chip.ex-danger{border-color:#e7b4ae;color:#9b2c1f}
/* Radio choices: the global input style stretches inputs; keep radios small and labels left-aligned */
.ex-choice input[type=radio]{width:auto;min-width:0;height:auto;flex:none;margin:3px 0 0;padding:0;box-shadow:none}
.ex-choice label{justify-content:flex-start;text-align:left}
.ex-choice label span{flex:1;text-align:left}
/* UX feedback round 1 */
.ex-race-card .event-sport,.ex-race-head .event-sport{align-self:flex-end}
.ex-distances{margin:2px 0 6px;font-size:14px;color:#41595b}
.ex-distances strong{color:#0d2b30}
.ex-offer{cursor:pointer}
.ex-offer-seller{color:inherit;font-weight:700;text-decoration:none}
.ex-offer .ex-offer-cta{margin-top:12px;text-decoration:none}
.ex-mod-link{display:block;margin:-8px 0 14px}
.ex-buyers{margin:-4px 0 14px;padding:4px 14px;background:#f4faf8;border:1px solid #e3ebe9;border-radius:16px}
.ex-buyers h3{font-size:13px;margin:10px 0 4px;color:#41595b}
.ex-buyer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border-top:1px solid #e3ebe9;color:inherit;text-decoration:none}
.ex-buyers h3+.ex-buyer{border-top:0}
.ex-buyer-open{font-size:13px;color:#087780;font-weight:700}
.ex-buyers-none{margin:4px 0 14px}
/* Buy / My listings: clearly visible tabs */
.ex-tabs{background:#fff;border:1.5px solid #087780;padding:4px}
.ex-tabs button{font-size:15px;font-weight:700;padding:12px;color:#0d4547}
.ex-tabs .selected{background:#087780;color:#fff;box-shadow:0 3px 10px #08778033}
.ex-race-card .badge.grey,.ex-race-head .badge.grey{align-self:flex-start;margin-top:4px}
/* Bottom bar Messages tab */
.nav-icon-wrap{position:relative;display:inline-flex}
.nav-badge{position:absolute;top:-6px;right:-10px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e52867;color:#fff;font-size:10px;font-weight:800;line-height:18px;text-align:center;box-sizing:border-box}
/* Chat: messenger layout */
.ex-chat-head h1{font-size:24px;margin:0}
.ex-chat-head .ex-chat-tools{display:flex;gap:8px;margin:8px 0 0;justify-content:flex-start}
.ex-tool{font-size:13px;font-weight:600;color:#6b3d00;background:#fff4e5;border-radius:999px;padding:6px 12px}
.ex-tool[data-ex=block]{color:#41595b;background:#eef0f2}
.ex-chat-listing{display:block;margin:4px 0 0;padding:8px 12px;background:#f4faf8;border:1px solid #e3ebe9;border-radius:12px;color:inherit;text-decoration:none;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ex-chat-safety{align-self:center;text-align:center;font-size:12px;color:#6b7c7e;margin:0 8px 6px;line-height:1.4}
.ex-compose{margin:0}
.ex-compose .ex-error:empty{display:none}
.ex-compose .ex-error{margin:0 0 6px;font-size:13px}
.ex-compose-row{display:flex;gap:8px;align-items:flex-end}
#ex-chat-form textarea{flex:1;min-height:44px;max-height:120px;resize:none;border-radius:22px;padding:11px 16px;font-size:16px;line-height:1.3;width:auto}
.ex-send{flex:none;height:44px;padding:0 18px;border-radius:22px;background:#087780;color:#fff;font-weight:700;font-size:15px}
.ex-send:disabled{opacity:.5}
@media (max-width:640px){
  body[data-page=chat] main#main{display:flex;flex-direction:column;overflow:hidden;padding-top:4px;padding-bottom:10px}
  body[data-page=chat] .ex-chat-head,body[data-page=chat] .ex-compose,body[data-page=chat] main#main>.info{flex:none}
  body[data-page=chat] .ex-thread{flex:1 1 auto;min-height:0;max-height:none;margin:10px 0}
}
.ex-legal{text-align:center;font-size:12px;color:#6b7c7e;margin:10px 0 0}
.ex-legal a{color:inherit}
