/* ===================================
   WatchUm - Centralized Styles
   All colors, fonts, and styling in one place
   =================================== */

/* Fonts now loaded by /assets/css/watchum-tokens.css (Archivo Black + JetBrains Mono) */

/* ===================================
   CSS VARIABLES - CHANGE COLORS HERE!
   =================================== */
:root {
    /* ── Blue Intelligence tokens (palette: #0000b3 / #001f7d / #809fff / #bfcfff / #ffffff) ── */
    --bg-void: #000a3d;
    --bg-main: #001f7d;
    --bg-card: #0c2a8a;
    --bg-elevated: #1a3aa0;
    --accent: #809fff;
    --accent-bright: #bfcfff;
    --accent-dim: rgba(128, 159, 255, 0.18);
    --accent-violet: #0000b3;
    --text-primary: #ffffff;
    --text-secondary: #bfcfff;
    --text-muted: #809fff;
    --text-subtle: rgba(128, 159, 255, 0.5);
    --border: rgba(191, 207, 255, 0.18);
    --font-display: 'Barlow', sans-serif;
    --font-ui: 'Barlow', sans-serif;
    --font-body: 'Barlow', sans-serif;
    /* Primary Colors - Vivid Blue Accent */
    --color-primary: #0000b3;           /* Vivid blue (links, buttons, highlights) */
    --color-primary-dark: #001f7d;      /* Darker navy for hover states */
    --color-primary-darker: #000a3d;    /* Darkest navy for active states */

    /* Background Colors */
    --color-bg-main: #001f7d;           /* Dark navy - Main page background */
    --color-bg-nav: rgba(0, 10, 61, 0.95);  /* Deep navy with transparency - Navigation */
    --color-bg-card: #000a3d;           /* Deepest navy - Cards/reports */
    --color-bg-gradient-start: #000a3d; /* Deep navy - Gradient start */
    --color-bg-gradient-end: #001f7d;   /* Navy blue - Gradient end */

    /* Text Colors */
    --color-text-primary: #ffffff;      /* Pure white - Headings */
    --color-text-secondary: #bfcfff;    /* Light blue - Body text */
    --color-text-muted: rgba(191, 207, 255, 0.85);  /* Muted light blue */
    --color-text-light: rgba(191, 207, 255, 0.75);  /* Light text */
    --color-text-lighter: rgba(191, 207, 255, 0.6); /* Lighter text */
    --color-text-subtle: rgba(191, 207, 255, 0.5);  /* Subtle text */

    /* Border Colors */
    --color-border: rgba(191, 207, 255, 0.18);       /* Light blue borders */
    --color-border-light: rgba(191, 207, 255, 0.08); /* Lighter borders */

    /* Accent Colors */
    --color-disclaimer-bg: rgba(128, 159, 255, 0.15); /* Blue tinted disclaimer */
    --color-gold: #809fff;              /* Medium blue accent (legacy var name) */
    
    /* Fonts */
    --font-main: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

/* ===================================
   GLOBAL STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* font/background/color provided by /assets/css/watchum-tokens.css */
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-text-primary);
}

/* ===================================
   NAVIGATION — chrome moved to /assets/css/watchum-components.css
   (.site-header / .navbar-inner / .navbar-brand / .navbar-links).
   Only the mobile hamburger + nav-account-link helpers stay here.
   =================================== */

.nav-account-link {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    text-decoration: none;
    transition: color 0.15s;
}

.nav-account-link:hover {
    color: var(--text-primary);
}

/* ── Mobile nav hamburger button (injected by auth.js) ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary, #ffffff);
    flex-shrink: 0;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    margin: 0 auto;
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
    /* Show the hamburger; mobile nav-links overlay is in
       /assets/css/watchum-components.css (.navbar-links @ max-width:768px). */
    .nav-hamburger { display: flex; }
}

/* ===================================
   FOOTER
   =================================== */
footer {
    background: var(--color-bg-nav);
    border-top: 1px solid var(--color-border);
    margin-top: 80px;
    padding: 60px 40px 32px 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xxl);
    margin-bottom: var(--spacing-xxl);
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.footer-brand p {
    color: var(--color-text-lighter);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: var(--spacing-sm);
}

