@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* --- 1-base/_variables.css --- */
/* ============================================================================
   PadelFly Design System - CSS Custom Properties
   Light sporty theme inspired by padelfly.nl WordPress site
   ============================================================================ */

:root {
    /* ==========================================================================
     COLORS - Brand Palette (matching WP site exactly)
     ========================================================================== */

    /* Primary Navy Blues */
    --navy-primary: #253C56;
    /* Headings, primary text, header/nav bg */
    --navy-dark: #253C56;
    /* Header & nav bars stay dark */
    --navy-medium: #313A43;
    /* Elementor Text Color */
    --navy-light: #436D9D;
    /* Elementor Accent */

    /* Accent Yellow/Lime (exact WP match) */
    --lime-primary: #EBEA19;
    /* Logo / Accent */
    --lime-bright: #F1F155;
    /* Elementor Secondary */
    --lime-hover: #FFFF8D;

    /* ── Light Theme Backgrounds ── */
    --bg-body: #F5F7FA;
    /* Soft white page bg (easy on eyes) */
    --bg-card: #FFFFFF;
    /* Cards, modals */
    --bg-section-alt: #EEF1F5;
    /* Alternating sections */
    --bg-input: #F0F2F5;
    /* Input fields */

    /* ── Text Colors (dark-on-light) ── */
    --text-white: #253C56;
    /* Primary text → navy (semantic name kept for compat) */
    --text-white-muted: #576574;
    /* Secondary text */
    --text-white-subtle: #94A3B8;
    /* Hint/placeholder text */
    --text-dark: #253C56;
    /* Match Elementor Text */
    --text-dark-secondary: #576574;
    --text-muted: #94A3B8;
    --text-gray: #CBD5E1;

    /* ── Explicit white (for dark backgrounds like header/nav) ── */
    --text-on-dark: #FFFFFF;
    --text-on-dark-muted: rgba(255, 255, 255, 0.85);
    --text-on-dark-subtle: rgba(255, 255, 255, 0.65);

    /* Accent Colors */
    --accent-pink: #CC3366;
    --accent-blue: #436D9D;
    /* Match Elementor Accent */

    /* Surface Colors */
    --card-bg: #FFFFFF;
    --card-bg-hover: #F8FAFC;
    --section-bg-light: #FFFFFF;
    --navy-card: rgba(37, 60, 86, 0.04);
    /* Very subtle navy tint for cards */

    /* Utility Colors */
    --white: #FFFFFF;
    --gray-light: #E2E8F0;
    --gray-bg: #F8FAFC;

    /* ==========================================================================
     SHADOWS - Lighter for white UI
     ========================================================================== */
    --shadow-natural: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-deep: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-sharp: 0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Border-like shadow */
    --shadow-light: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* ==========================================================================
     TYPOGRAPHY
     ========================================================================== */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', -apple-system, "system-ui", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Font Sizes (from WP preset) */
    --font-size-small: 13px;
    --font-size-base: 16px;
    --font-size-medium: 20px;
    --font-size-large: 36px;
    --font-size-xlarge: 42px;
    --font-size-hero: 55px;

    /* Shorthand aliases */
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* ==========================================================================
     SPACING (from WP preset)
     ========================================================================== */
    --spacing-20: 0.44rem;
    --spacing-30: 0.67rem;
    --spacing-40: 1rem;
    --spacing-50: 1.5rem;
    --spacing-60: 2.25rem;
    --spacing-70: 3.38rem;
    --spacing-80: 5.06rem;

    /* Content Width */
    --content-width: 800px;
    --wide-width: 1200px;
    --block-gap: 24px;

    /* ==========================================================================
     BORDERS & RADIUS
     ========================================================================== */
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-sm: 8px;
    --border-radius-pill: 100px;
    /* WP pill buttons */
    --border-radius-card: 10px;
    /* WP card corners */

    /* ==========================================================================
     TRANSITIONS
     ========================================================================== */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Logo colors now baked into external SVG files (logo-navy.svg, logo-white.svg).
   Swap is handled via display toggle in _header.css. */
/* --- 1-base/_reset.css --- */
/* ============================================================================
   Reset & Base Styles
   ============================================================================ */

/* Import Montserrat font - PadelFly Brand Font */


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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
    color: var(--text-white);
    background: var(--bg-body, #F5F7FA);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Input placeholder styling */
input::placeholder {
    font-family: var(--font-body);
    font-weight: var(--font-weight-normal);
}

input:focus {
    outline: none;
}
/* --- 1-base/_typography.css --- */
/* ============================================================================
   Typography
   ============================================================================ */

/* Headings - Montserrat */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
}

h1 {
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-extrabold);
    line-height: 1.27;
}

