/*
 * HockeyTools.ca — Shared Stylesheet
 *
 * Purpose: Design tokens and common components shared across all pages.
 * Usage:   Add <link rel="stylesheet" href="styles.css"> to each page's <head>.
 *          Page-specific styles remain in each file's <style> block.
 *
 * Contents:
 *   1. Design Tokens (CSS Variables)
 *   2. Reset & Base
 *   3. Page Layout
 *   4. Typography
 *   5. Form Elements
 *   6. Buttons
 *   7. Navigation (Home Link, Hamburger)
 *   8. Fly-in Panels & Overlay
 *   9. Status Badges
 *  10. Feature Tags
 *  11. Stripe Accent (Logo / Brand)
 *  12. Site Header & Footer (index page)
 *  13. Tool Cards (index page)
 *  14. Media Queries
 */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */

:root {
    /* Brand */
    --color-brand-red:      #E31837;

    /* Greyscale palette */
    --color-dark-900:       #1a1a1a;
    --color-dark-800:       #2d2d2d;
    --color-dark-700:       #3d3d3d;
    --color-slate-700:      #4a5568;
    --color-slate-800:      #2d3748;
    --color-slate-500:      #6b7280;
    --color-slate-400:      #9ca3af;
    --color-text-primary:   #333;
    --color-text-secondary: #555;
    --color-text-muted:     #666;
    --color-text-light:     #ccc;
    --color-border-strong:  #4a5568;
    --color-border-medium:  #d0d0d0;
    --color-border-light:   #e0e0e0;
    --color-border-faint:   #ddd;
    --color-bg-page:        #f0f0f0;
    --color-bg-subtle:      #f5f5f5;
    --color-bg-input:       #f8f9fa;
    --color-white:          #ffffff;

    /* Status colours (greyscale-aligned) */
    --color-status-active:   #4caf50;
    --color-status-delayed:  #ff9800;
    --color-status-returned: #9e9e9e;
    --color-status-waiting:  #ffc107;

    /* Shadows */
    --shadow-card:    0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-card-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-nav:     0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-nav-lg:  0 6px 16px rgba(0, 0, 0, 0.4);
    --shadow-panel:  -4px 0 20px rgba(0, 0, 0, 0.3);

    /* Radii */
    --radius-sm:  4px;
    --radius-md:  5px;
    --radius-lg:  8px;
    --radius-xl:  10px;
    --radius-pill: 15px;

    /* Spacing */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  15px;
    --space-lg:  20px;
    --space-xl:  30px;

    /* Typography */
    --font-family: Arial, sans-serif;
    --font-size-xs:   10px;
    --font-size-sm:   12px;
    --font-size-base: 13px;
    --font-size-md:   14px;
    --font-size-lg:   16px;
    --font-size-xl:   20px;
    --font-size-2xl:  24px;
    --font-size-3xl:  32px;
    --font-size-hero: 36px;
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--color-dark-900) 0%, var(--color-dark-800) 100%);
    padding: var(--space-lg);
    min-height: 100vh;
}


/* ============================================================
   3. PAGE LAYOUT
   ============================================================ */

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
}

.container--wide {
    max-width: 1200px;
}

.container--narrow {
    max-width: 800px;
}

.container--xl {
    max-width: 1400px;
}


/* ============================================================
   4. TYPOGRAPHY
   ============================================================ */

h1 {
    color: var(--color-text-primary);
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-md);
    line-height: 1.6;
}

label {
    font-weight: bold;
    margin-bottom: 3px;
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    display: block;
}


/* ============================================================
   5. FORM ELEMENTS
   ============================================================ */

input,
select {
    padding: 6px 8px;
    border: 2px solid var(--color-border-faint);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-slate-700);
}

.form-section {
    background: var(--color-bg-input);
    padding: 10px;
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}


/* ============================================================
   6. BUTTONS
   ============================================================ */

button {
    background: var(--color-slate-700);
    color: var(--color-white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: var(--color-slate-800);
}

/* Scenario / menu list buttons */
.scenario-btn {
    background: var(--color-bg-page);
    color: var(--color-slate-700);
    border: 2px solid var(--color-border-medium);
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: normal;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    width: 100%;
    margin-top: 8px;
    text-align: left;
}

.scenario-btn:hover {
    background: var(--color-slate-700);
    color: var(--color-white);
}

/* Close button for panels */
.guide-close-btn {
    background: var(--color-slate-500);
    color: var(--color-white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.guide-close-btn:hover {
    background: var(--color-slate-700);
}


/* ============================================================
   7. NAVIGATION (HOME LINK, HAMBURGER)
   ============================================================ */

.home-link {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--color-white);
    color: var(--color-slate-700);
    border: 2px solid var(--color-slate-700);
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-md);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-nav);
    transition: all 0.3s;
    z-index: 1000;
    text-decoration: none;
    display: inline-block;
}

