﻿/* HoonTrack Design System - Shared Design Tokens */

:root {
    /* Color Palette */
    --color-bg: #f8fafc;
    --color-card-bg: #fff8fa;
    --color-input-bg: #f3f8ff;
    --color-primary: #aee9f7;
    --color-primary-hover: #b8e4d6;
    --color-text: #2d3a4a;
    --color-text-light: #6b7280;
    --color-text-muted: #9ca3af;
    --color-error: #e57373;
    --color-error-bg: #fff0f0;
    --color-success: #81c784;
    --color-success-bg: #f0fff0;
    --color-warning: #ffa726;
    --color-warning-bg: #fff4e6;
    --color-border: #e0e7ef;
    --color-border-light: #e5e7eb;
    /* Modern Blue Theme (for interactive elements) */
    --color-blue: #007bff;
    --color-blue-hover: #0056b3;
    --color-blue-light: #e9ecef;
    /* Neutral Grays */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    /* Spacing Scale */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.7rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.2rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.7rem;
    --radius-lg: 1.5rem;
    /* Typography */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* Global Resets */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    min-height: 100%;
}

/* Responsive Images and Media */
img,
video,
canvas,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 767px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Utility Classes */
.text-muted {
    color: var(--color-text-light);
}

.text-error {
    color: var(--color-error);
}

.text-success {
    color: var(--color-success);
}

.bg-card {
    background: var(--color-card-bg);
}

.bg-input {
    background: var(--color-input-bg);
}

/* Inline Error Alert - for ClubCard join button errors */
.inline-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.inline-alert--error {
    background-color: var(--color-error-bg);
    border: 1px solid #fcc;
    color: #c33;
}

.inline-alert__message {
    flex: 1;
    margin-right: 0.5rem;
}

.inline-alert__dismiss {
    background: none;
    border: none;
    color: #c33;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

    .inline-alert__dismiss:hover {
        color: #911;
    }
/* Global styled input for modals and forms */
.styled-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg) !important;
    font-size: var(--font-base) !important;
    font-family: var(--font-family) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    background: var(--color-input-bg) !important;
    color: var(--color-text) !important;
    transition: all 0.2s ease !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
}

    .styled-input:focus {
        outline: none !important;
        border-color: var(--color-primary) !important;
        background: white !important;
        box-shadow: 0 0 0 3px rgba(77, 143, 255, 0.1) !important;
    }

    .styled-input:disabled {
        background: var(--color-gray-100) !important;
        cursor: not-allowed !important;
        opacity: 0.6 !important;
    }

    .styled-input::placeholder {
        color: var(--color-text-muted) !important;
    }