h2 {
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: var(--font-size-medium);
    font-weight: var(--font-weight-semibold);
}
/* --- 1-base/_utilities.css --- */
/* ============================================================================
   Animations & Utility Classes
   ============================================================================ */

/* Micro-interactions */
@keyframes markerDrop {
    0% {
        transform: scale(0) translateY(-50px);
        opacity: 0;
    }

    70% {
        transform: scale(1.1) translateY(5px);
        opacity: 1;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes markerBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.2);
    }

    60% {
        transform: scale(1.1);
    }
}

.marker-drop {
    animation: markerDrop 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fade-out {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* --- 2-components/_buttons.css --- */
/* ============================================================================
   Button Components - Light Theme
   ============================================================================ */

/* Generic Button Base — used on feedback, tournament score modal, etc. */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--lime-primary);
    color: var(--navy-dark);
}

.btn-primary:hover {
    background: var(--lime-hover);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Primary Button - PadelFly Yellow (exact WP match) */
.primary-button {
    background: var(--lime-bright);
    color: var(--navy-primary);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-pill, 100px);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    width: 100%;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-button:hover {
    background: var(--lime-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(241, 241, 85, 0.4);
}

.primary-button:active {
    transform: translateY(0);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Secondary/Outline Button - Navy outline on light bg */
.secondary-button {
    background: transparent;
    color: var(--navy-primary);
    border: 2px solid var(--navy-primary);
    padding: 0.875rem 1.75rem;
    border-radius: var(--border-radius-pill, 100px);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition);
}

.secondary-button:hover {
    background: var(--navy-primary);
    color: #FFFFFF;
}

/* Action Button (used in feed cards) */
.action-btn {
    padding: 10px 20px;
    background: var(--lime-primary);
    color: var(--navy-dark);
    border: none;
    border-radius: var(--border-radius-pill, 100px);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-fast);
}

.action-btn:hover {
    background: var(--lime-hover);
}

/* Complete Button (challenges) */
.complete-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--navy-primary);
    border: 1px solid var(--navy-primary);
    border-radius: var(--border-radius-pill, 100px);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: var(--transition-fast);
}

.complete-btn:hover {
    background: var(--navy-primary);
    color: #FFFFFF;
}

/* Back Button */
.back-button {
    background: var(--bg-section-alt, #EEF1F5);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
}

.back-button:hover {
    background: var(--gray-light);
}

/* Icon Button */
.icon-btn {
    position: relative;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    transition: var(--transition-fast);
    text-decoration: none;
}

.icon-btn:hover {
    opacity: 0.8;
}

.icon-btn svg {
    width: 24px;
    height: 24px;
}

/* Send Button (chat) */
.send-button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--lime-primary);
    color: var(--navy-dark);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-fast);
}

.send-button:hover:not(:disabled) {
    background: var(--lime-bright);
}

.send-button:active:not(:disabled) {
    transform: scale(0.95);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tip Buttons */
.tip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--border-radius-pill, 100px);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.tip-btn svg {
    width: 16px;
    height: 16px;
}

.tip-btn.secondary {
    background: var(--bg-section-alt, #EEF1F5);
    color: var(--text-white);
}

.tip-btn.secondary:hover {
    background: var(--gray-light);
}

.tip-btn.primary {
    background: var(--lime-primary);
    border: none;
    color: var(--navy-dark);
}

.tip-btn.primary:hover {
    background: var(--lime-hover);
}
/* --- 2-components/_forms.css --- */
/* ============================================================================
   Form Components
   ============================================================================ */

.form-section {
    margin-bottom: 2rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--navy-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

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

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark-secondary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(15, 39, 68, 0.1);
    border-radius: 12px;
    background: var(--white);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
    appearance: none;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--lime-bright);
    box-shadow: 0 0 0 3px rgba(241, 241, 85, 0.2);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Responsive form grids */
@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* --- 2-components/_cards.css --- */
/* Center Card - Modern & Sleek */
.center-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card, #FFFFFF);
    border-radius: var(--border-radius-card, 10px);
    box-shadow: var(--shadow-deep);
    padding: 2rem;
    color: var(--text-white);
    transition: var(--transition);
    position: relative;
    z-index: 10;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.center-card.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Suggestion Cards */
.suggestion-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.5rem;
    justify-content: center;
}