.footer-column a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom p {
    color: var(--color-text-subtle);
    font-size: 13px;
    margin: 0;
}

@media (max-width: 768px) {
    footer {
        padding: 40px 24px 24px 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================
   REPORT PAGES
   =================================== */
.report-container {
    padding: 40px 20px;
}

.report-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
}

.report-card h1 {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.address {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
    font-size: 16px;
}

.last-updated {
    color: var(--color-text-subtle);
    font-size: 13px;
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

/* Disclaimer */
.disclaimer {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) 20px;
    background: var(--color-disclaimer-bg);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Time Period */
.time-period {
    color: var(--color-text-lighter);
    font-size: 14px;
    margin-bottom: var(--spacing-lg);
}

/* Time Selector */
.time-selector {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    background: var(--color-border-light);
    border-radius: var(--radius-md);
    padding: 4px;
}

.time-option {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-light);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.time-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.time-option.active {
    background: var(--color-primary-darker);
    color: var(--color-text-primary);
}

/* Buttons */
.button-group {
    position: absolute;
    top: 40px;
    right: 40px;
    display: flex;
    gap: var(--spacing-sm);
}

.watch-button,
.share-button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.watch-button {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.watch-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.watch-button.watching {
    background: var(--color-primary-darker);
    border-color: var(--color-primary);
    color: var(--color-text-primary);
}

.share-button {
    background: var(--color-primary-darker);
    color: var(--color-text-primary);
}

.share-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* Crime Breakdown */
.breakdown {
    display: grid;
    gap: var(--spacing-md);
}

.crime-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
}

.crime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.crime-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.crime-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
}

.crime-description {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.crime-bar {
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: var(--spacing-sm);
}

.crime-bar-fill {
    height: 100%;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

/* Upgrade Prompt */
.upgrade-prompt {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    text-align: center;
}

.upgrade-prompt h3 {
    font-size: 20px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.upgrade-prompt p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}

.btn-upgrade {
    display: inline-block;
    padding: 12px 24px;
    background: var(--color-primary);
    color: var(--color-text-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-upgrade:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.share-modal.active {
    display: flex;
}

.share-modal-content {
    background: var(--color-bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
}

.share-modal-content h3 {
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-primary);
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.share-option {
    padding: var(--spacing-md);
    background: var(--color-primary-darker);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.share-option:hover {
    background: var(--color-primary-dark);
}

.share-close {
    width: 100%;
    padding: var(--spacing-sm);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-light);
    cursor: pointer;
}

.share-close:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-bg-card);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .report-card {
        padding: 24px;
    }
    
    .button-group {
        position: static;
        margin-bottom: var(--spacing-lg);
    }
    
    .report-card h1 {
        font-size: 24px;
    }
}

/* ===================================
   HOMEPAGE STYLES
   =================================== */
.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-primary);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xxl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Type Buttons */
.search-type-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.search-type-btn {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.search-type-btn.active {
    background: var(--color-primary);
    color: var(--color-text-primary);
}

.search-type-btn:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
}

.search-type-btn:hover {
    transform: translateY(-2px);
}

/* Popular Searches */
.popular-searches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.popular-searches span {
    color: var(--color-text-lighter);
}

.popular-search-btn {
    padding: 8px 16px;
    background: rgba(128, 159, 255, 0.2);
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.popular-search-btn:hover {
    background: var(--color-primary);
    color: var(--color-text-primary);
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.1);
}

.search-input::placeholder {
    color: var(--color-text-lighter);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.dropdown.active {
    display: block;
}

.dropdown-item {
    padding: 16px 24px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item-name {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.dropdown-item-address {
    font-size: 14px;
    color: var(--color-text-lighter);
}

/* Request Form */
.request-link {
    color: var(--color-primary);
    cursor: pointer;
    margin-top: var(--spacing-sm);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .search-type-buttons {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto var(--spacing-xl) auto;
    }
}
