Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 114x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 8x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 5x 5x 5x 5x 5x 5x 5x 1x 1x 12x 12x 12x 12x 12x 12x 12x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 26x 26x 26x 26x 26x 26x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 3x 3x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 56x 56x 56x 56x 56x 56x 56x 7x 7x 7x 7x 56x 56x 1x 1x 56x 56x 2x 2x 2x 2x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 45x 56x 56x 56x 56x 56x 56x 43x 43x 43x 43x 56x 56x 56x 56x 56x 43x 8x 8x 42x 43x 56x 56x 43x 8x 8x 42x 3x 3x 5x 5x 43x 43x 43x 43x 43x 56x 56x 43x 43x 40x 43x 56x 56x 43x 43x 43x 30x 42x 42x 29x 29x 29x 1x 43x 56x 56x 43x 43x 43x 43x 43x 43x 40x 40x 40x 40x 40x 40x 40x 40x 40x 43x 3x 3x 43x 56x 56x 56x 56x 56x 56x 45x 56x 56x 56x 56x 56x 56x 56x 56x 1x 1x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 56x 1x 1x | <template>
<!--
Match of the Week (SB-1010).
Deliberately a strip and not a billboard. It is never the thing the person
came to this tab for — it sits above Week Navigation as one line and only
opens when asked. Since SB-1639 it shows the pick for the age group (and
pool) the Matches filters are on.
Closed, it withholds the fixture on purpose: one pick a week is small
enough to be worth revealing rather than announcing, and the reveal is the
only bit of theatre the schedule gets. The cost is real — a visitor who
never clicks never learns who was picked — which is why the teaser still
says there IS a pick, and why the picked row downstairs carries its own
amber bar.
-->
<section
class="motw"
:class="{ 'motw--open': expanded }"
data-testid="motw-hero"
:data-state="state"
>
<div class="motw-rail" aria-hidden="true"></div>
<button
type="button"
class="motw-toggle"
data-testid="motw-disclosure"
:aria-expanded="expanded"
aria-controls="motw-panel"
@click="expanded = !expanded"
>
<span class="motw-eyebrow">
<span class="motw-diamond" aria-hidden="true">◆</span>
Match of the Week
</span>
<!--
The age group rides in the closed strip, not just in the expanded
meta line: there is one pick per age group, so the strip says whose
pick it is before anyone opens it.
-->
<span v-if="ageGroupLabel" class="motw-age" data-testid="motw-age">
{{ ageGroupLabel }}
</span>
<span class="motw-teaser">{{ teaser }}</span>
<span
class="motw-chevron"
:class="{ 'motw-chevron--open': expanded }"
aria-hidden="true"
>
▾
</span>
</button>
<div
v-if="expanded"
id="motw-panel"
class="motw-body"
data-testid="motw-panel"
>
<div class="motw-top">
<!--
One status line with three voices. It is never a countdown for a
match that has already been played, which is the mistake that makes
a featured card look abandoned by Monday.
-->
<span class="motw-status" :data-state="state" data-testid="motw-status">
{{ statusLabel }}
</span>
</div>
<div class="motw-fixture">
<div class="motw-side">
<ClubLogo
:logo-url="homeClub.logo_url"
:name="match.home_team_name"
size="lg"
/>
<span
class="motw-team"
:class="{ 'motw-team--beaten': winner === 'away' }"
data-testid="motw-home"
>{{ match.home_team_name }}</span
>
</div>
<div class="motw-middle">
<!--
Played matches show the score, unplayed ones show "vs". A scheduled
match must never render 0–0: that is a result nobody recorded
(CLAUDE.md rule 2).
-->
<span v-if="hasScore" class="motw-score" data-testid="motw-score">
{{ match.home_score }}<span class="motw-dash">–</span
>{{ match.away_score }}
</span>
<span v-else class="motw-vs" data-testid="motw-vs">vs</span>
</div>
<div class="motw-side motw-side--away">
<span
class="motw-team"
:class="{ 'motw-team--beaten': winner === 'home' }"
data-testid="motw-away"
>{{ match.away_team_name }}</span
>
<ClubLogo
:logo-url="awayClub.logo_url"
:name="match.away_team_name"
size="lg"
/>
</div>
</div>
<p v-if="resultLine" class="motw-result" data-testid="motw-result">
{{ resultLine }}
</p>
<p class="motw-meta" data-testid="motw-meta">{{ metaLine }}</p>
<!--
The line that makes the case. It is the only editorial writing in the
product, and it is what fills the "Why it's the match of the week"
panel on the share card — no line, no panel.
Absent renders as absent for everyone; admins additionally get the
way to write one, right here rather than in a settings screen, because
the moment you want to write it is the moment you are looking at the
pick.
-->
<div v-if="editing" class="motw-editor" data-testid="motw-blurb-editor">
<label class="motw-editor-label" :for="editorId">
Why is this the match of the week?
</label>
<textarea
:id="editorId"
ref="editorRef"
v-model="draft"
class="motw-editor-input"
data-testid="motw-blurb-input"
rows="2"
:maxlength="BLURB_MAX"
placeholder="Two unbeaten records, and only one of them leaves with it."
@keydown.esc.stop="cancelEdit"
@keydown.enter.meta.prevent="commit"
@keydown.enter.ctrl.prevent="commit"
></textarea>
<div class="motw-editor-foot">
<span
class="motw-editor-count"
:class="{ 'motw-editor-count--near': remaining <= 40 }"
data-testid="motw-blurb-count"
>
{{ remaining }} left
</span>
<button
type="button"
class="motw-button motw-button--quiet"
data-testid="motw-blurb-cancel"
@click="cancelEdit"
>
Cancel
</button>
<button
type="button"
class="motw-button motw-button--primary"
data-testid="motw-blurb-save"
:disabled="saving"
@click="commit"
>
{{ saving ? 'Saving…' : 'Save line' }}
</button>
</div>
</div>
<template v-else>
<p v-if="blurb" class="motw-blurb" data-testid="motw-blurb">
{{ blurb }}
<button
v-if="canEdit"
type="button"
class="motw-blurb-edit"
data-testid="motw-blurb-edit"
@click="startEdit"
>
Edit
</button>
</p>
<button
v-else-if="canEdit"
type="button"
class="motw-blurb-add"
data-testid="motw-blurb-add"
@click="startEdit"
>
+ Add a line about this match
</button>
</template>
<!--
"Why this is the Match of the Week" (SB-1552, SB-1577). Admins edit it
in place, like the blurb; everyone else sees the list or nothing.
-->
<MotwReasonsEditor
v-if="editingReasons"
:reasons="reasons"
:saving="saving"
@save="$emit('save-reasons', $event)"
@cancel="editingReasons = false"
/>
<template v-else>
<MotwReasons :reasons="reasons" />
<button
v-if="canEdit"
type="button"
class="motw-blurb-add"
data-testid="motw-reasons-edit"
@click="editingReasons = true"
>
{{ hasReasons ? 'Edit reasons' : '+ Add reasons' }}
</button>
</template>
<div class="motw-actions">
<button
type="button"
class="motw-button motw-button--primary"
data-testid="motw-preview"
@click="$emit('preview', match)"
>
{{ hasScore ? 'View match' : 'Preview' }}
</button>
<button
v-if="canShare"
type="button"
class="motw-button"
data-testid="motw-share"
@click="$emit('share', match)"
>
Share to Instagram
</button>
</div>
</div>
</section>
</template>
<script>
import { computed, nextTick, ref, watch } from 'vue';
import ClubLogo from '@/components/shared/ClubLogo.vue';
import MotwReasons from '@/components/MotwReasons.vue';
import MotwReasonsEditor from '@/components/MotwReasonsEditor.vue';
import { hasReasons as reasonsPresent } from '@/utils/featuredReasons';
// Matches the API's own cap (MotwPick.blurb), so the textarea stops where
// the server would have rejected rather than after it.
const BLURB_MAX = 280;
const DAY = 24 * 60 * 60 * 1000;
const HOUR = 60 * 60 * 1000;
export default {
name: 'MotwHero',
components: { ClubLogo, MotwReasons, MotwReasonsEditor },
props: {
match: { type: Object, required: true },
blurb: { type: String, default: null },
// [{text, kind}] or null. null = never provided, [] = provided empty.
reasons: { type: Array, default: null },
// Generating a share card is open to anyone signed in (SB-659), so the
// button is hidden rather than shown-and-failing for logged-out viewers.
canShare: { type: Boolean, default: false },
// Admins can write the editorial line. Everyone else sees it read-only.
canEdit: { type: Boolean, default: false },
saving: { type: Boolean, default: false },
},
emits: ['preview', 'share', 'save-blurb', 'save-reasons'],
setup(props, { emit }) {
const expanded = ref(false);
const editing = ref(false);
const draft = ref('');
const editorRef = ref(null);
const editorId = `motw-blurb-${Math.random().toString(36).slice(2, 8)}`;
const remaining = computed(() => BLURB_MAX - draft.value.length);
const startEdit = async () => {
draft.value = props.blurb || '';
editing.value = true;
await nextTick();
editorRef.value?.focus();
};
const cancelEdit = () => {
editing.value = false;
draft.value = '';
};
const commit = () => {
// Empty means "no line", not "a line that is empty" — the card renders
// the panel on presence, so a blank string would frame nothing.
const trimmed = draft.value.trim();
emit('save-blurb', trimmed === '' ? null : trimmed);
};
// The parent owns the save. When it lands, the new blurb arrives as a
// prop and the editor steps out of the way; a failed save leaves the
// editor open with the text still in it.
watch(
() => props.blurb,
() => {
if (editing.value && !props.saving) cancelEdit();
}
);
const ageGroupLabel = computed(() => {
const name = props.match.age_group_name;
return name && name !== 'Unknown' ? name : null;
});
const homeClub = computed(() => props.match.home_team_club || {});
const awayClub = computed(() => props.match.away_team_club || {});
const state = computed(() => {
const status = props.match.match_status;
if (status === 'live') return 'live';
if (['completed', 'forfeit'].includes(status)) return 'final';
return 'upcoming';
});
// A scheduled match with scores already on it would be a data problem, so
// this asks the status, not the numbers. Both scores must be present:
// one-sided is a half-entered result, not a 0.
const hasScore = computed(
() =>
state.value !== 'upcoming' &&
props.match.home_score !== null &&
props.match.home_score !== undefined &&
props.match.away_score !== null &&
props.match.away_score !== undefined
);
// 'home' | 'away' | 'draw' | null. Null until there is a real result —
// an unplayed match has no winner, and neither does a half-entered one.
const winner = computed(() => {
if (!hasScore.value) return null;
const home = props.match.home_score;
const away = props.match.away_score;
if (home === away) return 'draw';
return home > away ? 'home' : 'away';
});
const resultLine = computed(() => {
if (!winner.value) return null;
const home = props.match.home_score;
const away = props.match.away_score;
if (winner.value === 'draw') {
return `Drew ${home}–${away}`;
}
const name =
winner.value === 'home'
? props.match.home_team_name
: props.match.away_team_name;
const high = Math.max(home, away);
const low = Math.min(home, away);
return `${name} won ${high}–${low}`;
});
const kickoff = computed(() => {
const raw = props.match.scheduled_kickoff;
if (!raw) return null;
const parsed = new Date(raw);
return Number.isNaN(parsed.getTime()) ? null : parsed;
});
const statusLabel = computed(() => {
if (state.value === 'live') return 'Live now';
if (state.value === 'final') return 'Full time';
if (!kickoff.value) return 'Time TBC';
const delta = kickoff.value.getTime() - Date.now();
if (delta <= 0) return 'Kicking off';
if (delta >= DAY) {
const days = Math.round(delta / DAY);
return `Kicks off in ${days} day${days === 1 ? '' : 's'}`;
}
const hours = Math.max(1, Math.round(delta / HOUR));
return `Kicks off in ${hours} hour${hours === 1 ? '' : 's'}`;
});
const metaLine = computed(() => {
// Every part is skipped when absent rather than printed as "Unknown" —
// a featured card is the wrong place to advertise a gap in the data.
const parts = [props.match.age_group_name, props.match.division_name]
.filter(Boolean)
.filter(part => part !== 'Unknown');
if (kickoff.value) {
parts.push(
kickoff.value.toLocaleString(undefined, {
weekday: 'short',
month: 'short',
day: 'numeric',
hour: 'numeric',
minute: '2-digit',
})
);
} else if (props.match.match_date) {
parts.push(props.match.match_date);
}
return parts.join(' · ');
});
// Closed-state copy. Says enough to be worth a click — that there is a
// pick, and roughly when it is — without giving the fixture away.
const teaser = computed(() => {
if (state.value === 'live') return 'Being played right now — reveal';
if (state.value === 'final') return 'Played — reveal the result';
return 'Reveal this week’s pick';
});
const hasReasons = computed(() => reasonsPresent(props.reasons));
// Same contract as the blurb: the save lands as a new prop and the editor
// closes; a failed save leaves it open with the rows intact.
const editingReasons = ref(false);
watch(
() => props.reasons,
() => {
if (editingReasons.value && !props.saving) editingReasons.value = false;
}
);
return {
hasReasons,
editingReasons,
expanded,
teaser,
BLURB_MAX,
editing,
draft,
editorRef,
editorId,
remaining,
startEdit,
cancelEdit,
commit,
ageGroupLabel,
homeClub,
awayClub,
state,
hasScore,
winner,
resultLine,
statusLabel,
metaLine,
};
},
};
</script>
<style scoped>
.motw {
position: relative;
overflow: hidden;
border-radius: 10px;
border: 1px solid rgb(var(--color-line));
background: rgb(var(--color-card));
margin-bottom: 16px;
}
/* Closed, the strip is one row tall and reads as a control. Open, it earns a
little more presence — but never the third of a screen the first version
took. */
.motw--open {
border-color: #f59e0b;
}
.motw-toggle {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
min-height: 44px;
padding: 10px 14px 10px 20px;
background: transparent;
border: 0;
cursor: pointer;
text-align: left;
}
.motw-toggle:hover .motw-age {
flex-shrink: 0;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.06em;
padding: 3px 9px;
border-radius: 5px;
background: #b45309;
color: #ffffff;
}
:global(.dark) .motw-age {
background: #f59e0b;
color: #1f1300;
}
.motw-teaser {
color: rgb(var(--color-fg));
}
.motw-age {
flex-shrink: 0;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.06em;
padding: 3px 9px;
border-radius: 5px;
background: #b45309;
color: #ffffff;
}
:global(.dark) .motw-age {
background: #f59e0b;
color: #1f1300;
}
.motw-teaser {
flex: 1;
font-size: 13px;
color: rgb(var(--color-fg-muted));
min-width: 0;
}
.motw-chevron {
flex-shrink: 0;
font-size: 12px;
color: rgb(var(--color-fg-muted));
transition: transform 0.15s ease;
}
.motw-chevron--open {
transform: rotate(180deg);
}
.motw-rail {
position: absolute;
inset: 0 auto 0 0;
width: 6px;
background: #f59e0b;
}
.motw-body {
position: relative;
padding: 4px 20px 18px 20px;
display: flex;
flex-direction: column;
gap: 10px;
}
.motw-top {
display: flex;
align-items: center;
gap: 16px;
}
.motw-eyebrow {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
font-size: 12px;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #b45309;
margin: 0;
white-space: nowrap;
}
:global(.dark) .motw-eyebrow {
color: #f59e0b;
}
.motw-diamond {
font-size: 10px;
}
.motw-status {
font-size: 12px;
font-weight: 600;
padding: 4px 10px;
border-radius: 999px;
background: rgb(var(--color-surface-alt));
color: rgb(var(--color-fg-muted));
border: 1px solid rgb(var(--color-line));
}
.motw-status[data-state='live'] {
background: #dc2626;
border-color: #dc2626;
color: #ffffff;
}
/* Sides size to their content and sit next to the middle, rather than each
taking half the card and pushing the names to opposite edges. */
.motw-fixture {
display: flex;
align-items: center;
gap: 20px;
flex-wrap: wrap;
}
.motw-side {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.motw-team {
font-size: 19px;
font-weight: 700;
letter-spacing: -0.01em;
color: rgb(var(--color-fg));
overflow-wrap: anywhere;
}
.motw-middle {
flex-shrink: 0;
padding: 0 4px;
}
.motw-vs {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: rgb(var(--color-fg-muted));
}
.motw-score {
font-size: 26px;
font-weight: 800;
letter-spacing: -0.02em;
color: rgb(var(--color-fg));
font-variant-numeric: tabular-nums;
}
.motw-dash {
color: rgb(var(--color-fg-muted));
padding: 0 6px;
}
.motw-result {
margin: 0;
font-size: 15px;
font-weight: 700;
color: rgb(var(--color-fg));
}
/* The beaten side is dimmed rather than the winner being coloured: one
change of weight reads as a result, two competing highlights read as
decoration. */
.motw-team--beaten {
color: rgb(var(--color-fg-muted));
font-weight: 600;
}
.motw-meta {
margin: 0;
font-size: 13px;
color: rgb(var(--color-fg-muted));
}
.motw-blurb {
margin: 0;
font-size: 15px;
line-height: 22px;
color: rgb(var(--color-fg));
max-width: 62ch;
}
.motw-actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
padding-top: 4px;
}
.motw-button {
min-height: 40px;
padding: 0 16px;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
border: 1px solid rgb(var(--color-line));
background: rgb(var(--color-surface-alt));
color: rgb(var(--color-fg));
cursor: pointer;
}
.motw-button:hover {
border-color: #f59e0b;
}
.motw-button--primary {
background: #f59e0b;
border-color: #f59e0b;
/* Amber is a light surface in both themes, so the label stays dark — white
on #F59E0B is 2.1:1 and unreadable. */
color: #1f1300;
}
.motw-button--primary:hover {
background: #d97f06;
border-color: #d97f06;
}
/* --- editorial line -------------------------------------------------- */
.motw-blurb-edit,
.motw-blurb-add {
border: 0;
background: none;
padding: 0;
cursor: pointer;
font-size: 13px;
font-weight: 600;
color: #b45309;
}
:global(.dark) .motw-blurb-edit,
:global(.dark) .motw-blurb-add {
color: #f59e0b;
}
.motw-blurb-edit {
margin-left: 8px;
}
.motw-blurb-add {
align-self: flex-start;
font-size: 14px;
}
.motw-blurb-edit:hover,
.motw-blurb-add:hover {
text-decoration: underline;
}
.motw-editor {
display: flex;
flex-direction: column;
gap: 8px;
}
.motw-editor-label {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgb(var(--color-fg-muted));
}
.motw-editor-input {
width: 100%;
resize: vertical;
padding: 10px 12px;
border-radius: 8px;
border: 1px solid rgb(var(--color-line));
background: rgb(var(--color-surface-alt));
color: rgb(var(--color-fg));
font: inherit;
font-size: 15px;
line-height: 22px;
}
.motw-editor-input:focus {
outline: 2px solid #f59e0b;
outline-offset: 1px;
}
.motw-editor-foot {
display: flex;
align-items: center;
gap: 10px;
}
.motw-editor-count {
flex: 1;
font-size: 12px;
font-variant-numeric: tabular-nums;
color: rgb(var(--color-fg-muted));
}
/* Only speaks up near the limit — a counter shouting from character one is
noise on a field most people fill in twenty words. */
.motw-editor-count--near {
color: #b45309;
font-weight: 600;
}
:global(.dark) .motw-editor-count--near {
color: #f59e0b;
}
.motw-button--quiet {
background: transparent;
}
.motw-button:disabled {
opacity: 0.6;
cursor: default;
}
/* Stack the fixture on narrow screens: three columns of team names at 375px
turns both names into one letter per line. */
@media (max-width: 640px) {
.motw-fixture {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.motw-side--away {
flex-direction: row-reverse;
justify-content: flex-start;
text-align: left;
}
.motw-team {
font-size: 18px;
}
}
</style>
|