.suggestion-btn {
    background: var(--bg-section-alt, #EEF1F5);
    color: var(--text-white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.875rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition-fast);
}

.suggestion-btn:hover {
    background: var(--lime-primary);
    color: var(--navy-primary);
    border-color: var(--lime-primary);
}

/* Feed Card Base */
.feed-card {
    background: var(--bg-card, #FFFFFF);
    border-radius: var(--border-radius-card, 10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-deep);
    margin-bottom: 12px;
    overflow: hidden;
}

.feed-card-content {
    padding: 16px;
}

/* Section Label */
.section-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 0 8px 0;
}

/* Action Labels */
.action-label {
    font-size: 13px;
    color: var(--text-white-muted);
    font-weight: 500;
}

/* View All Button */
.view-all {
    display: block;
    text-align: center;
    padding: 14px;
    color: var(--accent-blue, #436D9D);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition-fast);
}

.view-all:hover {
    color: var(--navy-primary);
    background: var(--bg-section-alt, #EEF1F5);
}

/* Discover Subtitle */
.discover-subtitle {
    font-size: 14px;
    color: var(--text-white-muted);
    margin-bottom: 12px;
}

/* Tip Image */
.tip-image {
    height: 140px;
    background: var(--bg-section-alt, #EEF1F5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-image-placeholder {
    font-size: 48px;
}

/* Tip Content */
.tip-content {
    padding: 16px;
}

.tip-category {
    display: inline-block;
    background: rgba(235, 234, 25, 0.15);
    color: var(--navy-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tip-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 4px;
}

.tip-desc {
    font-size: 14px;
    color: var(--text-white-muted);
    line-height: 1.5;
    margin: 0;
}

/* Tip Actions */
.tip-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Leaderboard Row */
.leaderboard-list {
    padding: 4px 0;
}

.leader-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition-fast);
}

.leader-row:last-child {
    border-bottom: none;
}

.leader-row:hover {
    background: var(--bg-section-alt, #EEF1F5);
}

.leader-row.you {
    background: rgba(235, 234, 25, 0.08);
}

.rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-section-alt, #EEF1F5);
    color: var(--text-white);
}

.rank.r1 {
    background: var(--lime-primary);
    color: var(--navy-primary);
}

.rank-change {
    min-width: 18px;
    margin-left: -8px;
    text-align: center;
    flex-shrink: 0;
}

.leader-info {
    flex: 1;
}

.leader-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-white);
}

.leader-tag {
    font-size: 12px;
    color: var(--lime-primary);
    font-weight: 500;
}

.leader-points {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

/* Locked Overlay */
.locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(245, 247, 250, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: var(--border-radius-card, 10px);
}

.locked-content {
    text-align: center;
    color: var(--text-white-muted);
}

.locked-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.locked-text {
    font-size: 14px;
    font-weight: 500;
}

/* Badge (notification count) */
.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--accent-pink, #CC3366);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Trip Card */
.trip-card {
    background: var(--bg-card, #FFFFFF);
    border-radius: var(--border-radius-card, 10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-natural);
    padding: 16px;
    margin-bottom: 12px;
}

.trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.trip-icon {
    font-size: 18px;
}

.trip-value {
    font-weight: 500;
    color: var(--text-white);
}

.trip-dates {
    font-size: 13px;
    color: var(--text-white-muted);
    margin-top: 8px;
}

.trip-main-item {
    width: 100%;
    font-size: 18px;
    font-weight: 600;
}

/* Groupchat Card */
.groupchat-card {
    display: flex;
    align-items: center;
    padding: 16px;
    text-decoration: none;
    color: var(--text-white);
}

.groupchat-content {
    flex: 1;
}

.groupchat-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
}

.groupchat-preview {
    font-size: 14px;
    color: var(--text-white-muted);
}

.groupchat-arrow {
    color: var(--text-white-subtle);
}

/* No trip state */
.no-trip-message {
    text-align: center;
    padding: 20px;
    color: var(--text-white-muted);
    font-size: 14px;
}
/* --- 3-layouts/_app-shell.css --- */
/* ============================================================================
   App Shell - Layout Container & Main Content Area
   ============================================================================ */

/* Layout Container */
.app-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

/* App Page Base */
.app-page {
    background: var(--bg-body, #F5F7FA);
    min-height: 100dvh;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-body, #F5F7FA);
}

/* App Main Content */
.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px;
    /* Space for bottom nav */
}

/* Map Container */
.map-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 5;
}

.map-container.active {
    opacity: 1;
    pointer-events: all;
}

.map-content {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--white);
}

