This commit is contained in:
2026-02-26 09:09:56 +01:00
commit 7862273342
6 changed files with 1335 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
WebApp/LT24_Markenlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

405
WebApp/app.js Normal file
View File

@@ -0,0 +1,405 @@
/**
* Truck & Country Festival Guide | app.js v3
* Spec: config-driven · session management · n8n webhooks · XSS-safe
*/
'use strict';
// ─── Global State (#5.1) ─────────────────────────────────────
window.FESTIVAL = {
session_id: null,
entry: null, // 'truck' | 'family'
sponsor: null,
};
let CFG = {};
let IS_SENDING = false; // #7: max 1 concurrent request
// ─── Utilities ───────────────────────────────────────────────
function uuidV4() {
if (typeof crypto !== 'undefined' && crypto.randomUUID) return crypto.randomUUID();
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
const r = (Math.random() * 16) | 0;
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
});
}
/** Safe text setter never innerHTML with dynamic data */
function setText(id, text) {
const el = document.getElementById(id);
if (el) el.textContent = text || '';
}
function setAttr(id, attr, val) {
const el = document.getElementById(id);
if (el && val) el.setAttribute(attr, val);
}
// ─── Session Management (#5.1) ───────────────────────────────
/**
* Get or create a persistent session ID.
* Stored in localStorage so returning visitors keep their ID.
*/
function getOrCreateSessionId() {
const KEY = 'festival_session_id';
try {
let id = localStorage.getItem(KEY);
if (!id) {
id = uuidV4();
localStorage.setItem(KEY, id);
}
return id;
} catch (_) {
// localStorage blocked (private mode / Safari ITP) use in-memory
return uuidV4();
}
}
// ─── Config Loader ───────────────────────────────────────────
async function loadConfig() {
// Try embedded config first (for file:// protocol)
if (window.EMBEDDED_CONFIG) {
return window.EMBEDDED_CONFIG;
}
// Fallback to fetching config.json (for http:// protocol)
const res = await fetch('config.json', { cache: 'no-store' });
if (!res.ok) throw new Error(`config.json HTTP ${res.status}`);
return res.json();
}
// ─── Apply config → DOM ──────────────────────────────────────
function applyCSSVars(cfg) {
const r = document.documentElement;
const map = {
'--c-bg': cfg.primary_color || '#1A1208',
'--c-bg2': cfg.secondary_color || '#2C2010',
'--c-accent': cfg.accent_color || '#D4820A',
'--c-accent-light': cfg.accent_light || '#F5A623',
'--c-text': cfg.text_light || '#F5F0E8',
'--c-muted': cfg.text_muted || '#A89880',
};
for (const [k, v] of Object.entries(map)) r.style.setProperty(k, v);
}
function applyImages(cfg) {
const t = document.getElementById('half-img-truck');
const f = document.getElementById('half-img-family');
if (t && cfg.hero_truck_image) t.style.backgroundImage = `url('${cfg.hero_truck_image}')`;
if (f && cfg.hero_family_image) f.style.backgroundImage = `url('${cfg.hero_family_image}')`;
}
function applyHeader(cfg) {
const logo = document.getElementById('hdr-logo');
if (logo) { logo.src = cfg.logo_path || ''; logo.alt = `${cfg.event_name || 'Event'} Logo`; }
setText('hdr-event-name', cfg.event_name);
setText('hdr-event-dates', cfg.event_dates);
setText('hdr-presented-by', `Presented by ${cfg.sponsor_name || ''}`);
// #4: hook text
setText('hdr-hook', cfg.header_hook || '');
const sLogo = document.getElementById('hdr-sponsor-logo');
if (sLogo) { sLogo.src = cfg.sponsor_logo_path || ''; sLogo.alt = `${cfg.sponsor_name || 'Sponsor'} Logo`; }
if (cfg.event_name) document.title = `${cfg.event_name} Festival Guide`;
}
function applyHero(cfg) {
setText('cta-truck-label', cfg.cta_primary_label);
setText('cta-family-label', cfg.cta_secondary_label);
// Event strip
setText('strip-event-name', cfg.event_name);
setText('strip-dates', cfg.event_dates);
setText('strip-location', cfg.event_location);
}
function applyBenefits(cfg) {
const list = document.getElementById('benefits-list');
if (!list || !Array.isArray(cfg.benefits)) return;
cfg.benefits.forEach(b => {
const li = document.createElement('li'); li.className = 'benefit-card';
const icon = document.createElement('span'); icon.className = 'benefit-icon'; icon.setAttribute('aria-hidden','true'); icon.textContent = b.icon || '';
const title = document.createElement('h3'); title.className = 'benefit-title'; title.textContent = b.title || '';
const text = document.createElement('p'); text.className = 'benefit-text'; text.textContent = b.text || '';
li.append(icon, title, text);
list.appendChild(li);
});
}
/** #8: Guide preview cards */
function applyGuidePreview(cfg) {
const grid = document.getElementById('guide-preview-grid');
if (!grid) return;
const examples = cfg.guide_examples || [
{ q: 'Wann macht der Einlass auf?', a: 'Der Einlass startet Samstag um 8 Uhr. Du kannst auch schon am Freitagabend anreisen und direkt campen.' },
{ q: 'Wo findet die Truck Trial EM statt?', a: 'Im Offroad-Gelände des DEKRA Lausitzrings direkt einsehbar vom Hauptpublikumsbereich.' },
{ q: 'Gibt es Parken und Camping vor Ort?', a: 'Ja! Großparkplatz am Gelände, Camping im Truck & Country Camp beides direkt am Veranstaltungsort.' },
];
examples.forEach(ex => {
const card = document.createElement('div'); card.className = 'guide-card';
const q = document.createElement('p'); q.className = 'guide-card-q'; q.textContent = ex.q;
const a = document.createElement('p'); a.className = 'guide-card-a'; a.textContent = ex.a;
card.append(q, a);
grid.appendChild(card);
});
}
function applyOfficialSection(cfg) {
setText('official-headline', cfg.official_section_headline);
setText('official-text', cfg.official_section_text);
const evBtn = document.getElementById('official-event-btn');
if (evBtn) { evBtn.textContent = cfg.official_event_button_label || 'Zur Eventseite'; if (cfg.official_event_url) evBtn.href = cfg.official_event_url; }
const hlBtn = document.getElementById('official-highlights-btn');
if (hlBtn) {
if (cfg.official_highlights_url) {
hlBtn.textContent = cfg.official_highlights_button_label || 'Highlights';
hlBtn.href = cfg.official_highlights_url;
hlBtn.style.display = '';
} else {
hlBtn.style.display = 'none';
}
}
}
function applyFooter(cfg) {
setAttr('footer-imprint', 'href', cfg.legal_imprint_url);
setAttr('footer-privacy', 'href', cfg.legal_privacy_url);
}
function applyChatUI(cfg) {
const ticketBtn = document.getElementById('chat-ticket-btn');
if (ticketBtn) { ticketBtn.href = cfg.ticket_link || cfg.official_event_url || '#'; ticketBtn.textContent = cfg.chat_ticket_label || 'Tickets'; }
const infoLink = document.getElementById('chat-official-link');
if (infoLink) { infoLink.href = cfg.official_event_url || '#'; infoLink.textContent = cfg.chat_info_label || 'Offizielle Infos ↗'; }
const input = document.getElementById('chat-input');
if (input) input.placeholder = cfg.chat_input_placeholder || 'Deine Frage...';
}
// ─── Chat UI helpers ──────────────────────────────────────────
function appendBubble(type, text, actions) {
const msgs = document.getElementById('chat-messages');
if (!msgs) return;
const div = document.createElement('div');
div.className = `chat-bubble chat-bubble--${type}`;
div.setAttribute('role', 'article');
div.textContent = text; // textContent only no XSS (#6)
if (actions?.length) {
const row = document.createElement('div'); row.className = 'chat-fallback-actions';
actions.forEach(({ label, href }) => {
if (!href) return;
const a = document.createElement('a');
a.className = 'chat-fallback-link';
a.href = href; a.target = '_blank'; a.rel = 'noopener noreferrer';
a.textContent = label;
row.appendChild(a);
});
div.appendChild(row);
}
msgs.appendChild(div);
msgs.scrollTop = msgs.scrollHeight; // #7: auto-scroll
return div;
}
function showTyping() {
const msgs = document.getElementById('chat-messages');
if (!msgs) return null;
const el = document.createElement('div'); el.className = 'chat-typing'; el.setAttribute('aria-label','schreibt...');
el.innerHTML = '<span></span><span></span><span></span>';
msgs.appendChild(el);
msgs.scrollTop = msgs.scrollHeight;
return el;
}
function showFallback() {
appendBubble('error',
CFG.chat_fallback_message || 'Kurz hakt es gerade. Hier sind Tickets + offizielle Infos.',
[
{ label: '🎟 Tickets', href: CFG.ticket_link || CFG.official_event_url },
{ label: '↗ Offizielle Infos', href: CFG.official_event_url },
]
);
}
// ─── n8n Webhook (#5.2, #6) ──────────────────────────────────
async function postWebhook(path, body) {
const base = (CFG.webhook_base || '').replace(/\/$/, '');
const res = await fetch(`${base}${path}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
signal: AbortSignal.timeout(12000),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.json();
}
async function startSession(entry) {
const payload = {
entry,
sponsor: window.FESTIVAL.sponsor,
session_id: window.FESTIVAL.session_id,
timestamp: new Date().toISOString(),
page_url: location.href,
user_agent: navigator.userAgent, // #5.2
};
const typing = showTyping();
try {
const data = await postWebhook('/festival/start', payload);
if (typing) typing.remove();
const reply = (data?.reply && typeof data.reply === 'string')
? data.reply
: (entry === 'truck' ? CFG.chat_welcome_truck : CFG.chat_welcome_family)
|| 'Hi! Ich bin dein Festival-Guide. Sag mir kurz: Tagesbesuch oder Wochenende?'; // #5.2 fallback
appendBubble('bot', reply);
} catch (_) {
if (typing) typing.remove();
const welcome = entry === 'truck' ? CFG.chat_welcome_truck : CFG.chat_welcome_family;
if (welcome) appendBubble('bot', welcome);
showFallback();
}
}
async function sendMessage(text) {
if (!text.trim() || IS_SENDING) return; // #7: queue verhindern
IS_SENDING = true;
const input = document.getElementById('chat-input');
const sendBtn = document.getElementById('chat-send-btn');
if (input) { input.disabled = true; input.value = ''; }
if (sendBtn) sendBtn.disabled = true;
appendBubble('user', text);
const payload = {
session_id: window.FESTIVAL.session_id,
entry: window.FESTIVAL.entry,
sponsor: window.FESTIVAL.sponsor,
message: text,
timestamp: new Date().toISOString(),
};
const typing = showTyping();
try {
const data = await postWebhook('/festival/message', payload);
if (typing) typing.remove();
const reply = (data?.reply && typeof data.reply === 'string' && data.reply.trim())
? data.reply : '…';
appendBubble('bot', reply);
} catch (_) {
if (typing) typing.remove();
showFallback();
} finally {
IS_SENDING = false;
if (input) { input.disabled = false; input.focus(); }
if (sendBtn) sendBtn.disabled = false;
}
}
// ─── Modal open / close ──────────────────────────────────────
function openChat(entry) {
// #5.1: set global state
window.FESTIVAL.entry = entry;
window.FESTIVAL.session_id = getOrCreateSessionId();
window.FESTIVAL.sponsor = CFG.sponsor_name || '';
const modal = document.getElementById('chat-modal');
const msgs = document.getElementById('chat-messages');
const input = document.getElementById('chat-input');
if (!modal) return;
// Clear previous
while (msgs?.firstChild) msgs.removeChild(msgs.firstChild);
if (input) { input.value = ''; input.disabled = false; }
const sb = document.getElementById('chat-send-btn');
if (sb) sb.disabled = false;
IS_SENDING = false;
modal.hidden = false;
document.body.style.overflow = 'hidden';
setTimeout(() => input?.focus(), 350);
startSession(entry);
}
function closeChat() {
const modal = document.getElementById('chat-modal');
if (!modal) return;
modal.hidden = true;
document.body.style.overflow = '';
}
// ─── Events ──────────────────────────────────────────────────
function bindEvents() {
document.getElementById('cta-truck')?.addEventListener('click', () => openChat('truck'));
document.getElementById('cta-family')?.addEventListener('click', () => openChat('family'));
document.getElementById('chat-close-btn')?.addEventListener('click', closeChat);
document.getElementById('chat-backdrop')?.addEventListener('click', closeChat);
// #7: Send on click
document.getElementById('chat-send-btn')?.addEventListener('click', () => {
const val = document.getElementById('chat-input')?.value?.trim();
if (val) sendMessage(val);
});
// #7: Enter = send, Shift+Enter = (no-op, single-line input anyway)
document.getElementById('chat-input')?.addEventListener('keydown', e => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
const val = e.target.value.trim();
if (val) sendMessage(val);
}
});
// Close on Escape
document.addEventListener('keydown', e => {
if (e.key === 'Escape') {
const m = document.getElementById('chat-modal');
if (m && !m.hidden) closeChat();
}
});
}
// ─── Init ────────────────────────────────────────────────────
async function init() {
try {
CFG = await loadConfig();
} catch (err) {
console.error('[FestivalGuide] config.json failed:', err);
document.body.innerHTML = `
<div style="display:flex;align-items:center;justify-content:center;min-height:100vh;
font-family:sans-serif;color:#F5F0E8;background:#1A1208;padding:2rem;text-align:center;">
<div>
<p style="font-size:1.1rem;margin-bottom:1rem;">Festival Guide konnte nicht geladen werden.</p>
<a href="https://dekra-lausitzring.de/event/truck-country-wochenende/"
target="_blank" rel="noopener noreferrer" style="color:#D4820A;text-decoration:underline;">
Direkt zur offiziellen Eventseite →
</a>
</div>
</div>`;
return;
}
applyCSSVars(CFG);
applyImages(CFG);
applyHeader(CFG);
applyHero(CFG);
applyBenefits(CFG);
applyGuidePreview(CFG);
applyOfficialSection(CFG);
applyFooter(CFG);
applyChatUI(CFG);
bindEvents();
document.documentElement.classList.add('loaded');
}
document.readyState === 'loading'
? document.addEventListener('DOMContentLoaded', init)
: init();

59
WebApp/config.json Normal file
View File

@@ -0,0 +1,59 @@
{
"event_name": "Truck & Country Festival",
"event_dates": "8. 9. August 2026",
"event_location": "DEKRA Lausitzring, Klettwitz",
"primary_color": "#1A1208",
"secondary_color": "#2C2010",
"accent_color": "#D4820A",
"accent_light": "#F5A623",
"text_light": "#F5F0E8",
"text_muted": "#A89880",
"logo_path": "assets/logo.png",
"sponsor_name": "MeinSponsor",
"sponsor_logo_path": "assets/sponsor_logo.png",
"hero_truck_image": "assets/hero_truck.jpg",
"hero_family_image": "assets/hero_family.jpg",
"ticket_link": "https://shop.dekra-lausitzring.de/?ref=meinsponsor",
"official_event_url": "https://dekra-lausitzring.de/event/truck-country-wochenende/",
"official_highlights_url": "https://dekra-lausitzring.de/highlights/truck-country-festival/",
"legal_imprint_url": "https://dekra-lausitzring.de/impressum/",
"legal_privacy_url": "https://dekra-lausitzring.de/datenschutz/",
"page_headline": "Trucks. Country. Lausitzring.",
"page_subheadline": "8. & 9. August 2026 Truck Trial Europameisterschaft, Country Village, Show & Shine und Offroad-Action auf dem DEKRA Lausitzring.",
"page_question": "Wie möchtest du dein Wochenende erleben?",
"cta_primary_label": "Ich komme wegen Trucks",
"cta_secondary_label": "Ich komme wegen Country & Familie",
"cta_entry_truck": "truck",
"cta_entry_family": "family",
"benefits": [
{
"icon": "🚛",
"title": "Truck Trial EM 2026",
"text": "Internationale Teams steuern tonnenschwere LKW, Oldtimer und Zugmaschinen durch extremes Offroad-Gelände Präzision & Power aus nächster Nähe."
},
{
"icon": "🎸",
"title": "Country Village",
"text": "Live-Musik, Line-Dance, Western-Spiele, Kettensägenkunst, Falknerei & Marktstände echte Country-Atmosphäre den ganzen Tag."
},
{
"icon": "👨‍👩‍👧",
"title": "Camping & Familie",
"text": "Truck- & Country-Camp direkt vor Ort, Show & Shine Truck Contest, Händlerbereich und Erlebnisbereiche für alle Altersgruppen."
}
],
"official_section_headline": "Mehr Infos & Tickets",
"official_section_text": "Alles zum Programm, Rahmenprogramm und Tickets direkt beim Veranstalter DEKRA Lausitzring.",
"official_event_button_label": "Zur Eventseite",
"official_highlights_button_label": "Highlights & Programm",
"footer_disclaimer": "",
"whatsapp_optin_text": "Ja, ich möchte Infos & Updates zum Truck & Country Festival 2026 per WhatsApp erhalten.",
"webhook_base": "https://n8n.meinedomain.de/webhook",
"chat_welcome_truck": "Hey! Bereit für Truck Trial Europameisterschaft, Show & Shine und Offroad-Power? 🚛 Was möchtest du über das Truck & Country Festival 2026 wissen?",
"chat_welcome_family": "Hey! Auf Country Village, Live-Musik, Falknerei und ein entspanntes Wochenende mit der Familie? 🎸 Was möchtest du über das Festival wissen?",
"chat_fallback_message": "Unser Guide ist gerade nicht erreichbar. Alle Infos findest du direkt auf der offiziellen Eventseite des DEKRA Lausitzrings.",
"chat_input_placeholder": "Deine Frage ans Festival...",
"chat_send_label": "Senden",
"chat_ticket_label": "Tickets ansehen",
"chat_info_label": "Offizielle Infos ↗"
}

234
WebApp/index.html Normal file
View File

@@ -0,0 +1,234 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex, nofollow" />
<title>Festival Guide</title>
<link rel="stylesheet" href="styles.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@400;600&family=Barlow+Condensed:wght@300;600&display=swap" rel="stylesheet" />
<script>
// Embedded config to bypass CORS issue when opening file://
window.EMBEDDED_CONFIG = {
"event_name": "Truck & Country Festival",
"event_dates": "8. 9. August 2026",
"event_location": "DEKRA Lausitzring, Klettwitz",
"primary_color": "#1A1208",
"secondary_color": "#2C2010",
"accent_color": "#D4820A",
"accent_light": "#F5A623",
"text_light": "#F5F0E8",
"text_muted": "#A89880",
"logo_path": "Dekra_Lausitzring_Logo.png",
"sponsor_name": "LT24",
"sponsor_logo_path": "LT24_Markenlogo.png",
"hero_truck_image": "assets/hero_truck.jpg",
"hero_family_image": "assets/hero_family.jpg",
"ticket_link": "https://shop.dekra-lausitzring.de/?ref=meinsponsor",
"official_event_url": "https://dekra-lausitzring.de/event/truck-country-wochenende/",
"official_highlights_url": "https://dekra-lausitzring.de/highlights/truck-country-festival/",
"legal_imprint_url": "https://dekra-lausitzring.de/impressum/",
"legal_privacy_url": "https://dekra-lausitzring.de/datenschutz/",
"page_headline": "Trucks. Country. Lausitzring.",
"page_subheadline": "8. & 9. August 2026 Truck Trial Europameisterschaft, Country Village, Show & Shine und Offroad-Action auf dem DEKRA Lausitzring.",
"page_question": "Wie möchtest du dein Wochenende erleben?",
"cta_primary_label": "Ich komme wegen Trucks",
"cta_secondary_label": "Ich komme wegen Country & Familie",
"cta_entry_truck": "truck",
"cta_entry_family": "family",
"benefits": [
{
"icon": "🚛",
"title": "Truck Trial EM 2026",
"text": "Internationale Teams steuern tonnenschwere LKW, Oldtimer und Zugmaschinen durch extremes Offroad-Gelände Präzision & Power aus nächster Nähe."
},
{
"icon": "🎸",
"title": "Country Village",
"text": "Live-Musik, Line-Dance, Western-Spiele, Kettensägenkunst, Falknerei & Marktstände echte Country-Atmosphäre den ganzen Tag."
},
{
"icon": "👨‍👩‍👧",
"title": "Camping & Familie",
"text": "Truck- & Country-Camp direkt vor Ort, Show & Shine Truck Contest, Händlerbereich und Erlebnisbereiche für alle Altersgruppen."
}
],
"official_section_headline": "Mehr Infos & Tickets",
"official_section_text": "Alles zum Programm, Rahmenprogramm und Tickets direkt beim Veranstalter DEKRA Lausitzring.",
"official_event_button_label": "Zur Eventseite",
"official_highlights_button_label": "Highlights & Programm",
"footer_disclaimer": "",
"whatsapp_optin_text": "Ja, ich möchte Infos & Updates zum Truck & Country Festival 2026 per WhatsApp erhalten.",
"webhook_base": "https://n8n.meinedomain.de/webhook",
"chat_welcome_truck": "Hey! Bereit für Truck Trial Europameisterschaft, Show & Shine und Offroad-Power? 🚛 Was möchtest du über das Truck & Country Festival 2026 wissen?",
"chat_welcome_family": "Hey! Auf Country Village, Live-Musik, Falknerei und ein entspanntes Wochenende mit der Familie? 🎸 Was möchtest du über das Festival wissen?",
"chat_fallback_message": "Unser Guide ist gerade nicht erreichbar. Alle Infos findest du direkt auf der offiziellen Eventseite des DEKRA Lausitzrings.",
"chat_input_placeholder": "Deine Frage ans Festival...",
"chat_send_label": "Senden",
"chat_ticket_label": "Tickets ansehen",
"chat_info_label": "Offizielle Infos ↗"
};
</script>
</head>
<body>
<!-- ══ HEADER ══ -->
<header id="site-header" class="site-header" role="banner">
<div class="header-inner">
<div class="header-brand">
<img id="hdr-logo" class="hdr-logo" src="" alt="Event Logo" loading="eager" />
<div class="hdr-event-meta">
<span id="hdr-event-name" class="hdr-event-name"></span>
<span id="hdr-event-dates" class="hdr-event-dates"></span>
</div>
</div>
<!-- #4: center hook -->
<p id="hdr-hook" class="hdr-hook"></p>
<div class="header-sponsor">
<span id="hdr-presented-by" class="hdr-presented"></span>
<img id="hdr-sponsor-logo" class="hdr-sponsor-logo" src="" alt="Sponsor Logo" loading="eager" />
</div>
</div>
</header>
<!-- ══ HERO SPLIT ══ -->
<section id="hero" class="hero" aria-label="Wochenende wählen">
<button id="cta-truck" class="hero-half hero-half--truck" type="button"
aria-label="Festival Guide für Trucks & Offroad starten">
<div class="half-img" id="half-img-truck"></div>
<div class="half-overlay half-overlay--truck"></div>
<div class="half-content">
<div class="half-tag">🚛 Offroad &amp; Action</div>
<h2 class="half-title">Trucks &amp;<br>Offroad</h2>
<ul class="half-highlights">
<li>Truck Trial Europameisterschaft</li>
<li>Show &amp; Shine Contest</li>
<li>Offroad-Parcours live</li>
</ul>
<div class="half-cta">
<span class="half-cta-label" id="cta-truck-label"></span>
<span class="half-arrow"></span>
</div>
</div>
</button>
<!-- #3: schlanker Seam -->
<div class="hero-seam" aria-hidden="true">
<div class="seam-line"></div>
<div class="seam-or-pill">Was passt<br>zu dir?</div>
<div class="seam-line"></div>
</div>
<button id="cta-family" class="hero-half hero-half--family" type="button"
aria-label="Festival Guide für Country & Familie starten">
<div class="half-img" id="half-img-family"></div>
<div class="half-overlay half-overlay--family"></div>
<div class="half-content">
<div class="half-tag">🎸 Musik &amp; Atmosphäre</div>
<h2 class="half-title">Country &amp;<br>Familie</h2>
<ul class="half-highlights">
<li>Country Village &amp; Live-Musik</li>
<li>Line-Dance &amp; Falknerei</li>
<li>Camping direkt vor Ort</li>
</ul>
<div class="half-cta">
<span class="half-cta-label" id="cta-family-label"></span>
<span class="half-arrow"></span>
</div>
</div>
</button>
</section>
<!-- ══ EVENT STRIP ══ -->
<div class="event-strip">
<span class="event-strip-name" id="strip-event-name"></span>
<span class="event-strip-sep" aria-hidden="true">·</span>
<span class="event-strip-dates" id="strip-dates"></span>
<span class="event-strip-sep" aria-hidden="true">·</span>
<span class="event-strip-loc" id="strip-location"></span>
</div>
<!-- ══ GUIDE PREVIEW (#8) ══ -->
<section class="guide-preview" aria-label="So funktioniert der Guide">
<div class="guide-preview-inner">
<div class="guide-preview-header">
<p class="guide-preview-eyebrow">Festival Guide · KI-gestützt</p>
<h2 class="guide-preview-title">So nutzen Besucher den Guide</h2>
</div>
<div class="guide-preview-grid" id="guide-preview-grid">
<!-- wird per JS befüllt -->
</div>
</div>
</section>
<!-- ══ BENEFITS ══ -->
<section id="benefits" class="benefits-section" aria-label="Highlights">
<div class="benefits-inner">
<ul id="benefits-list" class="benefits-list" role="list"></ul>
</div>
</section>
<!-- ══ OFFICIAL INFO ══ -->
<section id="official-info" class="official-section" aria-label="Infos & Tickets">
<div class="official-inner">
<h2 id="official-headline" class="official-headline"></h2>
<p id="official-text" class="official-text"></p>
<div class="official-btns">
<a id="official-event-btn" class="official-btn official-btn--primary" href="#" target="_blank" rel="noopener noreferrer"></a>
<a id="official-highlights-btn" class="official-btn official-btn--secondary" href="#" target="_blank" rel="noopener noreferrer" style="display:none"></a>
</div>
</div>
</section>
<!-- ══ FOOTER ══ -->
<footer id="site-footer" class="site-footer" role="contentinfo">
<div class="footer-inner">
<nav class="footer-legal" aria-label="Rechtliche Links">
<a id="footer-imprint" href="#" target="_blank" rel="noopener noreferrer">Impressum</a>
<span aria-hidden="true">·</span>
<a id="footer-privacy" href="#" target="_blank" rel="noopener noreferrer">Datenschutz</a>
</nav>
</div>
</footer>
<!-- ══ CHAT MODAL ══ -->
<div id="chat-modal" class="chat-modal" role="dialog" aria-modal="true" aria-labelledby="chat-modal-title" hidden>
<div class="chat-modal-backdrop" id="chat-backdrop"></div>
<div class="chat-modal-panel">
<div class="chat-modal-header">
<div class="chat-modal-title-row">
<span class="chat-status-dot" aria-hidden="true"></span>
<h2 id="chat-modal-title" class="chat-modal-title">Festival Guide</h2>
</div>
<div class="chat-modal-header-actions">
<a id="chat-ticket-btn" class="chat-header-ticket-btn" href="#" target="_blank" rel="noopener noreferrer"></a>
<button id="chat-close-btn" class="chat-close-btn" type="button" aria-label="Chat schließen"></button>
</div>
</div>
<div id="chat-messages" class="chat-messages" role="log" aria-live="polite" aria-relevant="additions"></div>
<div class="chat-footer-bar">
<div class="chat-info-row">
<a id="chat-official-link" class="chat-info-link" href="#" target="_blank" rel="noopener noreferrer"></a>
</div>
<div class="chat-input-row">
<input id="chat-input" class="chat-input" type="text" maxlength="500"
autocomplete="off" autocorrect="off" spellcheck="true" />
<button id="chat-send-btn" class="chat-send-btn" type="button" aria-label="Senden">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"
stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<line x1="22" y1="2" x2="11" y2="13"/>
<polygon points="22 2 15 22 11 13 2 9 22 2"/>
</svg>
</button>
</div>
</div>
</div>
</div>
<script src="app.js"></script>
</body>
</html>

637
WebApp/styles.css Normal file
View File

@@ -0,0 +1,637 @@
/* ═══════════════════════════════════════════════════
TRUCK & COUNTRY Festival Guide
Spec v2: Overlay lighter · Hover pull-in · Guide section
═══════════════════════════════════════════════════ */
:root {
--c-bg: #1A1208;
--c-bg2: #2C2010;
--c-accent: #D4820A;
--c-accent-light: #F5A623;
--c-text: #F5F0E8;
--c-muted: #A89880;
--c-surface: #241908;
--c-border: rgba(212,130,10,0.22);
--c-truck-bg: #0A1F09;
--c-family-bg: #2A1200;
--radius: 4px;
--radius-lg: 10px;
--t-fast: 0.22s cubic-bezier(0.4,0,0.2,1);
--t-med: 0.35s cubic-bezier(0.4,0,0.2,1);
}
/* ── Reset ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
font-family: 'Barlow', 'Segoe UI', sans-serif;
background: var(--c-bg);
color: var(--c-text);
min-height: 100dvh;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-accent-light); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-text); }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
/* ══════════════ HEADER ══════════════ */
.site-header {
position: sticky; top: 0; z-index: 100;
background: rgba(26,18,8,0.94);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border-bottom: 1px solid var(--c-border);
}
.header-inner {
max-width: 1200px; margin: 0 auto;
padding: 10px 20px;
display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.header-brand {
display: flex; align-items: center; gap: 12px;
background: rgba(245, 240, 232, 0.95);
padding: 8px 12px;
border-radius: 8px;
}
.hdr-logo { height: 38px; width: auto; object-fit: contain; }
.hdr-event-meta { display: flex; flex-direction: column; line-height: 1.2; }
.hdr-event-name {
font-family: 'Bebas Neue', sans-serif;
font-size: 1.1rem; letter-spacing: 0.07em; color: var(--c-accent-light);
}
.hdr-event-dates {
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.65rem; font-weight: 300; letter-spacing: 0.1em;
color: #000; text-transform: uppercase;
}
/* #4: optional center hook */
.hdr-hook {
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
text-transform: uppercase; color: var(--c-muted);
display: none;
}
@media (min-width: 860px) { .hdr-hook { display: block; } }
.header-sponsor {
display: flex; align-items: center; gap: 10px;
background: rgba(245, 240, 232, 0.95);
padding: 8px 12px;
border-radius: 8px;
}
.hdr-presented {
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.62rem; font-weight: 300; letter-spacing: 0.14em;
color: #000; text-transform: uppercase; white-space: nowrap;
}
.hdr-sponsor-logo { height: 30px; width: auto; object-fit: contain; opacity: 0.85; }
/* ══════════════ HERO SPLIT ══════════════ */
.hero {
position: relative;
display: flex;
height: calc(100svh - 61px);
min-height: 480px;
max-height: 900px;
overflow: hidden;
}
/* #2.2/#2.3: Panels reagieren auf Hover des jeweils anderen */
.hero-half {
position: relative;
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
cursor: pointer;
text-align: left;
color: var(--c-text);
/* Reset */
border: none;
padding: 0;
transition:
flex var(--t-med),
filter var(--t-med),
opacity var(--t-med);
}
/* Wenn ANDERE Seite gehovered: abdunkeln */
.hero:has(.hero-half--truck:hover) .hero-half--family,
.hero:has(.hero-half--truck:focus-within) .hero-half--family {
flex: 0.82;
opacity: 0.75;
filter: brightness(0.7);
}
.hero:has(.hero-half--family:hover) .hero-half--truck,
.hero:has(.hero-half--family:focus-within) .hero-half--truck {
flex: 0.82;
opacity: 0.75;
filter: brightness(0.7);
}
/* Aktive Seite wächst */
.hero:has(.hero-half--truck:hover) .hero-half--truck,
.hero:has(.hero-half--truck:focus-within) .hero-half--truck { flex: 1.18; }
.hero:has(.hero-half--family:hover) .hero-half--family,
.hero:has(.hero-half--family:focus-within) .hero-half--family { flex: 1.18; }
/* #2.4: Mobile tap */
.hero-half:active { transform: scale(0.985); transition: transform 0.1s; }
/* Eigenfarbe ohne Foto */
.hero-half--truck { background: linear-gradient(160deg, #0A1F09 0%, #1E4A1A 50%, #2A6E22 100%); }
.hero-half--family { background: linear-gradient(200deg, #2A1200 0%, #5C2E00 50%, #8B4500 100%); }
/* Bild-Layer */
.half-img {
position: absolute; inset: 0;
background-size: cover;
background-position: center;
transition: transform var(--t-med);
will-change: transform;
}
/* #2.2: Bild beim Hover leicht reinzoomen */
.hero-half:hover .half-img,
.hero-half:focus-within .half-img { transform: scale(1.05); }
/* #1.1: Overlay reduziert Bild bleibt sichtbar */
.half-overlay {
position: absolute; inset: 0;
pointer-events: none;
transition: opacity var(--t-med);
}
.half-overlay--truck {
background: linear-gradient(
160deg,
rgba(0,0,0,0.42) 0%,
rgba(10,31,9,0.38) 50%,
rgba(0,0,0,0.52) 100%
);
}
.half-overlay--family {
background: linear-gradient(
200deg,
rgba(0,0,0,0.42) 0%,
rgba(42,18,0,0.38) 50%,
rgba(0,0,0,0.52) 100%
);
}
/* #1.2: Card weniger schwarz, mehr Bildwirkung */
.half-content {
position: relative; z-index: 2;
width: min(360px, 80%);
padding: clamp(22px, 3.5vw, 38px) clamp(20px, 3.5vw, 36px);
background: rgba(10,10,10,0.58);
backdrop-filter: blur(10px) saturate(1.3);
-webkit-backdrop-filter: blur(10px) saturate(1.3);
border: 1px solid rgba(255,255,255,0.08);
border-radius: var(--radius-lg);
box-shadow: 0 4px 40px rgba(0,0,0,0.35);
/* #2.2: Card hebt sich beim Hover */
transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.hero-half:hover .half-content,
.hero-half:focus-within .half-content {
transform: translateY(-4px);
box-shadow: 0 12px 50px rgba(0,0,0,0.5);
}
.half-tag {
display: inline-block;
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.68rem; font-weight: 600; letter-spacing: 0.15em;
text-transform: uppercase; padding: 3px 10px;
border-radius: 2px; margin-bottom: 10px;
}
.hero-half--truck .half-tag {
background: rgba(74,138,66,0.22); border: 1px solid rgba(74,138,66,0.4); color: #A8E0A0;
}
.hero-half--family .half-tag {
background: rgba(196,122,30,0.22); border: 1px solid rgba(196,122,30,0.45); color: #F5C878;
}
.half-title {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(2.6rem, 5.5vw, 4.4rem);
line-height: 0.9; letter-spacing: 0.03em;
margin-bottom: 14px;
/* Text-Shadow statt Card-Opacity für Lesbarkeit */
text-shadow: 0 2px 16px rgba(0,0,0,0.7), 0 0 40px rgba(0,0,0,0.4);
}
.hero-half--truck .half-title { color: #C8F0C0; }
.hero-half--family .half-title { color: #FFE4B0; }
.half-highlights {
list-style: none; margin-bottom: 20px;
display: flex; flex-direction: column; gap: 5px;
}
.half-highlights li {
font-family: 'Barlow Condensed', sans-serif;
font-size: clamp(0.76rem, 1.8vw, 0.9rem);
font-weight: 300; letter-spacing: 0.04em;
color: rgba(245,240,232,0.8);
padding-left: 14px; position: relative;
}
.half-highlights li::before {
content: ''; position: absolute; left: 0;
font-size: 1rem; line-height: 1;
}
.hero-half--truck .half-highlights li::before { color: #5AAA50; }
.hero-half--family .half-highlights li::before { color: #D4820A; }
.half-cta {
display: flex; align-items: center; justify-content: space-between; gap: 10px;
width: 100%; padding: 13px 18px;
border-radius: var(--radius);
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(0.88rem, 2vw, 1.1rem);
letter-spacing: 0.1em;
transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
}
.hero-half--truck .half-cta {
background: #5AAA50; color: #061206;
box-shadow: 0 4px 16px rgba(74,138,66,0.35);
}
.hero-half--family .half-cta {
background: var(--c-accent); color: #1F1005;
box-shadow: 0 4px 16px rgba(212,130,10,0.4);
}
.hero-half:hover .half-cta,
.hero-half:focus-within .half-cta { filter: brightness(1.1); }
.half-arrow { transition: transform var(--t-fast); font-size: 1.1em; }
.hero-half:hover .half-arrow,
.hero-half:focus-within .half-arrow { transform: translateX(5px); }
/* Trennlinie links/rechts zwischen Panels */
.hero-half--truck { border-right: 1px solid rgba(255,255,255,0.06); }
.hero-half--family { border-left: 1px solid rgba(255,255,255,0.06); }
/* #3: Mittlerer Divider "WAS PASST ZU DIR?" */
.hero-seam {
position: absolute;
top: 0; bottom: 0; left: 50%;
transform: translateX(-50%);
z-index: 10;
pointer-events: none;
display: flex; flex-direction: column; align-items: center;
width: 0; overflow: visible;
}
.seam-line {
flex: 1; width: 1px;
background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.12), transparent);
}
.seam-or-pill {
flex-shrink: 0;
background: rgba(0,0,0,0.55);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255,255,255,0.12);
border-radius: 20px;
padding: 8px 16px;
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.68rem; font-weight: 600;
letter-spacing: 0.16em; text-transform: uppercase;
color: rgba(245,240,232,0.6);
white-space: nowrap;
text-align: center;
line-height: 1.4;
animation: pill-in 0.5s 0.3s ease both;
}
@keyframes pill-in {
from { opacity: 0; transform: scale(0.8); }
to { opacity: 1; transform: scale(1); }
}
/* ── Mobile ── */
@media (max-width: 640px) {
.hero { flex-direction: column; height: auto; max-height: none; }
.hero-half { min-height: 46svh; flex: none !important;
filter: none !important; opacity: 1 !important; }
.hero-half:hover .half-img { transform: none; }
.hero-half:active { transform: scale(0.985); }
.half-content { width: min(340px, 88%); }
.hero-seam {
position: relative; top: auto; left: auto; transform: none;
width: 100%; height: auto; flex-direction: row;
background: var(--c-bg); border-top: 1px solid var(--c-border);
border-bottom: 1px solid var(--c-border);
justify-content: center; align-items: center; padding: 10px 0;
overflow: visible;
}
.seam-line { display: none; }
.seam-or-pill {
background: transparent; border: none; backdrop-filter: none;
padding: 0; font-size: 0.72rem; color: var(--c-muted);
}
.hdr-presented { display: none; }
}
/* ══════════════ EVENT STRIP ══════════════ */
.event-strip {
background: var(--c-surface);
border-bottom: 1px solid var(--c-border);
padding: 9px 20px;
display: flex; flex-wrap: wrap; align-items: center;
justify-content: center; gap: 10px;
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.event-strip-name { color: var(--c-accent-light); font-weight: 600; }
.event-strip-dates,
.event-strip-loc { color: var(--c-muted); font-weight: 300; }
.event-strip-sep { color: rgba(168,152,128,0.3); }
/* ══════════════ GUIDE PREVIEW (#8) ══════════════ */
.guide-preview {
padding: clamp(48px, 7vw, 80px) 20px;
background: var(--c-bg);
border-bottom: 1px solid var(--c-border);
}
.guide-preview-inner { max-width: 980px; margin: 0 auto; }
.guide-preview-header { text-align: center; margin-bottom: 40px; }
.guide-preview-eyebrow {
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em;
text-transform: uppercase; color: var(--c-accent);
margin-bottom: 8px;
}
.guide-preview-title {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: 0.05em; color: var(--c-text);
}
.guide-preview-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 16px;
}
.guide-card {
background: var(--c-surface);
border: 1px solid var(--c-border);
border-radius: var(--radius-lg);
overflow: hidden;
}
.guide-card-q {
padding: 14px 16px;
background: rgba(212,130,10,0.08);
border-bottom: 1px solid var(--c-border);
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.82rem; font-weight: 600;
letter-spacing: 0.04em; color: var(--c-accent-light);
}
.guide-card-q::before { content: '👤 '; }
.guide-card-a {
padding: 14px 16px;
font-size: 0.82rem; line-height: 1.6; color: var(--c-muted);
}
.guide-card-a::before {
content: '🤖 ';
font-size: 0.9em;
}
/* ══════════════ BENEFITS ══════════════ */
.benefits-section {
padding: clamp(40px, 6vw, 72px) 20px;
background: var(--c-bg2);
border-bottom: 1px solid var(--c-border);
}
.benefits-inner { max-width: 1000px; margin: 0 auto; }
.benefits-list {
display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 20px; list-style: none;
}
.benefit-card {
background: var(--c-surface); border: 1px solid var(--c-border);
border-radius: var(--radius-lg); padding: 28px 24px; text-align: center;
transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
position: relative; overflow: hidden;
}
.benefit-card::before {
content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
background: linear-gradient(90deg, transparent, var(--c-accent), transparent);
opacity: 0; transition: opacity var(--t-fast);
}
.benefit-card:hover { transform: translateY(-4px);
box-shadow: 0 8px 32px rgba(0,0,0,0.35); border-color: rgba(212,130,10,0.4); }
.benefit-card:hover::before { opacity: 1; }
.benefit-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 14px; display: block; }
.benefit-title {
font-family: 'Bebas Neue', sans-serif;
font-size: 1.3rem; letter-spacing: 0.1em;
color: var(--c-accent-light); margin-bottom: 8px;
}
.benefit-text { font-size: 0.82rem; line-height: 1.6; color: var(--c-muted); }
/* ══════════════ OFFICIAL SECTION ══════════════ */
.official-section {
padding: clamp(48px, 7vw, 88px) 20px;
background: var(--c-bg); text-align: center;
}
.official-inner { max-width: 640px; margin: 0 auto; }
.official-headline {
font-family: 'Bebas Neue', sans-serif;
font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: 0.06em;
color: var(--c-text); margin-bottom: 12px;
}
.official-text { font-size: 0.88rem; line-height: 1.65; color: var(--c-muted); margin-bottom: 28px; }
.official-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.official-btn {
display: inline-flex; align-items: center; gap: 6px;
padding: 12px 26px; border-radius: var(--radius);
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.official-btn:hover { transform: translateY(-2px); }
.official-btn--primary {
background: var(--c-accent); color: #1A1208;
box-shadow: 0 4px 20px rgba(212,130,10,0.3);
}
.official-btn--primary:hover {
background: var(--c-accent-light); box-shadow: 0 6px 28px rgba(212,130,10,0.45); color: #1A1208;
}
.official-btn--secondary {
background: transparent; color: var(--c-accent-light); border: 1px solid var(--c-accent);
}
.official-btn--secondary:hover { background: rgba(212,130,10,0.1); color: var(--c-text); }
/* ══════════════ FOOTER ══════════════ */
.site-footer {
padding: 20px; background: #100C05;
border-top: 1px solid var(--c-border);
}
.footer-inner {
max-width: 1000px; margin: 0 auto;
display: flex; align-items: center; justify-content: flex-end;
}
.footer-legal {
display: flex; align-items: center; gap: 10px;
font-size: 0.72rem; color: var(--c-muted);
}
.footer-legal a { color: var(--c-muted); transition: color var(--t-fast); }
.footer-legal a:hover { color: var(--c-text); }
/* ══════════════ CHAT MODAL ══════════════ */
.chat-modal {
position: fixed; inset: 0; z-index: 200;
display: flex; align-items: flex-end; justify-content: center;
}
.chat-modal[hidden] { display: none; }
.chat-modal-backdrop {
position: absolute; inset: 0;
background: rgba(10,6,2,0.72);
backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
animation: bdFadeIn 0.25s ease both;
}
@keyframes bdFadeIn { from { opacity:0; } to { opacity:1; } }
.chat-modal-panel {
position: relative; z-index: 1;
width: 100%; max-width: 520px;
max-height: min(82vh, 700px);
margin: 0 12px 12px;
background: var(--c-bg2);
border: 1px solid var(--c-border);
border-radius: var(--radius-lg) var(--radius-lg) var(--radius) var(--radius);
box-shadow: 0 -8px 60px rgba(0,0,0,0.6);
display: flex; flex-direction: column; overflow: hidden;
animation: panelUp 0.32s cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes panelUp {
from { transform: translateY(40px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.chat-modal-header {
display: flex; align-items: center; justify-content: space-between;
padding: 14px 16px 14px 18px;
border-bottom: 1px solid var(--c-border);
background: rgba(16,12,5,0.7); flex-shrink: 0;
}
.chat-modal-title-row { display: flex; align-items: center; gap: 10px; }
.chat-status-dot {
width: 8px; height: 8px; border-radius: 50%;
background: #4CAF50; box-shadow: 0 0 6px rgba(76,175,80,0.7);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%,100% { opacity:1; transform:scale(1); }
50% { opacity:0.6; transform:scale(0.9); }
}
.chat-modal-title {
font-family: 'Bebas Neue', sans-serif;
font-size: 1.15rem; letter-spacing: 0.1em; color: var(--c-accent-light);
}
.chat-modal-header-actions { display: flex; align-items: center; gap: 10px; }
.chat-header-ticket-btn {
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
color: #1A1208; background: var(--c-accent);
padding: 5px 12px; border-radius: var(--radius);
transition: background var(--t-fast), transform var(--t-fast);
}
.chat-header-ticket-btn:hover { background: var(--c-accent-light); transform: translateY(-1px); color: #1A1208; }
.chat-close-btn {
width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
border-radius: var(--radius); color: var(--c-muted); font-size: 0.9rem;
transition: background var(--t-fast), color var(--t-fast);
}
.chat-close-btn:hover { background: rgba(255,255,255,0.08); color: var(--c-text); }
.chat-messages {
flex: 1; overflow-y: auto;
padding: 16px; display: flex; flex-direction: column; gap: 12px;
scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 2px; }
.chat-bubble {
max-width: 82%; padding: 10px 14px;
border-radius: 12px; font-size: 0.85rem; line-height: 1.55;
word-break: break-word;
animation: bubbleIn 0.22s ease both;
}
@keyframes bubbleIn {
from { opacity:0; transform:scale(0.94) translateY(6px); }
to { opacity:1; transform:scale(1) translateY(0); }
}
.chat-bubble--bot {
align-self: flex-start;
background: var(--c-surface); border: 1px solid var(--c-border);
color: var(--c-text); border-bottom-left-radius: 3px;
}
.chat-bubble--user {
align-self: flex-end;
background: linear-gradient(135deg, var(--c-accent) 0%, #A86208 100%);
color: #1A1208; font-weight: 600; border-bottom-right-radius: 3px;
}
.chat-bubble--error {
align-self: flex-start;
background: rgba(180,50,30,0.15); border: 1px solid rgba(180,50,30,0.3);
color: #F5C0B0; border-bottom-left-radius: 3px;
}
.chat-typing {
align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px;
background: var(--c-surface); border: 1px solid var(--c-border);
border-radius: 12px; border-bottom-left-radius: 3px;
}
.chat-typing span {
width: 6px; height: 6px; border-radius: 50%;
background: var(--c-muted); animation: typingDot 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
0%,60%,100% { opacity:0.3; transform:translateY(0); }
30% { opacity:1; transform:translateY(-3px); }
}
.chat-fallback-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chat-fallback-link {
font-size: 0.78rem; font-family: 'Barlow Condensed', sans-serif;
font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
color: var(--c-accent-light); border: 1px solid rgba(212,130,10,0.4);
padding: 5px 12px; border-radius: var(--radius);
transition: background var(--t-fast), color var(--t-fast);
}
.chat-fallback-link:hover { background: rgba(212,130,10,0.12); color: var(--c-text); }
.chat-footer-bar {
border-top: 1px solid var(--c-border); padding: 10px 14px 12px;
background: rgba(16,12,5,0.7); flex-shrink: 0;
}
.chat-info-row { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.chat-info-link {
font-family: 'Barlow Condensed', sans-serif;
font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em;
text-transform: uppercase; color: var(--c-muted); transition: color var(--t-fast);
}
.chat-info-link:hover { color: var(--c-accent-light); }
.chat-input-row { display: flex; gap: 8px; align-items: center; }
.chat-input {
flex: 1; background: var(--c-bg);
border: 1px solid var(--c-border); border-radius: var(--radius);
color: var(--c-text); font-family: 'Barlow', sans-serif;
font-size: 0.88rem; padding: 10px 14px; outline: none;
transition: border-color var(--t-fast), box-shadow var(--t-fast);
caret-color: var(--c-accent);
}
.chat-input::placeholder { color: var(--c-muted); opacity: 0.7; }
.chat-input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(212,130,10,0.12); }
.chat-send-btn {
width: 40px; height: 40px; flex-shrink: 0;
display: flex; align-items: center; justify-content: center;
background: var(--c-accent); border-radius: var(--radius); color: #1A1208;
transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.chat-send-btn:hover { background: var(--c-accent-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(212,130,10,0.35); }
.chat-send-btn:active { transform: translateY(0); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }
@media (max-width: 480px) {
.chat-modal-panel { max-height: 90svh; margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}