.home-link:hover {
    background: var(--color-slate-700);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-nav-lg);
}

.hamburger-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-slate-700);
    color: var(--color-white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-nav);
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-btn:hover {
    background: var(--color-slate-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-nav-lg);
}


/* ============================================================
   8. FLY-IN PANELS & OVERLAY
   ============================================================ */

.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 998;
}

.guide-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Menu panel (narrower — scenarios, settings) */
.menu-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: var(--shadow-panel);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
    padding: var(--space-lg);
}

.menu-panel.open {
    right: 0;
}

/* Guide panel (wider — training content) */
.guide-panel {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: var(--shadow-panel);
    transition: right 0.3s ease-in-out;
    z-index: 1002;
    overflow-y: auto;
    padding: var(--space-xl);
}

.guide-panel.open {
    right: 0;
}

.menu-panel-header,
.guide-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: 15px;
    border-bottom: 3px solid var(--color-slate-700);
}

.menu-panel-header h2,
.guide-panel-header h2 {
    color: var(--color-slate-700);
    font-size: var(--font-size-xl);
    margin: 0;
}

.menu-section {
    margin-bottom: 25px;
}

.menu-section-title {
    font-size: var(--font-size-md);
    font-weight: bold;
    color: var(--color-slate-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--color-border-light);
    margin-bottom: var(--space-sm);
}

/* Generic fly-in trigger button */
.guide-trigger {
    background: var(--color-slate-700);
    color: var(--color-white);
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-md);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-bottom: 15px;
}

.guide-trigger:hover {
    background: var(--color-slate-800);
}


/* ============================================================
   9. STATUS BADGES
   ============================================================ */

.status-badge {
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-xs);
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.active  { background: var(--color-status-active);   color: var(--color-white); }
.status-badge.delayed { background: var(--color-status-delayed);   color: var(--color-white); }
.status-badge.returned{ background: var(--color-status-returned);  color: var(--color-white); }
.status-badge.waiting { background: var(--color-status-waiting);   color: var(--color-text-primary); }


/* ============================================================
   10. FEATURE TAGS
   ============================================================ */

.features {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.feature-tag {
    background: #e8e8e8;
    color: var(--color-text-primary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: bold;
}


/* ============================================================
   11. STRIPE ACCENT (BRAND / LOGO)
   ============================================================ */

.stripe-accent {
    display: flex;
    gap: 3px;
    height: 4px;
}

.stripe-accent span {
    flex: 1;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Site header stripes: white + red */
.stripe-accent span:nth-child(odd)  { background: var(--color-white); }
.stripe-accent span:nth-child(even) { background: var(--color-brand-red); }

/* Tool card stripes: dark + red */
.tool-card .stripe-accent span:nth-child(odd)  { background: var(--color-text-primary); }
.tool-card .stripe-accent span:nth-child(even) { background: var(--color-brand-red); }

.site-logo:hover .stripe-accent span { height: 5px; }

.tool-card .stripe-accent { margin-bottom: 15px; }


/* ============================================================
   12. SITE HEADER & FOOTER (index.html)
   ============================================================ */

header {
    text-align: center;
    color: var(--color-white);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border-bottom: 2px solid #444;
}

header h1 {
    font-size: var(--font-size-hero);
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: var(--color-white);
    text-align: center;
}

header p {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
}

footer {
    text-align: center;
    color: var(--color-text-light);
    padding: 30px 20px 20px;
    margin-top: var(--space-xl);
    border-top: 2px solid #444;
}

footer a {
    color: var(--color-text-light);
    text-decoration: underline;
}

.site-logo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s;
}

.site-logo:hover {
    transform: translateY(-2px);
}

.logo-title {
    font-size: var(--font-size-hero);
    font-weight: bold;
    letter-spacing: -0.5px;
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.logo-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-light);
    margin-top: 5px;
}


/* ============================================================
   13. TOOL CARDS (index.html)
   ============================================================ */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    padding: 10px 0;
}

.tool-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s, border 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border: 2px solid #666;
}

.tool-card h2 {
    color: var(--color-dark-900);
    font-size: var(--font-size-xl);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-card h2 .icon {
    font-size: 18px;
    flex-shrink: 0;
}

.tool-card p {
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
    font-size: var(--font-size-md);
}


/* ============================================================
   14. MEDIA QUERIES
   ============================================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .menu-panel {
        width: 85%;
        right: -85%;
    }

    .guide-panel {
        width: 90%;
        right: -90%;
    }

    .home-link,
    .hamburger-btn {
        padding: 8px 12px;
        font-size: var(--font-size-sm);
    }

    .hamburger-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .logo-title {
        font-size: 28px;
    }

    .logo-subtitle {
        font-size: var(--font-size-md);
    }

    .stripe-accent {
        height: 3px;
    }
}