.map-header {
    padding: 1rem;
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.map-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy-primary);
}

#map {
    flex: 1;
    width: 100%;
    background: #f0f0f0;
}

/* Responsive layout */
@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
}
/* --- 3-layouts/_header.css --- */
/* ============================================================================
   Header Layout — scroll-aware: light at top, dark on scroll
   ============================================================================ */

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem;
    text-align: center;
    background: var(--bg-body, #F5F7FA);
    border-bottom: 1px solid transparent;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Scrolled state — dark navy */
.app-header.scrolled {
    background: var(--navy-dark, #253C56);
    border-bottom-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 8px 16px;
}

@media (max-width: 360px) {
    .app-header-inner {
        gap: 16px;
    }
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.app-logo img {
    width: 100%;
    max-width: 200px;
    height: auto;
}

/* Default: navy logo visible, white hidden */
.app-logo .logo-scrolled { display: none; }

/* Scrolled: swap to white logo */
.app-header.scrolled .logo-default { display: none; }
.app-header.scrolled .logo-scrolled { display: block; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Default (light bg): dark icons and text */
.header-actions .icon-btn {
    color: var(--navy-dark, #253C56);
    transition: color 0.3s ease;
}

.app-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--navy-dark, #253C56);
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.app-subtitle {
    font-size: 0.875rem;
    color: var(--text-white-muted, #6B7B8D);
    font-weight: var(--font-weight-normal);
    transition: color 0.3s ease;
}

/* Scrolled state: white icons and text */
.app-header.scrolled .header-actions .icon-btn {
    color: var(--text-on-dark, #FFFFFF);
}

.app-header.scrolled .app-title {
    color: var(--text-on-dark, #FFFFFF);
}

.app-header.scrolled .app-subtitle {
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.85));
}

/* Responsive header */
@media (min-width: 640px) {
    .app-title {
        font-size: 1.75rem;
    }
}

@media (min-width: 768px) {
    .app-header {
        padding: 1.5rem;
    }
}
/* --- 3-layouts/_nav.css --- */
/* ============================================================================
   Bottom Navigation Layout
   ============================================================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--navy-dark, #253C56);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    max-width: 600px;
    margin: 0 auto;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    color: var(--text-on-dark-muted, rgba(255, 255, 255, 0.85));
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-item svg {
    width: 26px;
    height: 26px;
}

/* Visually hidden but accessible to screen readers */
.nav-item .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nav-item.active {
    color: var(--lime-primary);
}

.nav-item:hover:not(.active) {
    color: var(--text-on-dark, #FFFFFF);
}

/* Center nav item - Yellow GroupChat button */
.nav-item.nav-center {
    position: relative;
    background: var(--lime-primary);
    color: var(--navy-dark);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    margin-top: -20px;
    box-shadow: 0 4px 12px rgba(232, 232, 111, 0.4);
    transition: all 0.2s ease;
}

.nav-item.nav-center svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
}

.nav-item.nav-center:hover {
    background: var(--lime-hover);
    transform: scale(1.05);
    color: var(--navy-dark);
}

.nav-item.nav-center.active {
    background: var(--lime-bright);
    color: var(--navy-dark);
}
/* --- 4-pages/_feed.css --- */
/* ============================================================================
   Feed Page Components
   ============================================================================ */

/* Trip Card */
.trip-card {
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-medium) 100%);
    padding: 20px;
    border-radius: var(--radius-lg);
    color: var(--text-white);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.trip-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.trip-flag {
    font-size: 24px;
}

.trip-name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-white);
}

.trip-dates {
    font-size: var(--font-size-sm);
    color: var(--lime-primary);
    margin-bottom: 16px;
}

.trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--text-white-muted);
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

/* Feed Cards */
.feed-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
}

.feed-card-content {
    padding: 16px;
}

/* Action Card (MVP Vote, Restaurant Vote) */
.action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.action-info {
    flex: 1;
}

.action-label {
    font-size: var(--font-size-xs);
    color: var(--lime-primary);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.action-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-white);
}

.action-time {
    font-size: var(--font-size-xs);
    color: var(--text-white-muted);
    white-space: nowrap;
}

/* Challenge Card */
.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.challenge-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-white);
}

