Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c93c9035ae | |||
| c876a80b7e |
File diff suppressed because one or more lines are too long
+26
-48
@@ -1,5 +1,5 @@
|
|||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
import { useEffect, useCallback } from 'preact/hooks';
|
import { useCallback } from 'preact/hooks';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
useGameState,
|
useGameState,
|
||||||
@@ -10,8 +10,9 @@ import {
|
|||||||
useCompletionModal,
|
useCompletionModal,
|
||||||
} from '@lib/state';
|
} from '@lib/state';
|
||||||
import { GameService } from '@lib/data/gameService';
|
import { GameService } from '@lib/data/gameService';
|
||||||
import type { StandardGame, Game, EndlosGame } from '@lib/domain/types';
|
import type { StandardGame, Game, EndlosGame, GameSetupData } from '@lib/domain/types';
|
||||||
import { isEndlosGame } from '@lib/domain/gameUtils';
|
import { applySetupData, isEndlosGame, isStandardGame } from '@lib/domain/gameUtils';
|
||||||
|
import { validateGameSetupData } from '@lib/domain/validation';
|
||||||
|
|
||||||
import { Layout } from '@lib/ui/Layout';
|
import { Layout } from '@lib/ui/Layout';
|
||||||
import GameListScreen from './screens/GameListScreen';
|
import GameListScreen from './screens/GameListScreen';
|
||||||
@@ -34,51 +35,6 @@ export default function App() {
|
|||||||
const validationModal = useValidationModal();
|
const validationModal = useValidationModal();
|
||||||
const completionModal = useCompletionModal();
|
const completionModal = useCompletionModal();
|
||||||
|
|
||||||
// Keep layout height stable when the virtual keyboard opens on cheap Android tablets.
|
|
||||||
useEffect(() => {
|
|
||||||
const root = document.documentElement;
|
|
||||||
let rafId = 0;
|
|
||||||
let orientationTimer1 = 0;
|
|
||||||
let orientationTimer2 = 0;
|
|
||||||
|
|
||||||
const updateViewportVars = () => {
|
|
||||||
cancelAnimationFrame(rafId);
|
|
||||||
rafId = requestAnimationFrame(() => {
|
|
||||||
const viewport = window.visualViewport;
|
|
||||||
const layoutHeight = window.innerHeight;
|
|
||||||
const appHeight = viewport?.height ?? layoutHeight;
|
|
||||||
const keyboardOffset = viewport
|
|
||||||
? Math.max(0, layoutHeight - viewport.height - viewport.offsetTop)
|
|
||||||
: 0;
|
|
||||||
|
|
||||||
root.style.setProperty('--app-height', `${Math.round(appHeight)}px`);
|
|
||||||
root.style.setProperty('--keyboard-offset', `${Math.round(keyboardOffset)}px`);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleOrientationChange = () => {
|
|
||||||
updateViewportVars();
|
|
||||||
orientationTimer1 = window.setTimeout(updateViewportVars, 100);
|
|
||||||
orientationTimer2 = window.setTimeout(updateViewportVars, 350);
|
|
||||||
};
|
|
||||||
|
|
||||||
updateViewportVars();
|
|
||||||
window.addEventListener('resize', updateViewportVars);
|
|
||||||
window.addEventListener('orientationchange', handleOrientationChange);
|
|
||||||
window.visualViewport?.addEventListener('resize', updateViewportVars);
|
|
||||||
window.visualViewport?.addEventListener('scroll', updateViewportVars);
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
cancelAnimationFrame(rafId);
|
|
||||||
window.clearTimeout(orientationTimer1);
|
|
||||||
window.clearTimeout(orientationTimer2);
|
|
||||||
window.removeEventListener('resize', updateViewportVars);
|
|
||||||
window.removeEventListener('orientationchange', handleOrientationChange);
|
|
||||||
window.visualViewport?.removeEventListener('resize', updateViewportVars);
|
|
||||||
window.visualViewport?.removeEventListener('scroll', updateViewportVars);
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
// Game lifecycle handlers
|
// Game lifecycle handlers
|
||||||
const handleCreateGame = useCallback(async (gameData: any) => {
|
const handleCreateGame = useCallback(async (gameData: any) => {
|
||||||
try {
|
try {
|
||||||
@@ -141,6 +97,27 @@ export default function App() {
|
|||||||
}
|
}
|
||||||
}, [navigation.currentGameId, gameState.getGameById, gameState.updateGame, validationModal.showValidation]);
|
}, [navigation.currentGameId, gameState.getGameById, gameState.updateGame, validationModal.showValidation]);
|
||||||
|
|
||||||
|
const handleUpdateGameSetup = useCallback(async (setupData: GameSetupData) => {
|
||||||
|
if (!navigation.currentGameId) return;
|
||||||
|
|
||||||
|
const game = gameState.getGameById(navigation.currentGameId);
|
||||||
|
if (!game || !isStandardGame(game)) return;
|
||||||
|
|
||||||
|
const validation = validateGameSetupData(setupData);
|
||||||
|
if (!validation.isValid) {
|
||||||
|
validationModal.showValidation(validation.errors.join('\n'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const updatedGame = applySetupData(game, setupData);
|
||||||
|
await gameState.updateGame(navigation.currentGameId, updatedGame);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Failed to update game setup:', error);
|
||||||
|
validationModal.showValidation('Spieleinstellungen konnten nicht gespeichert werden.');
|
||||||
|
}
|
||||||
|
}, [navigation.currentGameId, gameState.getGameById, gameState.updateGame, validationModal.showValidation]);
|
||||||
|
|
||||||
const handleForfeit = async () => {
|
const handleForfeit = async () => {
|
||||||
if (!navigation.currentGameId) return;
|
if (!navigation.currentGameId) return;
|
||||||
|
|
||||||
@@ -294,6 +271,7 @@ export default function App() {
|
|||||||
onUndo={handleUndo}
|
onUndo={handleUndo}
|
||||||
onForfeit={handleForfeit}
|
onForfeit={handleForfeit}
|
||||||
onBack={navigation.showGameList}
|
onBack={navigation.showGameList}
|
||||||
|
onUpdateGameSetup={handleUpdateGameSetup}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* FullscreenToggle — top-right keeps bottom controls clear on scoreboard */
|
/* FullscreenToggle — top-right keeps bottom controls clear on scoreboard */
|
||||||
.fullscreenToggle {
|
.fullscreenToggle {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: calc(var(--space-md) + var(--safe-area-top));
|
top: calc(var(--space-md) + var(--safe-area-top));
|
||||||
right: calc(var(--space-md) + var(--safe-area-right));
|
right: calc(var(--space-md) + var(--safe-area-right));
|
||||||
width: var(--touch-target-comfortable);
|
width: var(--touch-target-comfortable);
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ const FullscreenToggle = () => {
|
|||||||
// Toggle fullscreen mode for the document
|
// Toggle fullscreen mode for the document
|
||||||
const handleToggle = useCallback(() => {
|
const handleToggle = useCallback(() => {
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
document.documentElement.requestFullscreen();
|
document.documentElement.requestFullscreen().catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
document.exitFullscreen();
|
document.exitFullscreen().catch(() => {});
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
import { Screen } from '@lib/ui/Layout';
|
import { Screen } from '@lib/ui/Layout';
|
||||||
import GameDetail from '@lib/features/game-detail/GameDetail';
|
import GameDetail from '@lib/features/game-detail/GameDetail';
|
||||||
import type { Game, EndlosGame } from '@lib/domain/types';
|
import type { Game, EndlosGame, GameSetupData } from '@lib/domain/types';
|
||||||
|
|
||||||
interface GameDetailScreenProps {
|
interface GameDetailScreenProps {
|
||||||
game?: Game;
|
game?: Game;
|
||||||
@@ -11,6 +11,7 @@ interface GameDetailScreenProps {
|
|||||||
onUndo: () => void;
|
onUndo: () => void;
|
||||||
onForfeit: () => void;
|
onForfeit: () => void;
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
|
onUpdateGameSetup?: (setupData: GameSetupData) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function GameDetailScreen({
|
export default function GameDetailScreen({
|
||||||
@@ -21,6 +22,7 @@ export default function GameDetailScreen({
|
|||||||
onUndo,
|
onUndo,
|
||||||
onForfeit,
|
onForfeit,
|
||||||
onBack,
|
onBack,
|
||||||
|
onUpdateGameSetup,
|
||||||
}: GameDetailScreenProps) {
|
}: GameDetailScreenProps) {
|
||||||
if (!game) {
|
if (!game) {
|
||||||
return (
|
return (
|
||||||
@@ -40,6 +42,7 @@ export default function GameDetailScreen({
|
|||||||
onUndo={onUndo}
|
onUndo={onUndo}
|
||||||
onForfeit={onForfeit}
|
onForfeit={onForfeit}
|
||||||
onBack={onBack}
|
onBack={onBack}
|
||||||
|
onUpdateGameSetup={onUpdateGameSetup}
|
||||||
/>
|
/>
|
||||||
</Screen>
|
</Screen>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ export const VALIDATION_MESSAGES = {
|
|||||||
RACE_TO_REQUIRED: 'Race-to Wert ist erforderlich',
|
RACE_TO_REQUIRED: 'Race-to Wert ist erforderlich',
|
||||||
RACE_TO_INVALID: 'Race-to Wert muss eine positive Zahl sein',
|
RACE_TO_INVALID: 'Race-to Wert muss eine positive Zahl sein',
|
||||||
DUPLICATE_PLAYER_NAMES: 'Spielernamen müssen eindeutig sein',
|
DUPLICATE_PLAYER_NAMES: 'Spielernamen müssen eindeutig sein',
|
||||||
|
SCORE_INVALID: 'Punkte müssen ganze Zahlen ≥ 0 sein',
|
||||||
|
BREAK_RULE_REQUIRED: 'Break-Regel ist erforderlich',
|
||||||
|
BREAK_ORDER_INVALID: 'Break-Reihenfolge ist ungültig',
|
||||||
|
CURRENT_BREAKER_INVALID: 'Aktueller Breaker ist ungültig',
|
||||||
|
RACE_TO_BELOW_SCORE: 'Race-to muss mindestens dem höchsten Punktestand entsprechen',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const BREAKPOINTS = {
|
export const BREAKPOINTS = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Game, StandardGame, EndlosGame } from './types';
|
import type { Game, GameSetupData, StandardGame, EndlosGame } from './types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Game utility functions for common operations
|
* Game utility functions for common operations
|
||||||
@@ -12,6 +12,97 @@ export function isStandardGame(game: Game): game is StandardGame {
|
|||||||
return !('players' in game);
|
return !('players' in game);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setupActivePlayerCount(data: GameSetupData): number {
|
||||||
|
return data.player3?.trim() ? 3 : 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
function defaultBreakOrder(playerCount: number): number[] {
|
||||||
|
return playerCount === 3 ? [1, 2, 3] : [1, 2];
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeBreakFields(
|
||||||
|
data: GameSetupData,
|
||||||
|
playerCount: number,
|
||||||
|
): { breakOrder: number[]; currentBreakerIdx: number } {
|
||||||
|
const expectedPlayers = playerCount === 3 ? [1, 2, 3] : [1, 2];
|
||||||
|
const order = data.breakOrder ?? [];
|
||||||
|
const orderValid =
|
||||||
|
order.length === playerCount &&
|
||||||
|
new Set(order).size === playerCount &&
|
||||||
|
order.every((p) => expectedPlayers.includes(p)) &&
|
||||||
|
expectedPlayers.every((p) => order.includes(p));
|
||||||
|
|
||||||
|
if (!orderValid) {
|
||||||
|
return { breakOrder: defaultBreakOrder(playerCount), currentBreakerIdx: 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
const idx = data.currentBreakerIdx;
|
||||||
|
if (!Number.isInteger(idx) || idx < 0 || idx >= order.length) {
|
||||||
|
return { breakOrder: order, currentBreakerIdx: 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
return { breakOrder: order, currentBreakerIdx: idx };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function gameToSetupData(game: StandardGame): GameSetupData {
|
||||||
|
const playerCount = game.player3?.trim() ? 3 : 2;
|
||||||
|
const breakOrder = game.breakOrder ?? defaultBreakOrder(playerCount);
|
||||||
|
|
||||||
|
return {
|
||||||
|
player1: game.player1,
|
||||||
|
player2: game.player2,
|
||||||
|
player3: game.player3,
|
||||||
|
score1: game.score1,
|
||||||
|
score2: game.score2,
|
||||||
|
score3: game.score3,
|
||||||
|
gameType: game.gameType,
|
||||||
|
raceTo: game.raceTo,
|
||||||
|
breakRule: game.breakRule ?? 'winnerbreak',
|
||||||
|
breakOrder,
|
||||||
|
currentBreakerIdx: game.currentBreakerIdx ?? 0,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export function applySetupData(game: StandardGame, data: GameSetupData): StandardGame {
|
||||||
|
const playerCount = setupActivePlayerCount(data);
|
||||||
|
const { breakOrder, currentBreakerIdx } = normalizeBreakFields(data, playerCount);
|
||||||
|
|
||||||
|
const scores = [data.score1, data.score2];
|
||||||
|
if (playerCount === 3) {
|
||||||
|
scores.push(data.score3 ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
let status = game.status;
|
||||||
|
if (data.raceTo !== Infinity && scores.some((score) => score >= data.raceTo)) {
|
||||||
|
status = 'completed';
|
||||||
|
}
|
||||||
|
|
||||||
|
const updated: StandardGame = {
|
||||||
|
...game,
|
||||||
|
player1: data.player1.trim(),
|
||||||
|
player2: data.player2.trim(),
|
||||||
|
score1: data.score1,
|
||||||
|
score2: data.score2,
|
||||||
|
gameType: data.gameType,
|
||||||
|
raceTo: data.raceTo,
|
||||||
|
breakRule: data.breakRule,
|
||||||
|
breakOrder,
|
||||||
|
currentBreakerIdx,
|
||||||
|
status,
|
||||||
|
updatedAt: new Date().toISOString(),
|
||||||
|
};
|
||||||
|
|
||||||
|
if (playerCount === 3 && data.player3?.trim()) {
|
||||||
|
updated.player3 = data.player3.trim();
|
||||||
|
updated.score3 = data.score3 ?? 0;
|
||||||
|
} else {
|
||||||
|
delete updated.player3;
|
||||||
|
delete updated.score3;
|
||||||
|
}
|
||||||
|
|
||||||
|
return updated;
|
||||||
|
}
|
||||||
|
|
||||||
export function formatGameTime(dateString: string): string {
|
export function formatGameTime(dateString: string): string {
|
||||||
const date = new Date(dateString);
|
const date = new Date(dateString);
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|||||||
@@ -71,4 +71,18 @@ export interface NewGameData {
|
|||||||
|
|
||||||
export type NewGameStep = 'player1' | 'player2' | 'player3' | 'gameType' | 'raceTo' | 'breakRule' | 'breakOrder' | null;
|
export type NewGameStep = 'player1' | 'player2' | 'player3' | 'gameType' | 'raceTo' | 'breakRule' | 'breakOrder' | null;
|
||||||
|
|
||||||
|
export interface GameSetupData {
|
||||||
|
player1: string;
|
||||||
|
player2: string;
|
||||||
|
player3?: string;
|
||||||
|
score1: number;
|
||||||
|
score2: number;
|
||||||
|
score3?: number;
|
||||||
|
gameType: GameType;
|
||||||
|
raceTo: number;
|
||||||
|
breakRule: BreakRule;
|
||||||
|
breakOrder: number[];
|
||||||
|
currentBreakerIdx: number;
|
||||||
|
}
|
||||||
|
|
||||||
export type GameFilter = 'all' | 'active' | 'completed';
|
export type GameFilter = 'all' | 'active' | 'completed';
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { APP_CONFIG, VALIDATION_MESSAGES } from './constants';
|
import { APP_CONFIG, VALIDATION_MESSAGES } from './constants';
|
||||||
import type { NewGameData } from './types';
|
import type { GameSetupData, NewGameData } from './types';
|
||||||
|
|
||||||
export interface ValidationResult {
|
export interface ValidationResult {
|
||||||
isValid: boolean;
|
isValid: boolean;
|
||||||
@@ -80,6 +80,84 @@ export function sanitizePlayerName(name: string): string {
|
|||||||
.replace(/[^\w\s-]/g, ''); // Remove special characters except spaces and hyphens
|
.replace(/[^\w\s-]/g, ''); // Remove special characters except spaces and hyphens
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function activePlayerCountFromSetup(data: GameSetupData): number {
|
||||||
|
return data.player3?.trim() ? 3 : 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isValidScore(value: number | undefined, required: boolean): boolean {
|
||||||
|
if (value === undefined) return !required;
|
||||||
|
return Number.isInteger(value) && value >= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function validateGameSetupData(data: GameSetupData): ValidationResult {
|
||||||
|
const errors: string[] = [];
|
||||||
|
|
||||||
|
const player1Validation = validatePlayerName(data.player1);
|
||||||
|
const player2Validation = validatePlayerName(data.player2);
|
||||||
|
errors.push(...player1Validation.errors);
|
||||||
|
errors.push(...player2Validation.errors);
|
||||||
|
|
||||||
|
const playerNames = [data.player1.trim(), data.player2.trim()];
|
||||||
|
const hasThirdPlayer = Boolean(data.player3?.trim());
|
||||||
|
|
||||||
|
if (hasThirdPlayer) {
|
||||||
|
const player3Validation = validatePlayerName(data.player3!);
|
||||||
|
errors.push(...player3Validation.errors);
|
||||||
|
playerNames.push(data.player3!.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
const nonEmptyNames = playerNames.filter((name) => name.length > 0);
|
||||||
|
if (new Set(nonEmptyNames).size !== nonEmptyNames.length) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.DUPLICATE_PLAYER_NAMES);
|
||||||
|
}
|
||||||
|
|
||||||
|
const thirdScoreRequired = hasThirdPlayer;
|
||||||
|
if (!isValidScore(data.score1, true) || !isValidScore(data.score2, true) || !isValidScore(data.score3, thirdScoreRequired)) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.SCORE_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data.gameType) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.GAME_TYPE_REQUIRED);
|
||||||
|
}
|
||||||
|
|
||||||
|
const raceTo = data.raceTo;
|
||||||
|
if (raceTo !== Infinity && (!Number.isInteger(raceTo) || raceTo <= 0)) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.RACE_TO_INVALID);
|
||||||
|
} else if (raceTo !== Infinity) {
|
||||||
|
const maxScore = Math.max(data.score1, data.score2, data.score3 ?? 0);
|
||||||
|
if (raceTo < maxScore) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.RACE_TO_BELOW_SCORE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data.breakRule) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.BREAK_RULE_REQUIRED);
|
||||||
|
}
|
||||||
|
|
||||||
|
const activeCount = activePlayerCountFromSetup(data);
|
||||||
|
const expectedPlayers = activeCount === 3 ? [1, 2, 3] : [1, 2];
|
||||||
|
const order = data.breakOrder ?? [];
|
||||||
|
const orderValid =
|
||||||
|
order.length === activeCount &&
|
||||||
|
new Set(order).size === activeCount &&
|
||||||
|
order.every((p) => expectedPlayers.includes(p)) &&
|
||||||
|
expectedPlayers.every((p) => order.includes(p));
|
||||||
|
|
||||||
|
if (!orderValid) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.BREAK_ORDER_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
|
const breakerIdx = data.currentBreakerIdx;
|
||||||
|
if (!Number.isInteger(breakerIdx) || breakerIdx < 0 || breakerIdx >= order.length) {
|
||||||
|
errors.push(VALIDATION_MESSAGES.CURRENT_BREAKER_INVALID);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
isValid: errors.length === 0,
|
||||||
|
errors,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function validateRaceTo(value: string): ValidationResult {
|
export function validateRaceTo(value: string): ValidationResult {
|
||||||
const errors: string[] = [];
|
const errors: string[] = [];
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
.gameDetail {
|
.gameDetail {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
min-height: 100%;
|
||||||
min-height: 0;
|
|
||||||
padding: var(--space-md);
|
padding: var(--space-md);
|
||||||
padding-bottom: calc(var(--space-md) + var(--safe-area-bottom));
|
padding-bottom: calc(var(--space-md) + var(--safe-area-bottom));
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@@ -35,16 +34,15 @@
|
|||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
background: linear-gradient(135deg, var(--color-primary) 0%, #e65100 100%);
|
background: var(--color-primary);
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
font-size: var(--font-size-xs);
|
font-size: var(--font-size-xs);
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.08em;
|
||||||
box-shadow: 0 0 12px rgba(255, 152, 0, 0.35);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gameTitle {
|
.gameTitle {
|
||||||
font-size: clamp(1rem, 2.5vh, 1.5rem);
|
font-size: 1rem;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
@@ -68,15 +66,13 @@
|
|||||||
|
|
||||||
.scoresContainer {
|
.scoresContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1 1 auto;
|
||||||
justify-content: stretch;
|
|
||||||
align-items: stretch;
|
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
min-height: 0;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerScore {
|
.playerScore {
|
||||||
flex: 1;
|
flex: 1 1 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
@@ -84,26 +80,25 @@
|
|||||||
padding: var(--space-lg) var(--space-md);
|
padding: var(--space-lg) var(--space-md);
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
position: relative;
|
position: relative;
|
||||||
box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
min-height: 0;
|
min-height: 140px;
|
||||||
border: 3px solid transparent;
|
border: 3px solid transparent;
|
||||||
transition: border-color var(--transition-base), transform var(--transition-fast);
|
transition: border-color var(--transition-base);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
.player1 {
|
.player1 {
|
||||||
background: linear-gradient(180deg, #3a5a3d 0%, var(--color-player-1) 100%);
|
background: var(--color-player-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.player2 {
|
.player2 {
|
||||||
background: linear-gradient(180deg, #354d6a 0%, var(--color-player-2) 100%);
|
background: var(--color-player-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.player3 {
|
.player3 {
|
||||||
background: linear-gradient(180deg, #444 0%, var(--color-player-3) 100%);
|
background: var(--color-player-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerScore.completed {
|
.playerScore.completed {
|
||||||
@@ -117,12 +112,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.playerScore:active:not([aria-disabled="true"]) {
|
.playerScore:active:not([aria-disabled="true"]) {
|
||||||
transform: scale(0.99);
|
opacity: 0.95;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerScore.winner {
|
.playerScore.winner {
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
box-shadow: 0 0 0 3px var(--color-primary), 0 0 28px rgba(255, 152, 0, 0.45), var(--shadow-lg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerScore.winner .playerName {
|
.playerScore.winner .playerName {
|
||||||
@@ -140,10 +134,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.playerName {
|
.playerName {
|
||||||
font-size: clamp(1.1rem, 3vh, 1.75rem);
|
font-size: 1.1rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
@@ -154,30 +147,16 @@
|
|||||||
|
|
||||||
.breakIndicator {
|
.breakIndicator {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: clamp(14px, 2.5vh, 22px);
|
width: 16px;
|
||||||
height: clamp(14px, 2.5vh, 22px);
|
height: 16px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
|
|
||||||
animation: breakPulse 2s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes breakPulse {
|
|
||||||
0%, 100% {
|
|
||||||
opacity: 1;
|
|
||||||
box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
opacity: 0.65;
|
|
||||||
box-shadow: 0 0 14px rgba(255, 255, 255, 0.95), 0 0 20px rgba(255, 152, 0, 0.4);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.winnerBadge {
|
.winnerBadge {
|
||||||
font-size: clamp(1rem, 2.5vh, 1.5rem);
|
font-size: 1rem;
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,67 +174,32 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: rgba(255, 255, 255, 0.9);
|
background: rgba(255, 255, 255, 0.9);
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
transition: width var(--transition-slow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.score {
|
.score {
|
||||||
font-size: clamp(4.5rem, 30vh, 14rem);
|
font-size: 3.5rem;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex: 1 1 0;
|
flex: 1 1 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
padding: var(--space-xs);
|
padding: var(--space-xs);
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
position: relative;
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.score::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
border-radius: inherit;
|
|
||||||
background: radial-gradient(circle at center, rgba(255, 255, 255, 0.35) 0%, transparent 70%);
|
|
||||||
opacity: 0;
|
|
||||||
transform: scale(0.5);
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scoreTap::after {
|
|
||||||
animation: scoreRipple 0.35s ease-out forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scoreBump {
|
|
||||||
animation: scoreBump 0.25s ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes scoreRipple {
|
|
||||||
0% { opacity: 0.6; transform: scale(0.4); }
|
|
||||||
100% { opacity: 0; transform: scale(1.4); }
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes scoreBump {
|
|
||||||
0% { transform: scale(1); }
|
|
||||||
40% { transform: scale(1.12); }
|
|
||||||
100% { transform: scale(1); }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.gameDetailControls {
|
.gameDetailControls {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
margin-top: var(--space-lg);
|
margin-top: var(--space-lg);
|
||||||
padding-bottom: calc(var(--space-md) + var(--keyboard-offset));
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -263,7 +207,7 @@
|
|||||||
|
|
||||||
.gameDetailControls > * {
|
.gameDetailControls > * {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: min(160px, 100%);
|
min-width: 120px;
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,15 +232,42 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Larger screens */
|
||||||
|
@media (min-width: 480px) {
|
||||||
|
.score {
|
||||||
|
font-size: 4.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.gameTitle {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.playerName {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winnerBadge {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score {
|
||||||
|
font-size: 6rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.score {
|
||||||
|
font-size: 7rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Narrow portrait — stack players */
|
/* Narrow portrait — stack players */
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
.scoresContainer {
|
.scoresContainer {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.score {
|
|
||||||
font-size: clamp(3rem, 20vw, 6rem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Landscape phone — keep scores readable, compact chrome */
|
/* Landscape phone — keep scores readable, compact chrome */
|
||||||
@@ -317,18 +288,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.gameTitle {
|
.gameTitle {
|
||||||
font-size: clamp(0.85rem, 2.2vh, 1.1rem);
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scoresContainer {
|
.scoresContainer {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: var(--space-xs);
|
gap: var(--space-xs);
|
||||||
flex: 1 1 0;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerScore {
|
.playerScore {
|
||||||
padding: var(--space-xs);
|
padding: var(--space-xs);
|
||||||
|
min-height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playerNameRow {
|
.playerNameRow {
|
||||||
@@ -336,7 +306,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.playerName {
|
.playerName {
|
||||||
font-size: clamp(0.75rem, 2.2vh, 1rem);
|
font-size: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progressBar {
|
.progressBar {
|
||||||
@@ -346,15 +316,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.score {
|
.score {
|
||||||
font-size: clamp(2rem, min(36vh, 24vw), 4.5rem);
|
font-size: 2rem;
|
||||||
padding: 0;
|
|
||||||
flex: 1 1 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gameDetailControls {
|
.gameDetailControls {
|
||||||
margin-top: var(--space-xs);
|
margin-top: var(--space-xs);
|
||||||
gap: var(--space-xs);
|
gap: var(--space-xs);
|
||||||
padding-bottom: calc(var(--space-xs) + var(--keyboard-offset));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gameDetailControls > * {
|
.gameDetailControls > * {
|
||||||
@@ -363,14 +330,3 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.breakIndicator {
|
|
||||||
animation: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.scoreTap::after,
|
|
||||||
.scoreBump {
|
|
||||||
animation: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import { h } from 'preact';
|
import { h } from 'preact';
|
||||||
import { useEffect, useRef, useState } from 'preact/hooks';
|
import { useState } from 'preact/hooks';
|
||||||
import styles from './GameDetail.module.css';
|
import styles from './GameDetail.module.css';
|
||||||
import { Button } from '@lib/ui/Button';
|
import { Button } from '@lib/ui/Button';
|
||||||
import { getGameWinner, isStandardGame } from '@lib/domain/gameUtils';
|
import { getGameWinner, isStandardGame } from '@lib/domain/gameUtils';
|
||||||
import type { Game, EndlosGame } from '@lib/domain/types';
|
import type { Game, EndlosGame, GameSetupData } from '@lib/domain/types';
|
||||||
|
import { SetupButton } from './SetupButton';
|
||||||
|
import { GameSetupModal } from './GameSetupModal';
|
||||||
|
|
||||||
interface GameDetailProps {
|
interface GameDetailProps {
|
||||||
game: Game | undefined;
|
game: Game | undefined;
|
||||||
@@ -13,44 +15,14 @@ interface GameDetailProps {
|
|||||||
onUndo?: () => void;
|
onUndo?: () => void;
|
||||||
onForfeit?: () => void;
|
onForfeit?: () => void;
|
||||||
onBack: () => void;
|
onBack: () => void;
|
||||||
}
|
onUpdateGameSetup?: (setupData: GameSetupData) => void;
|
||||||
|
|
||||||
interface AnimatedScoreProps {
|
|
||||||
value: number;
|
|
||||||
tapping: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
function AnimatedScore({ value, tapping }: AnimatedScoreProps) {
|
|
||||||
const [bumping, setBumping] = useState(false);
|
|
||||||
const prevValue = useRef(value);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (prevValue.current !== value) {
|
|
||||||
setBumping(true);
|
|
||||||
const timer = window.setTimeout(() => setBumping(false), 250);
|
|
||||||
prevValue.current = value;
|
|
||||||
return () => window.clearTimeout(timer);
|
|
||||||
}
|
|
||||||
}, [value]);
|
|
||||||
|
|
||||||
const className = [
|
|
||||||
styles.score,
|
|
||||||
tapping ? styles.scoreTap : '',
|
|
||||||
bumping ? styles.scoreBump : '',
|
|
||||||
].filter(Boolean).join(' ');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<span className={className} aria-hidden="true">
|
|
||||||
{value}
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Game detail view for a single game.
|
* Game detail view for a single game.
|
||||||
*/
|
*/
|
||||||
const GameDetail = ({ game, onFinishGame, onUpdateScore, onUndo, onBack }: GameDetailProps) => {
|
const GameDetail = ({ game, onFinishGame, onUpdateScore, onUndo, onBack, onUpdateGameSetup }: GameDetailProps) => {
|
||||||
const [tappingPlayer, setTappingPlayer] = useState<number | null>(null);
|
const [setupOpen, setSetupOpen] = useState(false);
|
||||||
|
|
||||||
if (!game || !isStandardGame(game)) return null;
|
if (!game || !isStandardGame(game)) return null;
|
||||||
|
|
||||||
@@ -103,8 +75,6 @@ const GameDetail = ({ game, onFinishGame, onUpdateScore, onUndo, onBack }: GameD
|
|||||||
|
|
||||||
const handleScore = () => {
|
const handleScore = () => {
|
||||||
if (isCompleted) return;
|
if (isCompleted) return;
|
||||||
setTappingPlayer(idx);
|
|
||||||
window.setTimeout(() => setTappingPlayer((current) => (current === idx ? null : current)), 350);
|
|
||||||
onUpdateScore(idx + 1, 1);
|
onUpdateScore(idx + 1, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -148,12 +118,25 @@ const GameDetail = ({ game, onFinishGame, onUpdateScore, onUndo, onBack }: GameD
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<AnimatedScore value={currentScore} tapping={tappingPlayer === idx} />
|
<span className={styles.score} aria-hidden="true">
|
||||||
|
{currentScore}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<SetupButton onClick={() => setSetupOpen(true)} disabled={isCompleted} />
|
||||||
|
<GameSetupModal
|
||||||
|
game={standardGame}
|
||||||
|
open={setupOpen}
|
||||||
|
onSave={(data) => {
|
||||||
|
onUpdateGameSetup?.(data);
|
||||||
|
setSetupOpen(false);
|
||||||
|
}}
|
||||||
|
onCancel={() => setSetupOpen(false)}
|
||||||
|
/>
|
||||||
|
|
||||||
<div className={styles.gameDetailControls}>
|
<div className={styles.gameDetailControls}>
|
||||||
<Button variant="secondary" size="medium" onClick={onBack} aria-label="Zurück zur Liste">
|
<Button variant="secondary" size="medium" onClick={onBack} aria-label="Zurück zur Liste">
|
||||||
Zurück
|
Zurück
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
.modalContent {
|
||||||
|
/* Inherits width/max-width/max-height/scroll from base Modal.module.css */
|
||||||
|
}
|
||||||
|
|
||||||
|
.section {
|
||||||
|
margin-bottom: var(--space-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sectionTitle {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: var(--space-sm);
|
||||||
|
font-size: var(--font-size-lg);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--color-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.playerRow {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-sm);
|
||||||
|
margin-bottom: var(--space-md);
|
||||||
|
padding: var(--space-md);
|
||||||
|
border: 2px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: var(--color-background);
|
||||||
|
}
|
||||||
|
|
||||||
|
.playerRow:focus-within {
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fieldRow {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: var(--space-sm);
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textInput,
|
||||||
|
.numberInput {
|
||||||
|
flex: 1 1 140px;
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
padding: var(--space-md);
|
||||||
|
border: 2px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: var(--color-surface);
|
||||||
|
color: var(--color-text);
|
||||||
|
font-size: var(--font-size-base);
|
||||||
|
font-family: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textInput:focus,
|
||||||
|
.numberInput:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.numberInput {
|
||||||
|
flex: 0 1 100px;
|
||||||
|
max-width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceRow {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: var(--space-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceBtn {
|
||||||
|
min-width: 72px;
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
padding: var(--space-md) var(--space-lg);
|
||||||
|
border: 2px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
background: var(--color-secondary);
|
||||||
|
color: var(--color-text);
|
||||||
|
font-size: var(--font-size-base);
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
touch-action: manipulation;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceBtn:focus-visible {
|
||||||
|
outline: 2px solid var(--color-primary);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.choiceBtnSelected {
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
background: var(--color-primary-light);
|
||||||
|
color: var(--color-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.raceGrid {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: var(--space-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.endlosRow {
|
||||||
|
margin-bottom: var(--space-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.togglePlayerBtn {
|
||||||
|
width: 100%;
|
||||||
|
min-height: var(--touch-target-comfortable);
|
||||||
|
margin-bottom: var(--space-md);
|
||||||
|
}
|
||||||
|
|
||||||
|
.errors {
|
||||||
|
color: var(--color-danger);
|
||||||
|
background: var(--color-surface);
|
||||||
|
border: 1px solid var(--color-danger);
|
||||||
|
border-radius: var(--radius-md);
|
||||||
|
padding: var(--space-md);
|
||||||
|
margin-bottom: var(--space-md);
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.errors ul {
|
||||||
|
margin: 0;
|
||||||
|
padding-left: var(--space-lg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerActions {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--space-md);
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 480px) {
|
||||||
|
.footerActions {
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,358 @@
|
|||||||
|
import { h } from 'preact';
|
||||||
|
import { useEffect, useState } from 'preact/hooks';
|
||||||
|
import modalStyles from '@lib/ui/Modal.module.css';
|
||||||
|
import styles from './GameSetupModal.module.css';
|
||||||
|
import { Button } from '@lib/ui/Button';
|
||||||
|
import { GAME_TYPES, RACE_TO_INFINITY, RACE_TO_QUICK_PICKS } from '@lib/domain/constants';
|
||||||
|
import { gameToSetupData } from '@lib/domain/gameUtils';
|
||||||
|
import { validateGameSetupData } from '@lib/domain/validation';
|
||||||
|
import type { BreakRule, GameSetupData, GameType, StandardGame } from '@lib/domain/types';
|
||||||
|
|
||||||
|
interface GameSetupModalProps {
|
||||||
|
game: StandardGame;
|
||||||
|
open: boolean;
|
||||||
|
onSave: (setupData: GameSetupData) => void;
|
||||||
|
onCancel: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type RaceToState = number | typeof RACE_TO_INFINITY;
|
||||||
|
|
||||||
|
interface FormState {
|
||||||
|
player1: string;
|
||||||
|
player2: string;
|
||||||
|
player3: string;
|
||||||
|
hasPlayer3: boolean;
|
||||||
|
score1: number;
|
||||||
|
score2: number;
|
||||||
|
score3: number;
|
||||||
|
gameType: GameType;
|
||||||
|
raceTo: RaceToState;
|
||||||
|
raceToInput: string;
|
||||||
|
breakRule: BreakRule;
|
||||||
|
breakOrder: number[];
|
||||||
|
currentBreakerIdx: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupToFormState(setup: GameSetupData): FormState {
|
||||||
|
const hasPlayer3 = Boolean(setup.player3?.trim());
|
||||||
|
const raceToIsInfinity = setup.raceTo === Infinity;
|
||||||
|
return {
|
||||||
|
player1: setup.player1,
|
||||||
|
player2: setup.player2,
|
||||||
|
player3: setup.player3 ?? '',
|
||||||
|
hasPlayer3,
|
||||||
|
score1: setup.score1,
|
||||||
|
score2: setup.score2,
|
||||||
|
score3: setup.score3 ?? 0,
|
||||||
|
gameType: setup.gameType,
|
||||||
|
raceTo: raceToIsInfinity ? RACE_TO_INFINITY : setup.raceTo,
|
||||||
|
raceToInput: raceToIsInfinity ? '' : String(setup.raceTo),
|
||||||
|
breakRule: setup.breakRule,
|
||||||
|
breakOrder: [...setup.breakOrder],
|
||||||
|
currentBreakerIdx: setup.currentBreakerIdx,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseRaceToValue(raceTo: RaceToState, raceToInput: string): number {
|
||||||
|
if (raceTo === RACE_TO_INFINITY) return Infinity;
|
||||||
|
if (typeof raceTo === 'number' && Number.isFinite(raceTo)) return raceTo;
|
||||||
|
const parsed = parseInt(raceToInput, 10);
|
||||||
|
return Number.isFinite(parsed) ? parsed : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function formToSetupData(form: FormState): GameSetupData {
|
||||||
|
const data: GameSetupData = {
|
||||||
|
player1: form.player1,
|
||||||
|
player2: form.player2,
|
||||||
|
score1: form.score1,
|
||||||
|
score2: form.score2,
|
||||||
|
gameType: form.gameType,
|
||||||
|
raceTo: parseRaceToValue(form.raceTo, form.raceToInput),
|
||||||
|
breakRule: form.breakRule,
|
||||||
|
breakOrder: form.breakOrder,
|
||||||
|
currentBreakerIdx: form.currentBreakerIdx,
|
||||||
|
};
|
||||||
|
if (form.hasPlayer3) {
|
||||||
|
data.player3 = form.player3;
|
||||||
|
data.score3 = form.score3;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
function choiceClass(selected: boolean): string {
|
||||||
|
return `${styles.choiceBtn} ${selected ? styles.choiceBtnSelected : ''}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GameSetupModal({ game, open, onSave, onCancel }: GameSetupModalProps) {
|
||||||
|
const [form, setForm] = useState<FormState>(() => setupToFormState(gameToSetupData(game)));
|
||||||
|
const [errors, setErrors] = useState<string[]>([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (open) {
|
||||||
|
setForm(setupToFormState(gameToSetupData(game)));
|
||||||
|
setErrors([]);
|
||||||
|
}
|
||||||
|
}, [open, game]);
|
||||||
|
|
||||||
|
if (!open) return null;
|
||||||
|
|
||||||
|
const activeBreakerPlayer = form.breakOrder[form.currentBreakerIdx] ?? form.breakOrder[0];
|
||||||
|
const playerLabels = [
|
||||||
|
{ num: 1, name: form.player1, score: form.score1 },
|
||||||
|
{ num: 2, name: form.player2, score: form.score2 },
|
||||||
|
...(form.hasPlayer3 ? [{ num: 3, name: form.player3, score: form.score3 }] : []),
|
||||||
|
];
|
||||||
|
|
||||||
|
const updateForm = (patch: Partial<FormState>) => setForm((prev) => ({ ...prev, ...patch }));
|
||||||
|
|
||||||
|
const togglePlayer3 = () => {
|
||||||
|
if (form.hasPlayer3) {
|
||||||
|
const order = [1, 2];
|
||||||
|
let idx = form.currentBreakerIdx;
|
||||||
|
const currentPlayer = form.breakOrder[idx];
|
||||||
|
if (currentPlayer === 3) idx = 0;
|
||||||
|
else idx = Math.min(idx, order.length - 1);
|
||||||
|
updateForm({
|
||||||
|
hasPlayer3: false,
|
||||||
|
player3: '',
|
||||||
|
score3: 0,
|
||||||
|
breakOrder: order,
|
||||||
|
currentBreakerIdx: idx,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const order = [1, 2, 3];
|
||||||
|
updateForm({
|
||||||
|
hasPlayer3: true,
|
||||||
|
player3: 'Spieler 3',
|
||||||
|
score3: 0,
|
||||||
|
breakOrder: order,
|
||||||
|
currentBreakerIdx: Math.min(form.currentBreakerIdx, order.length - 1),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectBreaker = (playerNum: number) => {
|
||||||
|
const idx = form.breakOrder.indexOf(playerNum);
|
||||||
|
if (idx >= 0) updateForm({ currentBreakerIdx: idx });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRaceQuickPick = (value: number) => {
|
||||||
|
updateForm({ raceTo: value, raceToInput: String(value) });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRaceInfinity = () => {
|
||||||
|
updateForm({ raceTo: RACE_TO_INFINITY, raceToInput: '' });
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleRaceInput = (e: Event) => {
|
||||||
|
const value = (e.target as HTMLInputElement).value;
|
||||||
|
const parsed = parseInt(value, 10);
|
||||||
|
if (value === '') {
|
||||||
|
updateForm({ raceToInput: '', raceTo: 0 });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!Number.isNaN(parsed)) {
|
||||||
|
updateForm({ raceToInput: value, raceTo: parsed });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSave = () => {
|
||||||
|
const data = formToSetupData(form);
|
||||||
|
const result = validateGameSetupData(data);
|
||||||
|
if (!result.isValid) {
|
||||||
|
setErrors(result.errors);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setErrors([]);
|
||||||
|
onSave(data);
|
||||||
|
};
|
||||||
|
|
||||||
|
const raceToNumber =
|
||||||
|
form.raceTo === RACE_TO_INFINITY ? null : typeof form.raceTo === 'number' ? form.raceTo : parseInt(form.raceToInput, 10);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={`${modalStyles.modal} ${modalStyles.show}`}
|
||||||
|
role="dialog"
|
||||||
|
aria-modal="true"
|
||||||
|
aria-labelledby="game-setup-modal-title"
|
||||||
|
>
|
||||||
|
<div className={`${modalStyles['modal-content']} ${styles.modalContent}`}>
|
||||||
|
<div className={modalStyles['modal-header']}>
|
||||||
|
<span className={modalStyles['modal-title']} id="game-setup-modal-title">
|
||||||
|
Spiel einrichten
|
||||||
|
</span>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className={modalStyles['close-button']}
|
||||||
|
onClick={onCancel}
|
||||||
|
aria-label="Schließen"
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={modalStyles['modal-body']}>
|
||||||
|
<Button
|
||||||
|
variant="secondary"
|
||||||
|
size="medium"
|
||||||
|
className={styles.togglePlayerBtn}
|
||||||
|
onClick={togglePlayer3}
|
||||||
|
type="button"
|
||||||
|
>
|
||||||
|
{form.hasPlayer3 ? '3. Spieler entfernen' : '3. Spieler hinzufügen'}
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
{playerLabels.map(({ num, name, score }) => (
|
||||||
|
<div key={num} className={styles.playerRow}>
|
||||||
|
<span className={styles.sectionTitle}>Spieler {num}</span>
|
||||||
|
<div className={styles.fieldRow}>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className={styles.textInput}
|
||||||
|
value={num === 1 ? form.player1 : num === 2 ? form.player2 : form.player3}
|
||||||
|
onInput={(e) => {
|
||||||
|
const v = (e.target as HTMLInputElement).value;
|
||||||
|
if (num === 1) updateForm({ player1: v });
|
||||||
|
else if (num === 2) updateForm({ player2: v });
|
||||||
|
else updateForm({ player3: v });
|
||||||
|
}}
|
||||||
|
aria-label={`Name Spieler ${num}`}
|
||||||
|
autoComplete="off"
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
min={0}
|
||||||
|
step={1}
|
||||||
|
inputMode="numeric"
|
||||||
|
className={styles.numberInput}
|
||||||
|
value={score}
|
||||||
|
onInput={(e) => {
|
||||||
|
const v = parseInt((e.target as HTMLInputElement).value, 10);
|
||||||
|
const safe = Number.isNaN(v) ? 0 : Math.max(0, v);
|
||||||
|
if (num === 1) updateForm({ score1: safe });
|
||||||
|
else if (num === 2) updateForm({ score2: safe });
|
||||||
|
else updateForm({ score3: safe });
|
||||||
|
}}
|
||||||
|
aria-label={`Punkte Spieler ${num}`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
|
<section className={styles.section} aria-labelledby="setup-game-type">
|
||||||
|
<span className={styles.sectionTitle} id="setup-game-type">Spieltyp</span>
|
||||||
|
<div className={styles.choiceRow}>
|
||||||
|
{GAME_TYPES.map(({ value, label }) => (
|
||||||
|
<button
|
||||||
|
key={value}
|
||||||
|
type="button"
|
||||||
|
className={choiceClass(form.gameType === value)}
|
||||||
|
onClick={() => updateForm({ gameType: value })}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section className={styles.section} aria-labelledby="setup-race-to">
|
||||||
|
<span className={styles.sectionTitle} id="setup-race-to">Race To</span>
|
||||||
|
<div className={styles.endlosRow}>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className={choiceClass(form.raceTo === RACE_TO_INFINITY)}
|
||||||
|
onClick={handleRaceInfinity}
|
||||||
|
>
|
||||||
|
Endlos
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div className={styles.raceGrid}>
|
||||||
|
{RACE_TO_QUICK_PICKS.map((value) => (
|
||||||
|
<button
|
||||||
|
key={value}
|
||||||
|
type="button"
|
||||||
|
className={choiceClass(raceToNumber === value)}
|
||||||
|
onClick={() => handleRaceQuickPick(value)}
|
||||||
|
>
|
||||||
|
{value}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<div className={styles.fieldRow} style={{ marginTop: 'var(--space-sm)' }}>
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
min={1}
|
||||||
|
step={1}
|
||||||
|
inputMode="numeric"
|
||||||
|
className={styles.textInput}
|
||||||
|
value={form.raceTo === RACE_TO_INFINITY ? '' : form.raceToInput}
|
||||||
|
onInput={handleRaceInput}
|
||||||
|
placeholder="Eigener Wert"
|
||||||
|
aria-label="Race To manuelle Eingabe"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section className={styles.section} aria-labelledby="setup-break-rule">
|
||||||
|
<span className={styles.sectionTitle} id="setup-break-rule">Break-Regel</span>
|
||||||
|
<div className={styles.choiceRow}>
|
||||||
|
{(
|
||||||
|
[
|
||||||
|
{ key: 'winnerbreak' as BreakRule, label: 'Winnerbreak' },
|
||||||
|
{ key: 'wechselbreak' as BreakRule, label: 'Wechselbreak' },
|
||||||
|
] as const
|
||||||
|
).map((opt) => (
|
||||||
|
<button
|
||||||
|
key={opt.key}
|
||||||
|
type="button"
|
||||||
|
className={choiceClass(form.breakRule === opt.key)}
|
||||||
|
onClick={() => updateForm({ breakRule: opt.key })}
|
||||||
|
>
|
||||||
|
{opt.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section className={styles.section} aria-labelledby="setup-breaker">
|
||||||
|
<span className={styles.sectionTitle} id="setup-breaker">Wer breakt?</span>
|
||||||
|
<div className={styles.choiceRow}>
|
||||||
|
{playerLabels.map(({ num, name }) => (
|
||||||
|
<button
|
||||||
|
key={num}
|
||||||
|
type="button"
|
||||||
|
className={choiceClass(activeBreakerPlayer === num)}
|
||||||
|
onClick={() => selectBreaker(num)}
|
||||||
|
>
|
||||||
|
{name.trim() || `Spieler ${num}`}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{errors.length > 0 && (
|
||||||
|
<div className={styles.errors} role="alert">
|
||||||
|
<ul>
|
||||||
|
{errors.map((err) => (
|
||||||
|
<li key={err}>{err}</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={modalStyles['modal-footer']}>
|
||||||
|
<div className={styles.footerActions}>
|
||||||
|
<Button variant="secondary" size="large" onClick={onCancel} type="button">
|
||||||
|
Abbrechen
|
||||||
|
</Button>
|
||||||
|
<Button variant="primary" size="large" onClick={handleSave} type="button">
|
||||||
|
Übernehmen
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* SetupButton — bottom-left; mirrors FullscreenToggle placement */
|
||||||
|
.setupButton {
|
||||||
|
position: absolute;
|
||||||
|
bottom: calc(var(--space-md) + var(--safe-area-bottom));
|
||||||
|
left: calc(var(--space-md) + var(--safe-area-left));
|
||||||
|
width: var(--touch-target-comfortable);
|
||||||
|
height: var(--touch-target-comfortable);
|
||||||
|
border-radius: 50%;
|
||||||
|
background-color: var(--color-secondary);
|
||||||
|
border: 2px solid var(--color-border);
|
||||||
|
color: var(--color-primary);
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-shadow: var(--shadow-md);
|
||||||
|
z-index: 9999;
|
||||||
|
transition: background-color var(--transition-base), opacity var(--transition-base);
|
||||||
|
touch-action: manipulation;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setupButton:focus-visible {
|
||||||
|
outline: 2px solid var(--color-primary);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setupButton:active:not(:disabled) {
|
||||||
|
opacity: 0.8;
|
||||||
|
background-color: var(--color-secondary-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.setupButton:disabled {
|
||||||
|
opacity: 0.45;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setupButton svg {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.setupButton {
|
||||||
|
width: var(--touch-target-large);
|
||||||
|
height: var(--touch-target-large);
|
||||||
|
}
|
||||||
|
|
||||||
|
.setupButton svg {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { h } from 'preact';
|
||||||
|
import styles from './SetupButton.module.css';
|
||||||
|
|
||||||
|
interface SetupButtonProps {
|
||||||
|
onClick: () => void;
|
||||||
|
disabled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SetupButton({ onClick, disabled }: SetupButtonProps) {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className={styles.setupButton}
|
||||||
|
onClick={onClick}
|
||||||
|
disabled={disabled}
|
||||||
|
title="Spiel einrichten"
|
||||||
|
aria-label="Spiel einrichten"
|
||||||
|
>
|
||||||
|
<svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true">
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M19.14 12.94c.04-.31.06-.63.06-.94 0-.31-.02-.63-.06-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.04.31-.06.63-.06.94s.02.63.06.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
<span className="sr-only">Spiel einrichten</span>
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -5,7 +5,10 @@
|
|||||||
|
|
||||||
.confetti {
|
.confetti {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -18,8 +21,6 @@
|
|||||||
height: 8px;
|
height: 8px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: confettiFall 1.5s ease-out forwards;
|
|
||||||
animation-delay: calc(var(--i, 0) * 0.06s);
|
|
||||||
left: calc(8% + var(--i, 0) * 7%);
|
left: calc(8% + var(--i, 0) * 7%);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +39,6 @@
|
|||||||
@keyframes confettiFall {
|
@keyframes confettiFall {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(0) rotate(0deg) scale(1);
|
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.finalScore .score {
|
.finalScore .score {
|
||||||
font-size: clamp(1.75rem, 5vw, 2.5rem);
|
font-size: 1.75rem;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
@@ -91,33 +91,22 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: var(--space-lg);
|
margin-top: var(--space-lg);
|
||||||
padding: var(--space-xl) var(--space-lg);
|
padding: var(--space-xl) var(--space-lg);
|
||||||
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
|
background: var(--color-primary);
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
box-shadow: var(--shadow-md), 0 0 24px rgba(255, 152, 0, 0.35);
|
box-shadow: var(--shadow-md);
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
animation: winnerGlow 2s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes winnerGlow {
|
|
||||||
0%, 100% {
|
|
||||||
box-shadow: var(--shadow-md), 0 0 20px rgba(255, 152, 0, 0.3);
|
|
||||||
}
|
|
||||||
50% {
|
|
||||||
box-shadow: var(--shadow-md), 0 0 32px rgba(255, 152, 0, 0.55);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.winnerAnnouncement h3 {
|
.winnerAnnouncement h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: clamp(1.1rem, 3vw, 1.6rem);
|
font-size: 1.1rem;
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalActions {
|
.modalActions {
|
||||||
@@ -139,14 +128,18 @@
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.finalScore .score {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winnerAnnouncement h3 {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.confettiPiece {
|
.confettiPiece {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.winnerAnnouncement {
|
|
||||||
animation: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-height: 0;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,7 +20,7 @@
|
|||||||
|
|
||||||
.filterButtons > * {
|
.filterButtons > * {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
min-width: min(160px, calc(50% - var(--space-sm)));
|
min-width: 120px;
|
||||||
min-height: var(--touch-target-large);
|
min-height: var(--touch-target-large);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,10 +30,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow: visible;
|
||||||
overflow-x: hidden;
|
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding-bottom: calc(var(--space-md) + var(--keyboard-offset));
|
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +46,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.gameItem:active {
|
.gameItem:active {
|
||||||
transform: scale(0.99);
|
opacity: 0.92;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gameItem.active {
|
.gameItem.active {
|
||||||
@@ -103,12 +100,6 @@
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
animation: livePulse 1.5s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes livePulse {
|
|
||||||
0%, 100% { opacity: 1; transform: scale(1); }
|
|
||||||
50% { opacity: 0.5; transform: scale(0.85); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.statusActive {
|
.statusActive {
|
||||||
@@ -162,7 +153,7 @@
|
|||||||
padding: var(--space-xxl) var(--space-lg);
|
padding: var(--space-xxl) var(--space-lg);
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
font-size: var(--font-size-lg);
|
font-size: var(--font-size-lg);
|
||||||
background: linear-gradient(180deg, #2a2a2a 0%, var(--color-surface) 100%);
|
background: var(--color-surface);
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
border: 2px dashed var(--color-border);
|
border: 2px dashed var(--color-border);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -172,7 +163,6 @@
|
|||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
margin-bottom: var(--space-md);
|
margin-bottom: var(--space-md);
|
||||||
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.emptyHint {
|
.emptyHint {
|
||||||
@@ -211,7 +201,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.filterButtons > * {
|
.filterButtons > * {
|
||||||
min-width: calc(33% - var(--space-sm));
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deleteWrapper {
|
.deleteWrapper {
|
||||||
@@ -222,13 +212,3 @@
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.liveDot {
|
|
||||||
animation: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gameItem:active {
|
|
||||||
transform: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,42 +1,22 @@
|
|||||||
/* NewGame-specific styles only. Shared utility classes are now in global CSS. */
|
/* NewGame-specific styles only. Shared utility classes are now in global CSS. */
|
||||||
.screen {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
min-height: var(--app-height);
|
|
||||||
display: none;
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateX(100%);
|
|
||||||
transition: transform var(--transition-slow), opacity var(--transition-slow);
|
|
||||||
}
|
|
||||||
.screen-content {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 100%;
|
|
||||||
padding: var(--space-lg);
|
|
||||||
overflow-y: auto;
|
|
||||||
overflow-x: hidden;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
.screen-title {
|
.screen-title {
|
||||||
font-size: clamp(1.25rem, 3vh, 1.5rem);
|
font-size: 1.25rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
margin-bottom: clamp(0.5rem, 2vh, 2rem);
|
margin-bottom: 1rem;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-inputs {
|
.player-inputs {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-lg);
|
gap: var(--space-lg);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: var(--space-xl);
|
margin-bottom: var(--space-xl);
|
||||||
flex-shrink: 1;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-input {
|
.player-input {
|
||||||
background: var(--color-background);
|
background: var(--color-background);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
@@ -45,25 +25,28 @@
|
|||||||
transition: border-color var(--transition-base);
|
transition: border-color var(--transition-base);
|
||||||
position: relative;
|
position: relative;
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
min-height: 0;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-input:focus-within {
|
.player-input:focus-within {
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
box-shadow: 0 0 0 3px var(--color-primary-light);
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-input label {
|
.player-input label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: clamp(0.5rem, 2vh, 1rem);
|
margin-bottom: var(--space-md);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
font-size: clamp(1rem, 2.5vh, 1.125rem);
|
font-size: var(--font-size-base);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-input-container {
|
.name-input-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-input {
|
.name-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: var(--space-md);
|
padding: var(--space-md);
|
||||||
@@ -73,21 +56,25 @@
|
|||||||
font-size: var(--font-size-base);
|
font-size: var(--font-size-base);
|
||||||
min-height: var(--touch-target-comfortable);
|
min-height: var(--touch-target-comfortable);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
transition: all var(--transition-base);
|
transition: border-color var(--transition-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-input:focus {
|
.name-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
box-shadow: 0 0 0 3px var(--color-primary-light);
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-settings {
|
.game-settings {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: var(--space-xl);
|
margin-bottom: var(--space-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-group {
|
.setting-group {
|
||||||
margin-bottom: var(--space-lg);
|
margin-bottom: var(--space-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-group label {
|
.setting-group label {
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: var(--space-md);
|
margin-bottom: var(--space-md);
|
||||||
@@ -95,6 +82,7 @@
|
|||||||
font-size: var(--font-size-lg);
|
font-size: var(--font-size-lg);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-group select, .setting-group input {
|
.setting-group select, .setting-group input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: var(--space-md);
|
padding: var(--space-md);
|
||||||
@@ -106,11 +94,13 @@
|
|||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
transition: border-color var(--transition-base);
|
transition: border-color var(--transition-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
.setting-group input:focus, .setting-group select:focus {
|
.setting-group input:focus, .setting-group select:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
box-shadow: 0 0 0 3px var(--color-primary-light);
|
box-shadow: 0 0 0 3px var(--color-primary-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
.validation-error {
|
.validation-error {
|
||||||
color: var(--color-danger);
|
color: var(--color-danger);
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
@@ -122,128 +112,51 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
/* NewGame-specific styles only. Shared utility classes are now in global CSS. */
|
|
||||||
.wizardShell {
|
.wizardShell {
|
||||||
flex: 1;
|
display: block;
|
||||||
display: flex;
|
|
||||||
align-items: stretch;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 0;
|
|
||||||
max-height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
padding: var(--space-sm) 0;
|
padding: var(--space-sm) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-game-form {
|
.new-game-form {
|
||||||
width: min(94vw, 720px);
|
width: 100%;
|
||||||
max-height: 100%;
|
max-width: 720px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background: linear-gradient(180deg, #2a2a2a 0%, var(--color-surface) 100%);
|
background: var(--color-surface);
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
border: 1px solid var(--color-border);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border: 1px solid var(--color-border);
|
|
||||||
flex-shrink: 1;
|
|
||||||
min-height: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
animation: wizardStepIn var(--transition-slow) ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Per-step wizard backgrounds — visually distinct per step */
|
/* Step class placeholders are kept so NewGameScreen can still pass them. */
|
||||||
.new-game-form.step-player1 {
|
.step-player1 {}
|
||||||
background: linear-gradient(180deg, #3a5a3d 0%, #2e4631 100%);
|
.step-player2 {}
|
||||||
border-color: rgba(255, 255, 255, 0.12);
|
.step-player3 {}
|
||||||
}
|
.step-gameType {}
|
||||||
|
.step-raceTo {}
|
||||||
.new-game-form.step-player2 {
|
.step-breakRule {}
|
||||||
background: linear-gradient(180deg, #354d6a 0%, #2a3b52 100%);
|
.step-breakOrder {}
|
||||||
border-color: rgba(255, 255, 255, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form.step-player3 {
|
|
||||||
background: linear-gradient(180deg, #444 0%, #333 100%);
|
|
||||||
border-color: rgba(255, 255, 255, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form.step-gameType {
|
|
||||||
background: linear-gradient(180deg, #5a2323 0%, #4a1c1c 100%);
|
|
||||||
border-color: rgba(255, 255, 255, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form.step-raceTo {
|
|
||||||
background: linear-gradient(180deg, #3d245e 0%, #2d1b4e 100%);
|
|
||||||
border-color: rgba(255, 255, 255, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form.step-breakRule {
|
|
||||||
background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
|
|
||||||
border-color: rgba(255, 255, 255, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form.step-breakOrder {
|
|
||||||
background: linear-gradient(180deg, #5a3a10 0%, #3d260a 100%);
|
|
||||||
border-color: rgba(255, 152, 0, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form[class*="step-"] .form-footer {
|
|
||||||
background: rgba(0, 0, 0, 0.35);
|
|
||||||
border-top-color: rgba(255, 255, 255, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form[class*="step-"] .wizard-summary {
|
|
||||||
background: rgba(0, 0, 0, 0.35);
|
|
||||||
border-color: rgba(255, 255, 255, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form[class*="step-"] .screen-title {
|
|
||||||
color: #fff;
|
|
||||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form[class*="step-"] .player-input {
|
|
||||||
background: rgba(0, 0, 0, 0.25);
|
|
||||||
border-color: rgba(255, 255, 255, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
.new-game-form[class*="step-"] .name-input,
|
|
||||||
.new-game-form[class*="step-"] .game-type-btn,
|
|
||||||
.new-game-form[class*="step-"] .race-to-btn,
|
|
||||||
.new-game-form[class*="step-"] .quick-pick-btn {
|
|
||||||
background: rgba(0, 0, 0, 0.3);
|
|
||||||
border-color: rgba(255, 255, 255, 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes wizardStepIn {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateX(12px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateX(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-header {
|
.form-header {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: clamp(0.4rem, 1.5vh, 1.25rem) var(--space-lg) clamp(0.2rem, 0.8vh, 0.75rem) var(--space-lg);
|
padding: var(--space-sm) var(--space-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard-summary {
|
.wizard-summary {
|
||||||
margin-top: clamp(0.25rem, 0.8vh, 0.5rem);
|
margin-top: var(--space-xs);
|
||||||
margin-bottom: clamp(0.25rem, 0.8vh, 0.5rem);
|
margin-bottom: var(--space-xs);
|
||||||
padding: clamp(0.5rem, 1.2vh, 0.75rem) var(--space-md);
|
padding: var(--space-sm) var(--space-md);
|
||||||
background: rgba(0, 0, 0, 0.25);
|
background: var(--color-surface);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard-summary-hint {
|
.wizard-summary-hint {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: clamp(0.85rem, 2.2vw, 0.95rem);
|
font-size: var(--font-size-sm);
|
||||||
line-height: 1.35;
|
line-height: 1.35;
|
||||||
color: var(--color-text-muted, #aaa);
|
color: var(--color-text-muted, #aaa);
|
||||||
}
|
}
|
||||||
@@ -252,7 +165,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: clamp(0.2rem, 0.6vh, 0.35rem);
|
gap: var(--space-xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard-summary-row {
|
.wizard-summary-row {
|
||||||
@@ -266,7 +179,7 @@
|
|||||||
.wizard-summary-label {
|
.wizard-summary-label {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
font-size: clamp(0.8rem, 2vw, 0.9rem);
|
font-size: var(--font-size-sm);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-text-muted, #aaa);
|
color: var(--color-text-muted, #aaa);
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
@@ -275,7 +188,7 @@
|
|||||||
.wizard-summary-value {
|
.wizard-summary-value {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
font-size: clamp(0.95rem, 2.5vw, 1.05rem);
|
font-size: var(--font-size-base);
|
||||||
line-height: 1.35;
|
line-height: 1.35;
|
||||||
color: var(--color-text, #eee);
|
color: var(--color-text, #eee);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -283,51 +196,49 @@
|
|||||||
|
|
||||||
.form-content {
|
.form-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow: visible;
|
||||||
overscroll-behavior: contain;
|
|
||||||
padding: 0 var(--space-lg);
|
padding: 0 var(--space-lg);
|
||||||
padding-bottom: var(--space-sm);
|
padding-bottom: var(--space-sm);
|
||||||
min-height: 0;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-footer {
|
.form-footer {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
position: sticky;
|
position: static;
|
||||||
bottom: 0;
|
|
||||||
z-index: 2;
|
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
padding: var(--space-sm) var(--space-lg) calc(var(--space-sm) + var(--safe-area-bottom) + var(--keyboard-offset)) var(--space-lg);
|
padding: var(--space-sm) var(--space-lg) calc(var(--space-sm) + var(--safe-area-bottom));
|
||||||
border-top: 1px solid var(--color-border);
|
border-top: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-indicator {
|
.progress-indicator {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: clamp(0.5rem, 1.5vw, 1rem);
|
gap: var(--space-sm);
|
||||||
margin-bottom: clamp(0.5rem, 2vh, 1.5rem);
|
margin-bottom: var(--space-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-dot {
|
.progress-dot {
|
||||||
width: clamp(12px, 2vh, 18px);
|
width: 14px;
|
||||||
height: clamp(12px, 2vh, 18px);
|
height: 14px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--color-border);
|
background: var(--color-border);
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
transition: background var(--transition-slow), opacity var(--transition-slow), transform var(--transition-slow), box-shadow var(--transition-slow);
|
transition: background var(--transition-slow), opacity var(--transition-slow);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-dot.completed {
|
.progress-dot.completed {
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
opacity: 0.55;
|
opacity: 0.55;
|
||||||
transform: scale(0.9);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-dot.active {
|
.progress-dot.active {
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1.25);
|
|
||||||
box-shadow: 0 0 0 4px var(--color-primary-light), 0 0 12px rgba(255, 152, 0, 0.4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-pick-container {
|
.quick-pick-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -346,27 +257,26 @@
|
|||||||
border: 2px solid var(--color-border);
|
border: 2px solid var(--color-border);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: var(--space-md) var(--space-lg);
|
padding: var(--space-md) var(--space-lg);
|
||||||
transition: border-color var(--transition-base), background-color var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
|
transition: border-color var(--transition-base), background-color var(--transition-base);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
}
|
}
|
||||||
.quick-pick-btn:active:not(.selected) {
|
|
||||||
transform: scale(0.97);
|
|
||||||
}
|
|
||||||
|
|
||||||
.quick-pick-btn:focus-visible {
|
.quick-pick-btn:focus-visible {
|
||||||
outline: 2px solid var(--color-primary);
|
outline: 2px solid var(--color-primary);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-btn {
|
.choice-btn {
|
||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
min-height: var(--touch-target-large);
|
min-height: var(--touch-target-large);
|
||||||
font-size: var(--font-size-lg);
|
font-size: var(--font-size-lg);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-nav {
|
.arrow-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -375,11 +285,13 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
gap: var(--space-sm);
|
gap: var(--space-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-nav-actions {
|
.arrow-nav-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-btn {
|
.arrow-btn {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
width: var(--touch-target-comfortable);
|
width: var(--touch-target-comfortable);
|
||||||
@@ -399,18 +311,22 @@
|
|||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-btn:disabled {
|
.arrow-btn:disabled {
|
||||||
opacity: 0.45;
|
opacity: 0.45;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-btn:focus-visible {
|
.arrow-btn:focus-visible {
|
||||||
outline: 2px solid var(--color-primary);
|
outline: 2px solid var(--color-primary);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-btn:active:not(:disabled) {
|
.arrow-btn:active:not(:disabled) {
|
||||||
background: var(--color-secondary-hover);
|
background: var(--color-secondary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.clear-input-btn {
|
.clear-input-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: var(--space-sm);
|
right: var(--space-sm);
|
||||||
@@ -431,6 +347,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clear-input-btn:focus-visible {
|
.clear-input-btn:focus-visible {
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
background: var(--color-secondary);
|
background: var(--color-secondary);
|
||||||
@@ -442,26 +359,31 @@
|
|||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
background: var(--color-secondary-hover);
|
background: var(--color-secondary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.name-input-wrapper {
|
.name-input-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.character-counter {
|
.character-counter {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-picks-row {
|
.quick-picks-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-pick-action-btn {
|
.quick-pick-action-btn {
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-pick-action-btn:focus-visible {
|
.quick-pick-action-btn:focus-visible {
|
||||||
outline: 2px solid var(--color-primary);
|
outline: 2px solid var(--color-primary);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
@@ -471,19 +393,23 @@
|
|||||||
background: var(--color-primary-hover);
|
background: var(--color-primary-hover);
|
||||||
border-color: var(--color-primary-hover);
|
border-color: var(--color-primary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-pick-actions-separator {
|
.quick-pick-actions-separator {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-heading {
|
.choice-heading {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.choice-heading:first-child {
|
.choice-heading:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-type-selection {
|
.game-type-selection {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
@@ -491,6 +417,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: var(--space-md) 0;
|
margin: var(--space-md) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-type-btn {
|
.game-type-btn {
|
||||||
background: var(--color-background);
|
background: var(--color-background);
|
||||||
border: 2px solid var(--color-border);
|
border: 2px solid var(--color-border);
|
||||||
@@ -501,33 +428,37 @@
|
|||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: border-color var(--transition-base), background-color var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
|
transition: border-color var(--transition-base), background-color var(--transition-base);
|
||||||
min-height: var(--touch-target-large);
|
min-height: var(--touch-target-large);
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-type-btn:active:not(.selected) {
|
|
||||||
transform: scale(0.97);
|
|
||||||
}
|
|
||||||
.game-type-btn:focus-visible {
|
.game-type-btn:focus-visible {
|
||||||
outline: 2px solid var(--color-primary);
|
outline: 2px solid var(--color-primary);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-type-btn.selected {
|
.game-type-btn.selected {
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
box-shadow: var(--shadow-md), 0 0 0 3px var(--color-primary-light);
|
box-shadow: var(--shadow-md), 0 0 0 3px var(--color-primary-light);
|
||||||
transform: scale(1.03);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.race-to-selection {
|
.race-to-selection {
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
|
flex-wrap: wrap;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: var(--space-md) 0;
|
margin: var(--space-md) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.race-to-selection .race-to-btn {
|
||||||
|
flex: 1 1 calc(25% - var(--space-md));
|
||||||
|
min-width: 72px;
|
||||||
|
}
|
||||||
|
|
||||||
.race-to-btn {
|
.race-to-btn {
|
||||||
background: var(--color-background);
|
background: var(--color-background);
|
||||||
border: 2px solid var(--color-border);
|
border: 2px solid var(--color-border);
|
||||||
@@ -538,7 +469,7 @@
|
|||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
transition: border-color var(--transition-base), background-color var(--transition-base), transform var(--transition-fast), box-shadow var(--transition-base);
|
transition: border-color var(--transition-base), background-color var(--transition-base);
|
||||||
min-height: var(--touch-target-large);
|
min-height: var(--touch-target-large);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -546,21 +477,19 @@
|
|||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
}
|
}
|
||||||
.race-to-btn:active:not(.selected) {
|
|
||||||
transform: scale(0.97);
|
|
||||||
}
|
|
||||||
|
|
||||||
.race-to-btn:focus-visible {
|
.race-to-btn:focus-visible {
|
||||||
outline: 2px solid var(--color-primary);
|
outline: 2px solid var(--color-primary);
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.race-to-btn.selected {
|
.race-to-btn.selected {
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
border-color: var(--color-primary);
|
border-color: var(--color-primary);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
box-shadow: var(--shadow-md), 0 0 0 3px var(--color-primary-light);
|
box-shadow: var(--shadow-md), 0 0 0 3px var(--color-primary-light);
|
||||||
transform: scale(1.03);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Match selected styling for quick pick buttons used in BreakRuleStep */
|
/* Match selected styling for quick pick buttons used in BreakRuleStep */
|
||||||
.quick-pick-btn.selected {
|
.quick-pick-btn.selected {
|
||||||
background: var(--color-primary);
|
background: var(--color-primary);
|
||||||
@@ -568,88 +497,88 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
box-shadow: var(--shadow-md), 0 0 0 3px var(--color-primary-light);
|
box-shadow: var(--shadow-md), 0 0 0 3px var(--color-primary-light);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
transform: scale(1.02);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-race-to {
|
.custom-race-to {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
margin-top: var(--space-lg);
|
margin-top: var(--space-lg);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-race-to input {
|
.custom-race-to input {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-race-to .arrow-btn {
|
.custom-race-to .arrow-btn {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.endlos-container {
|
.endlos-container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.endlos-btn {
|
.endlos-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.player1-input.player-input,
|
.player1-input.player-input,
|
||||||
.player2-input.player-input,
|
.player2-input.player-input,
|
||||||
.player3-input.player-input {
|
.player3-input.player-input {
|
||||||
border-color: var(--color-border);
|
border-color: var(--color-border);
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) and (max-width: 1024px) {
|
@media (min-width: 768px) and (max-width: 1024px) {
|
||||||
.wizardShell {
|
.wizardShell {
|
||||||
padding: var(--space-md) 0;
|
padding: var(--space-md) 0;
|
||||||
}
|
}
|
||||||
.new-game-form {
|
|
||||||
min-height: min(82vh, 680px);
|
|
||||||
max-height: 100%;
|
|
||||||
}
|
|
||||||
.screen-title {
|
.screen-title {
|
||||||
font-size: var(--font-size-xxxl);
|
font-size: var(--font-size-xxxl);
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-btn {
|
.arrow-btn {
|
||||||
width: 56px;
|
width: 56px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
font-size: 34px;
|
font-size: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-type-btn,
|
.game-type-btn,
|
||||||
.race-to-btn {
|
.race-to-btn {
|
||||||
padding: var(--space-xl);
|
padding: var(--space-xl);
|
||||||
font-size: var(--font-size-xl);
|
font-size: var(--font-size-xl);
|
||||||
min-height: var(--touch-target-comfortable);
|
min-height: var(--touch-target-comfortable);
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-pick-btn {
|
.quick-pick-btn {
|
||||||
min-height: var(--touch-target-comfortable);
|
min-height: var(--touch-target-comfortable);
|
||||||
font-size: var(--font-size-lg);
|
font-size: var(--font-size-lg);
|
||||||
padding: var(--space-md) var(--space-lg);
|
padding: var(--space-md) var(--space-lg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-height: 720px) {
|
|
||||||
.new-game-form {
|
|
||||||
min-height: min(88vh, 720px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.wizardShell {
|
.wizardShell {
|
||||||
padding: var(--space-xs) 0;
|
padding: var(--space-xs) 0;
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
.new-game-form {
|
|
||||||
width: min(96vw, 720px);
|
|
||||||
min-height: 0;
|
|
||||||
max-height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.game-type-selection {
|
.game-type-selection {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.race-to-selection {
|
.race-to-selection {
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-nav {
|
.arrow-nav {
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow-btn {
|
.arrow-btn {
|
||||||
width: var(--touch-target-min);
|
width: var(--touch-target-min);
|
||||||
height: var(--touch-target-min);
|
height: var(--touch-target-min);
|
||||||
@@ -657,60 +586,50 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.new-game-form {
|
|
||||||
animation: none;
|
|
||||||
}
|
|
||||||
.game-type-btn.selected,
|
|
||||||
.race-to-btn.selected,
|
|
||||||
.quick-pick-btn.selected {
|
|
||||||
transform: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-height: 560px) {
|
@media (max-height: 560px) {
|
||||||
.screen-title {
|
.screen-title {
|
||||||
margin-bottom: 0.35rem;
|
margin-bottom: 0.35rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress-indicator {
|
.progress-indicator {
|
||||||
margin-bottom: 0.35rem;
|
margin-bottom: 0.35rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard-summary {
|
.wizard-summary {
|
||||||
padding: 0.35rem var(--space-sm);
|
padding: 0.35rem var(--space-sm);
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wizard-summary-value {
|
.wizard-summary-value {
|
||||||
font-size: clamp(0.9rem, 2.2vw, 1rem);
|
font-size: var(--font-size-base);
|
||||||
}
|
}
|
||||||
|
|
||||||
.player-input {
|
.player-input {
|
||||||
padding: var(--space-sm);
|
padding: var(--space-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-header {
|
.form-header {
|
||||||
padding-top: 0.4rem;
|
padding-top: 0.4rem;
|
||||||
padding-bottom: 0.3rem;
|
padding-bottom: 0.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-footer {
|
.form-footer {
|
||||||
padding-top: 0.3rem;
|
padding-top: 0.3rem;
|
||||||
padding-bottom: calc(0.35rem + var(--safe-area-bottom) + var(--keyboard-offset));
|
padding-bottom: calc(0.35rem + var(--safe-area-bottom));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-height: 500px) {
|
@media (max-height: 500px) {
|
||||||
.wizardShell {
|
.wizardShell {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-game-form {
|
|
||||||
min-height: 0;
|
|
||||||
max-height: 100%;
|
|
||||||
width: min(98vw, 720px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-header {
|
.form-header {
|
||||||
padding: var(--space-xs) var(--space-md) var(--space-xs);
|
padding: var(--space-xs) var(--space-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen-title {
|
.screen-title {
|
||||||
font-size: clamp(1rem, 3.5vh, 1.25rem);
|
font-size: 1rem;
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -723,7 +642,7 @@
|
|||||||
.choice-heading {
|
.choice-heading {
|
||||||
margin-top: 0.5rem;
|
margin-top: 0.5rem;
|
||||||
margin-bottom: 0.35rem;
|
margin-bottom: 0.35rem;
|
||||||
font-size: clamp(0.95rem, 3vh, 1.1rem);
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-picks-row {
|
.quick-picks-row {
|
||||||
@@ -737,6 +656,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.form-footer {
|
.form-footer {
|
||||||
padding: var(--space-xs) var(--space-md) calc(var(--space-xs) + var(--safe-area-bottom) + var(--keyboard-offset));
|
padding: var(--space-xs) var(--space-md) calc(var(--space-xs) + var(--safe-area-bottom));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
.modalOverlay {
|
.modalOverlay {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
inset: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
background: rgba(0, 0, 0, 0.8);
|
background: rgba(0, 0, 0, 0.8);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -9,18 +12,23 @@
|
|||||||
padding: var(--space-lg);
|
padding: var(--space-lg);
|
||||||
padding-top: calc(var(--space-lg) + var(--safe-area-top));
|
padding-top: calc(var(--space-lg) + var(--safe-area-top));
|
||||||
padding-bottom: calc(var(--space-lg) + var(--safe-area-bottom));
|
padding-bottom: calc(var(--space-lg) + var(--safe-area-bottom));
|
||||||
|
padding-left: calc(var(--space-lg) + var(--safe-area-left));
|
||||||
|
padding-right: calc(var(--space-lg) + var(--safe-area-right));
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalContent {
|
.modalContent {
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
padding: var(--space-xl);
|
padding: var(--space-xl);
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
width: min(480px, 100%);
|
width: 100%;
|
||||||
max-height: calc(var(--app-height) - var(--space-xl) * 2);
|
max-width: 480px;
|
||||||
|
max-height: 90%;
|
||||||
box-shadow: var(--shadow-lg);
|
box-shadow: var(--shadow-lg);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalHeader {
|
.modalHeader {
|
||||||
@@ -60,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.playerList {
|
.playerList {
|
||||||
max-height: 60vh;
|
max-height: 400px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
.modalOverlay {
|
.modalOverlay {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
inset: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
background: rgba(0, 0, 0, 0.8);
|
background: rgba(0, 0, 0, 0.8);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -9,18 +12,25 @@
|
|||||||
padding: var(--space-lg);
|
padding: var(--space-lg);
|
||||||
padding-top: calc(var(--space-lg) + var(--safe-area-top));
|
padding-top: calc(var(--space-lg) + var(--safe-area-top));
|
||||||
padding-bottom: calc(var(--space-lg) + var(--safe-area-bottom));
|
padding-bottom: calc(var(--space-lg) + var(--safe-area-bottom));
|
||||||
|
padding-left: calc(var(--space-lg) + var(--safe-area-left));
|
||||||
|
padding-right: calc(var(--space-lg) + var(--safe-area-right));
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalContent {
|
.modalContent {
|
||||||
width: min(420px, 100%);
|
width: 100%;
|
||||||
background: linear-gradient(180deg, #2a2a2a 0%, var(--color-surface) 100%);
|
max-width: 420px;
|
||||||
|
background: var(--color-surface);
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
box-shadow: var(--shadow-lg);
|
||||||
padding: var(--space-xl);
|
padding: var(--space-xl);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
|
max-height: 90%;
|
||||||
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalTitle {
|
.modalTitle {
|
||||||
@@ -33,7 +43,7 @@
|
|||||||
.modalInput {
|
.modalInput {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: var(--touch-target-comfortable);
|
min-height: var(--touch-target-comfortable);
|
||||||
font-size: max(16px, var(--font-size-base));
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modalActions {
|
.modalActions {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
transition: background-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-fast), opacity var(--transition-base);
|
transition: background-color var(--transition-base), box-shadow var(--transition-base), opacity var(--transition-base);
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
box-shadow: var(--shadow-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.button:focus-visible {
|
.button:focus-visible {
|
||||||
@@ -23,15 +23,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.button:active:not(.disabled) {
|
.button:active:not(.disabled) {
|
||||||
transform: scale(0.97);
|
|
||||||
opacity: 0.92;
|
opacity: 0.92;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Variants */
|
/* Variants */
|
||||||
.primary {
|
.primary {
|
||||||
background: linear-gradient(180deg, #ffb74d 0%, var(--color-primary) 100%);
|
background: var(--color-primary);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 152, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.primary:not(.disabled):active {
|
.primary:not(.disabled):active {
|
||||||
@@ -39,7 +37,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.secondary {
|
.secondary {
|
||||||
background: linear-gradient(180deg, #3a3a3a 0%, var(--color-secondary) 100%);
|
background: var(--color-secondary);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
border: 2px solid var(--color-border);
|
border: 2px solid var(--color-border);
|
||||||
}
|
}
|
||||||
@@ -49,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.danger {
|
.danger {
|
||||||
background: linear-gradient(180deg, #ef5350 0%, var(--color-danger) 100%);
|
background: var(--color-danger);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,9 +104,3 @@
|
|||||||
opacity: 0.45;
|
opacity: 0.45;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.button:active:not(.disabled) {
|
|
||||||
transform: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
.card {
|
.card {
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-fast);
|
transition: border-color var(--transition-base), box-shadow var(--transition-base);
|
||||||
background: linear-gradient(180deg, #2a2a2a 0%, var(--color-surface) 100%);
|
background: var(--color-surface);
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.default {
|
.default {
|
||||||
@@ -11,7 +10,7 @@
|
|||||||
|
|
||||||
.elevated {
|
.elevated {
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
box-shadow: var(--shadow-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
.outlined {
|
.outlined {
|
||||||
@@ -29,7 +28,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.clickable:active {
|
.clickable:active {
|
||||||
transform: scale(0.99);
|
opacity: 0.92;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clickable:focus-visible {
|
.clickable:focus-visible {
|
||||||
@@ -52,9 +51,3 @@
|
|||||||
.padding-large {
|
.padding-large {
|
||||||
padding: var(--space-lg);
|
padding: var(--space-lg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.clickable:active {
|
|
||||||
transform: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
.layout {
|
.layout {
|
||||||
height: var(--app-height);
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
flex: 1;
|
flex: 1 1 auto;
|
||||||
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
max-width: 1100px;
|
max-width: 1100px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: var(--space-md);
|
padding: var(--space-md);
|
||||||
@@ -16,33 +22,13 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.screen {
|
.screen {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
min-height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
|
||||||
min-height: 0;
|
|
||||||
animation: screenFadeIn var(--transition-slow) ease-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes screenFadeIn {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
.screen {
|
|
||||||
animation: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
/* Consolidated modal styles */
|
/* Consolidated modal styles — viewport-bound, scrollable content */
|
||||||
.modal {
|
.modal {
|
||||||
display: none;
|
display: none;
|
||||||
position: fixed;
|
position: absolute;
|
||||||
inset: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
background-color: rgba(0, 0, 0, 0.8);
|
background-color: rgba(0, 0, 0, 0.8);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
padding: var(--space-lg);
|
padding: var(--space-lg);
|
||||||
@@ -22,9 +25,11 @@
|
|||||||
background-color: var(--color-surface);
|
background-color: var(--color-surface);
|
||||||
padding: var(--space-xl);
|
padding: var(--space-xl);
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
width: min(500px, 100%);
|
width: 100%;
|
||||||
max-height: calc(var(--app-height) - var(--space-xl) * 2);
|
max-width: 500px;
|
||||||
|
max-height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
position: relative;
|
position: relative;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
box-shadow: var(--shadow-lg);
|
box-shadow: var(--shadow-lg);
|
||||||
@@ -36,6 +41,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: var(--space-lg);
|
margin-bottom: var(--space-lg);
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-title {
|
.modal-title {
|
||||||
@@ -82,6 +88,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: stretch;
|
justify-content: stretch;
|
||||||
gap: var(--space-md);
|
gap: var(--space-md);
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 480px) {
|
@media (min-width: 480px) {
|
||||||
@@ -95,11 +102,10 @@
|
|||||||
.modal-button {
|
.modal-button {
|
||||||
min-height: var(--touch-target-large);
|
min-height: var(--touch-target-large);
|
||||||
padding: var(--space-md) var(--space-xl);
|
padding: var(--space-md) var(--space-xl);
|
||||||
font-size: var(--font-size-lg);
|
font-size: var(--font-size-base);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: var(--font-size-base);
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
|
|||||||
+11
-3
@@ -7,7 +7,7 @@ import App from "../components/App";
|
|||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover, interactive-widget=resizes-content">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover">
|
||||||
<title>BSC Score – Live-Scoring am Billardtisch</title>
|
<title>BSC Score – Live-Scoring am Billardtisch</title>
|
||||||
<meta name="description" content="Live-Scoring für 8-, 9- und 10-Ball am Billardtisch. Offline, schnell, ein Tipp pro Punkt.">
|
<meta name="description" content="Live-Scoring für 8-, 9- und 10-Ball am Billardtisch. Offline, schnell, ein Tipp pro Punkt.">
|
||||||
|
|
||||||
@@ -25,8 +25,11 @@ import App from "../components/App";
|
|||||||
<link rel="apple-touch-icon" href="/icon-192.png">
|
<link rel="apple-touch-icon" href="/icon-192.png">
|
||||||
<style>
|
<style>
|
||||||
#app-root {
|
#app-root {
|
||||||
height: var(--app-height, 100dvh);
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -34,6 +37,11 @@ import App from "../components/App";
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app-root">
|
<div id="app-root">
|
||||||
|
<noscript>
|
||||||
|
<div style="padding: 2rem; color: #fff; text-align: center;">
|
||||||
|
BSC Score benötigt JavaScript.
|
||||||
|
</div>
|
||||||
|
</noscript>
|
||||||
<App client:only="preact" />
|
<App client:only="preact" />
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
@@ -46,4 +54,4 @@ import App from "../components/App";
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+20
-16
@@ -8,15 +8,19 @@
|
|||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Design system tokens */
|
/* Design system tokens
|
||||||
|
Keep values plain; avoid CSS calc() in variable defaults where old parsers choke. */
|
||||||
:root {
|
:root {
|
||||||
--app-height: 100dvh;
|
|
||||||
--keyboard-offset: 0px;
|
--keyboard-offset: 0px;
|
||||||
|
|
||||||
/* Safe area insets */
|
/* Safe area insets — env() with literal px fallback */
|
||||||
|
--safe-area-top: 0px;
|
||||||
--safe-area-top: env(safe-area-inset-top, 0px);
|
--safe-area-top: env(safe-area-inset-top, 0px);
|
||||||
|
--safe-area-right: 0px;
|
||||||
--safe-area-right: env(safe-area-inset-right, 0px);
|
--safe-area-right: env(safe-area-inset-right, 0px);
|
||||||
|
--safe-area-bottom: 0px;
|
||||||
--safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
--safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
||||||
|
--safe-area-left: 0px;
|
||||||
--safe-area-left: env(safe-area-inset-left, 0px);
|
--safe-area-left: env(safe-area-inset-left, 0px);
|
||||||
|
|
||||||
/* Colors */
|
/* Colors */
|
||||||
@@ -110,10 +114,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body,
|
body {
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
#app-root {
|
#app-root {
|
||||||
height: var(--app-height, 100dvh);
|
position: absolute;
|
||||||
min-height: var(--app-height, 100dvh);
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: var(--color-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -127,14 +140,6 @@ body {
|
|||||||
padding-top: var(--safe-area-top);
|
padding-top: var(--safe-area-top);
|
||||||
padding-left: var(--safe-area-left);
|
padding-left: var(--safe-area-left);
|
||||||
padding-right: var(--safe-area-right);
|
padding-right: var(--safe-area-right);
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
#app-root {
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interactive elements — touch-friendly */
|
/* Interactive elements — touch-friendly */
|
||||||
@@ -170,7 +175,7 @@ button,
|
|||||||
input, select {
|
input, select {
|
||||||
min-height: var(--touch-target-comfortable);
|
min-height: var(--touch-target-comfortable);
|
||||||
padding: var(--space-md);
|
padding: var(--space-md);
|
||||||
font-size: max(16px, var(--font-size-base));
|
font-size: 16px;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
border: 2px solid var(--color-border);
|
border: 2px solid var(--color-border);
|
||||||
border-radius: var(--radius-md);
|
border-radius: var(--radius-md);
|
||||||
@@ -227,7 +232,6 @@ input:focus-visible, select:focus-visible {
|
|||||||
|
|
||||||
.btn:active:not(:disabled) {
|
.btn:active:not(:disabled) {
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
transform: scale(0.98);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:active:not(:disabled) {
|
.btn-primary:active:not(:disabled) {
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"status": "failed",
|
"status": "passed",
|
||||||
"failedTests": [
|
"failedTests": []
|
||||||
"b5da854a7c119c37c9d5-8782df6f17e49724b9a2",
|
|
||||||
"1012373defdfca68178e-d28214002c7ecee79090"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user