.challenge-points {
    padding: 4px 10px;
    background: rgba(232, 232, 111, 0.2);
    color: var(--lime-primary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
}

.challenge-desc {
    font-size: var(--font-size-sm);
    color: var(--text-white-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.challenge-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.challenge-progress {
    font-size: var(--font-size-sm);
    color: var(--text-white-muted);
}

.challenge-progress strong {
    color: var(--lime-primary);
}

/* Leaderboard Preview */
.leaderboard-list {
    padding: 8px 16px;
}

.leader-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leader-row:last-child {
    border-bottom: none;
}

.leader-row.you {
    background: rgba(232, 232, 111, 0.1);
    margin: 0 -16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
}

.rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    position: relative;
}

.rank.r1 {
    background: radial-gradient(circle at 30% 30%, #ffd700, #b8860b);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    border: 2px solid #ffd700;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.rank.r1::after {
    content: "🎾";
    position: absolute;
    font-size: 14px;
    bottom: -6px;
    right: -6px;
}

.rank.r2 {
    background: radial-gradient(circle at 30% 30%, #e0e0e0, #9e9e9e);
    color: #fff;
    box-shadow: 0 0 8px rgba(224, 224, 224, 0.3);
    border: 2px solid #bdbdbd;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.rank.r3 {
    background: radial-gradient(circle at 30% 30%, #cd7f32, #8b4513);
    color: #fff;
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.3);
    border: 2px solid #cd7f32;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.leader-info {
    flex: 1;
}

.leader-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--text-white);
}

.leader-tag {
    font-size: var(--font-size-xs);
    color: var(--lime-primary);
}

.leader-points {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--lime-primary);
}

/* Tip Card */
.tip-image {
    height: 140px;
    background: url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&q=80&w=600&h=400') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-image-placeholder {
    font-size: 48px;
}

.tip-content {
    padding: 16px;
}

.tip-category {
    font-size: var(--font-size-small);
    background: var(--navy-dark);
    color: var(--text-on-dark);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.tip-title {
    font-size: var(--font-size-medium);
    font-weight: var(--font-weight-semibold);
    color: var(--text-white);
    margin: 4px 0 8px;
}

.tip-desc {
    font-size: var(--font-size-small);
    color: var(--text-white-muted);
    line-height: 1.5;
}

.tip-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================================================
   Unified Trip Block
   ============================================================================ */
.unified-trip-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.trip-main-item {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
}

.trip-icon {
    font-size: 20px;
}

.unified-trip-info .trip-value {
    color: var(--text-white);
}

.unified-trip-info .meta-item .trip-value {
    color: var(--text-white-muted);
}

/* ============================================================================
   Groupchat Card
   ============================================================================ */
.groupchat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    text-decoration: none;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
}

.groupchat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.groupchat-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
}

.groupchat-preview {
    font-size: 13px;
    color: var(--text-white-muted);
}

.groupchat-arrow svg {
    color: var(--text-white-subtle);
    width: 20px;
    height: 20px;
}

/* ============================================================================
   State-Based Feed Layout
   ============================================================================ */
.feed-sections-container {
    display: flex;
    flex-direction: column;
}

/* Base states: hide all by default */
.feed-section {
    display: none;
    margin-bottom: 16px;
}

/* Pre-Trip State Ordering & Visibility */
.feed-sections-container[data-state="pre"] #preTripTipsSection {
    display: block;
    order: 1;
}

.feed-sections-container[data-state="pre"] #quizSection {
    display: block;
    order: 2;
}

.feed-sections-container[data-state="pre"] #discoverSection {
    display: block;
    order: 3;
}

.feed-sections-container[data-state="pre"] #leaderboardSection {
    display: block;
    order: 4;
}

/* During-Trip State Ordering & Visibility */
.feed-sections-container[data-state="during"] #lessonsSection {
    display: block;
    order: 1;
}

.feed-sections-container[data-state="during"] #leaderboardSection {
    display: block;
    order: 2;
}

.feed-sections-container[data-state="during"] #votingSection {
    display: block;
    order: 3;
}

.feed-sections-container[data-state="during"] #discoverSection {
    display: block;
    order: 4;
}

/* Trip-Ended State Ordering & Visibility */
.feed-sections-container[data-state="ended"] #feedbackSection {
    display: block;
    order: 1;
}

.feed-sections-container[data-state="ended"] #leaderboardSection {
    display: block;
    order: 2;
}

.feed-sections-container[data-state="ended"] #discoverSection {
    display: block;
    order: 3;
}

.discover-subtitle {
    font-size: 14px;
    color: var(--text-white-muted);
    margin-bottom: 12px;
}

/* Restaurant Carousel */
.discover-carousel {
    overflow: hidden;
    position: relative;
}

.discover-carousel__track {
    display: flex;
    transition: transform 0.3s ease;
}

.discover-carousel__slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 0 1px;
    box-sizing: border-box;
}

.discover-carousel__slide .feed-card {
    margin: 0;
    box-shadow: var(--shadow-deep);
}

.discover-carousel__slide .tip-image {
    height: 120px;
    background: center/cover no-repeat;
    position: relative;
}

.discover-carousel__slide .tip-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.4));
}

.discover-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 14px;
}

.discover-stars {
    color: var(--lime-primary);
    letter-spacing: 1px;
}

.discover-price {
    color: var(--text-white-muted);
    font-weight: 600;
}

.discover-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px 0 4px;
}

.discover-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.discover-carousel__dot.active {
    background: var(--lime-primary);
    border-color: var(--lime-primary);
    transform: scale(1.25);
}

/* Locked Overlay */
.locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: transparent;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.locked-overlay-background {
    position: absolute;
    inset: 0;
    background: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.locked-content {
    text-align: center;
}

.locked-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.locked-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-white);
}
/* --- 2-components/chat-base.css --- */
/* ============================================================================
   Chat Base — Shared styles for /chat, /group-chat, /tournament/chat
   All rules scoped under .chat-page to prevent leakage.
   ============================================================================ */

/* ─── Page-level overrides ─── */
.chat-page .app-header,
.chat-page .bottom-nav {
  display: none !important;
}

.chat-page .app-main {
  padding: 0 !important;
  margin-top: 0 !important;
  overflow: visible !important;
}

/* ─── Fixed header bar (dark navy) ─── */
.chat-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 56px;
  z-index: 200;
  background: var(--navy-dark, #253C56);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  padding-top: max(env(safe-area-inset-top), 0px);
}

.chat-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.chat-header__back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.chat-header__back svg {
  stroke: #FFFFFF;
}

.chat-header__title {
  flex: 1;
  font-weight: 600;
  color: #FFFFFF;
  font-size: 16px;
}

/* ─── Message area ─── */
.chat-body {
  background: var(--bg-body, #F5F7FA);
  padding: 16px;
  padding-top: calc(56px + max(env(safe-area-inset-top), 0px) + 16px);
  padding-bottom: calc(68px + max(env(safe-area-inset-bottom), 0px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100vh;
}

/* ─── Message rows ─── */
.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 90%;
  align-items: flex-start;
  animation: chatSlideIn 0.2s ease-out;
}

@keyframes chatSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Own messages — right aligned, no avatar */
.chat-msg--mine {
  flex-direction: row-reverse;
  margin-left: auto;
}

/* Other/AI messages — left aligned with avatar */
.chat-msg--other {
  align-self: flex-start;
}

/* System messages — centered pill */
.chat-msg--system {
  align-self: center;
  max-width: 90%;
}

.chat-msg--system .chat-msg__bubble {
  background: var(--bg-section-alt, #EEF1F5);
  color: var(--text-white, #253C56);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 20px;
  text-align: center;
  opacity: 0.7;
  border: none;
  box-shadow: none;
}

/* AI bot gradient (group chat @padelfly only) */
.chat-msg--ai-bot .chat-msg__bubble {
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  color: #ffffff;
  border: none;
  box-shadow: none;
}

.chat-msg--ai-bot .chat-msg__author {
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-msg--ai-bot .ai-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.chat-msg--ai-bot .chat-msg__time {
  color: rgba(255, 255, 255, 0.6);
}

/* ─── Avatar ─── */
.chat-msg__avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--navy-dark, #253C56);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.chat-msg__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.chat-msg__avatar--ai {
  background: linear-gradient(135deg, #C6FF00, #9be600);
  font-size: 14px;
}

/* ─── Bubble ─── */
.chat-msg__bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
  overflow: hidden;
}

.chat-msg--other .chat-msg__bubble {
  background: var(--bg-card, #FFFFFF);
  color: var(--text-white, #253C56);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border-top-left-radius: 4px;
}

.chat-msg--mine .chat-msg__bubble {
  background: linear-gradient(135deg, #C6FF00, #9be600);
  color: #0B1622;
  border-bottom-right-radius: 4px;
}

/* ─── Author & time ─── */
.chat-msg__author {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  opacity: 0.7;
}

.chat-msg__time {
  font-size: 10px;
  opacity: 0.5;
  margin-top: 4px;
  text-align: right;
}

.chat-msg--mine .chat-msg__time {
  color: #0B1622;
}

/* ─── Rich content inside bubbles ─── */
.chat-msg__bubble ul,
.chat-msg__bubble ol {
  padding-left: 1.2em;
  margin: 4px 0;
}

.chat-msg__bubble li {
  margin-bottom: 2px;
}

.chat-msg__bubble code {
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

.chat-msg__bubble strong {
  font-weight: 600;
}

.chat-msg__bubble em {
  font-style: italic;
}

.chat-msg__bubble a {
  color: var(--navy-primary, #253C56);
  text-decoration: underline;
  font-weight: 600;
}

.chat-msg__bubble a:hover {
  color: var(--lime-primary, #C6FF00);
}

.chat-msg--mine .chat-msg__bubble a {
  color: #0B1622;
}

/* ─── Fixed input bar (light/white) ─── */
.chat-input-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--bg-card, #FFFFFF);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input-bar__input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 24px;
  background: var(--bg-section-alt, #EEF1F5);
  color: var(--navy-dark, #253C56);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-bar__input:focus {
  border-color: rgba(198, 255, 0, 0.4);
  background: var(--bg-body, #F5F7FA);
}

.chat-input-bar__input::placeholder {
  color: var(--text-white-muted, #6B7B8D);
}

.chat-input-bar__send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #C6FF00;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.chat-input-bar__send:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(198, 255, 0, 0.3);
}

.chat-input-bar__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-input-bar__send svg {
  fill: #0B1622;
  stroke: none;
}

/* ─── Suggestions (floating above input bar) ─── */
.chat-input-bar-wrapper {
  position: relative;
}

.chat-suggestions {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px;
}

.chat-suggestions:empty {
  display: none;
}

.chat-suggestion {
  padding: 8px 14px;
  background: var(--bg-card, #FFFFFF);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  color: var(--navy-dark, #253C56);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chat-suggestion:hover {
  background: var(--lime-primary, #C6FF00);
  border-color: var(--lime-primary, #C6FF00);
  color: var(--navy-dark, #253C56);
}

/* ─── Typing indicator ─── */
.chat-typing {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 90%;
}

.chat-typing .chat-msg__avatar {
  flex-shrink: 0;
}

.chat-typing__dots {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-card, #FFFFFF);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  border-top-left-radius: 4px;
}

.chat-typing__dot {
  width: 6px;
  height: 6px;
  background: var(--lime-primary, #C6FF00);
  border-radius: 50%;
  animation: chatBounce 1.4s ease-in-out infinite;
}

.chat-typing__dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing__dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chatBounce {

  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* ─── @padelfly mention highlight ─── */
.mention-padelfly {
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.chat-msg--mine .mention-padelfly {
  background: rgba(11, 22, 34, 0.3);
  color: #0B1622;
}

/* ─── Bot action button ─── */
.chat-msg__action-btn {
  display: block;
  margin-top: 0.5rem;
  padding: 0.625rem 1rem;
  background: #C6FF00;
  color: #0B1622;
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.chat-msg__action-btn:hover,
.chat-msg__action-btn:focus {
  background: #C6FF00;
  border-color: #C6FF00;
  color: #0B1622;
}
/* --- 2-components/_pwa-install.css --- */
/* assets/css/2-components/_pwa-install.css */

.pwa-install-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Cover the entire viewport, including behind iOS Safari URL bar */
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    height: -webkit-fill-available;
    /* Very high z-index to block everything */
    z-index: 999999;
    background-color: var(--bg-body, #F5F7FA);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 24px;
    padding: env(safe-area-inset-top, 24px) 24px env(safe-area-inset-bottom, 24px);
    overflow-y: auto;
}

/* Hide the overlay automatically if the app is already installed */
@media all and (display-mode: standalone) {
    .pwa-install-overlay {
        display: none !important;
    }
}

.pwa-install-card {
    background: var(--bg-card, #FFFFFF);
    border-radius: 24px;
    padding: 40px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pwa-install-icon {
    margin-bottom: 24px;
    display: inline-block;
    line-height: 1;
}

.pwa-install-icon img {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pwa-install-title {
    color: var(--navy-dark, #253C56);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.pwa-install-desc {
    color: var(--text-white-muted, #6B7B8D);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Install Button */
.pwa-install-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: var(--navy-dark, #253C56);
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 16px rgba(37, 60, 86, 0.3);
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 60, 86, 0.4);
}

.pwa-install-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 60, 86, 0.3);
}

/* Manual Instructions (iOS / macOS / fallback) */
.pwa-manual-instructions {
    margin-top: 32px;
    background: rgba(37, 60, 86, 0.03);
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    border: 1px solid rgba(37, 60, 86, 0.05);
}

.pwa-manual-instructions p {
    color: var(--navy-dark, #253C56);
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
}

.pwa-manual-instructions ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-white-muted, #6B7B8D);
    font-size: 14px;
    line-height: 1.6;
}

.pwa-manual-instructions li {
    margin-bottom: 8px;
}

.pwa-manual-instructions strong {
    color: var(--navy-dark, #253C56);
}

.instruction-note {
    font-size: 13px !important;
    color: var(--text-white-muted, #6B7B8D) !important;
    font-weight: 400 !important;
    margin-top: 16px !important;
    margin-bottom: 0 !important;
    text-align: center;
    font-style: italic;
}

/* Base64 encoded SVGs for visual instructions */
.share-icon::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23253C56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'%3E%3C/path%3E%3Cpolyline points='16 6 12 2 8 6'%3E%3C/polyline%3E%3Cline x1='12' y1='2' x2='12' y2='15'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-bottom;
    margin-left: 4px;
    opacity: 0.8;
}

.add-icon::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23253C56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='12' y1='8' x2='12' y2='16'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='16' y2='12'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: text-bottom;
    margin-left: 4px;
    opacity: 0.8;
}

/* Prevent scrolling on the body when overlay is active */
html:not(.is-standalone) body {
    overflow: hidden !important;
}

.is-standalone .pwa-install-overlay {
    display: none !important;
}
/* --- 2-components/_push-banner.css --- */
/* Push Notification Banner */
/* Extracted from base.html inline <style> block */

.push-notification-banner {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    background: linear-gradient(135deg, #1a2634 0%, #0f1a24 100%);
    border: 1px solid rgba(232, 232, 111, 0.3);
    border-radius: 16px;
    padding: 16px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.push-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.push-banner-icon {
    font-size: 28px;
    line-height: 1;
}

.push-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.push-banner-text strong {
    color: #fff;
    font-size: 15px;
}

.push-banner-text span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.push-banner-actions {
    display: flex;
    gap: 10px;
}

.push-enable-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--lime-primary, #E8E86F);
    color: #0B1622;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.push-later-btn {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}
/* --- 2-components/_toast.css --- */
/* ============================================================================
   Toast Notification — Center HUD
   ============================================================================ */

.pf-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 9999;
    background: rgba(37, 60, 86, 0.92);
    color: var(--text-on-dark);
    padding: var(--spacing-40) var(--spacing-50);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow-heavy);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pf-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
    cursor: pointer;
}

.pf-toast.is-leaving {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
}

.pf-toast svg {
    display: block;
    margin: 0 auto 6px;
}
/* --- 2-components/_confirm.css --- */
/* ============================================================================
   Confirm Dialog — Center Modal
   ============================================================================ */

.pf-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(37, 60, 86, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pf-confirm-overlay.is-visible {
    opacity: 1;
}

.pf-confirm {
    background: var(--bg-card);
    border-radius: 14px;
    padding: var(--spacing-50);
    width: min(320px, calc(100vw - 48px));
    box-shadow: var(--shadow-heavy);
    text-align: center;
    font-family: var(--font-body);
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.pf-confirm-overlay.is-visible .pf-confirm {
    transform: scale(1);
}

.pf-confirm-icon {
    margin-bottom: var(--spacing-30);
}

.pf-confirm-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-20);
}

.pf-confirm-message {
    font-size: var(--font-size-small);
    color: var(--text-dark-secondary);
    margin-bottom: var(--spacing-50);
}

.pf-confirm-actions {
    display: flex;
    gap: var(--spacing-30);
}

.pf-confirm-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-fast);
}

.pf-confirm-btn--cancel {
    background: var(--bg-section-alt);
    color: var(--text-dark);
}

.pf-confirm-btn--cancel:active {
    background: var(--gray-light);
}

.pf-confirm-btn--confirm {
    background: var(--navy-primary);
    color: var(--text-on-dark);
}

.pf-confirm-btn--confirm:active {
    opacity: 0.85;
}

.pf-confirm-btn--destructive {
    background: #DC2626;
    color: #fff;
}

.pf-confirm-btn--destructive:active {
    background: #B91C1C;
}