/*
Theme Name: Gampus FlowHarmony Child
Theme URI: https://www.gampus.at
Template: generatepress
Author: Robert Gampus & Antigravity
Author URI: https://www.gampus.at
Description: Ein hochoptimiertes, PWA-fähiges Child-Theme für GeneratePress im FlowHarmony-Design mit echtem App-Gefühl für mobile Geräte.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: gampus-flowharmony
*/

/* ==========================================================================
   GAMPUS FlowHarmony App Design System & Shell Styling
   ========================================================================== */

/* Design Tokens & Theme Setup */
:root {
  --color-bg-main: #FAF9F6;
  --color-bg-card: #FFFFFF;
  --color-text-primary: #1a1a18;
  --color-text-secondary: #555550;
  --color-border-ui: #E8E6DE;
  --color-brand: #d97757;
  --color-brand-bg-muted: rgba(217, 119, 87, 0.08);
  --color-brand-border-muted: rgba(217, 119, 87, 0.15);
  --color-brand-light: #ec9d81;
  --color-brand-dark: #b85a3a;
  
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

.dark {
  --color-bg-main: #141413;
  --color-bg-card: #1f1e1c;
  --color-text-primary: #FAF9F6;
  --color-text-secondary: #A5A39D;
  --color-border-ui: #2E2C29;
  --color-brand: #ec9d81;
  --color-brand-bg-muted: rgba(236, 157, 129, 0.08);
  --color-brand-border-muted: rgba(236, 157, 129, 0.25);
  --color-brand-light: #f3beab;
  --color-brand-dark: #d97757;
}

/* Base resets & behavior */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-main);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Layout constraints for App Feel */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

.app-main {
  flex: 1 0 auto;
  padding-bottom: calc(72px + var(--safe-area-bottom)); /* Leave room for mobile tab bar */
}

@media (min-width: 768px) {
  .app-main {
    padding-bottom: 2rem; /* Normal padding on desktop */
  }
}

/* Typography Customization */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Single Page App (SPA) View Animations */
.view-section {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-section.active {
  display: block;
}

.view-section.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Bento Card Style */
.bento-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-ui);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-brand);
  box-shadow: 0 16px 32px -12px var(--color-brand-border-muted);
}

/* Mobile App Tab Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + var(--safe-area-bottom));
  background-color: rgba(var(--color-bg-card-rgb, 255, 255, 255), 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border-ui);
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: var(--safe-area-bottom);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.dark .bottom-nav {
  background-color: rgba(31, 30, 28, 0.85);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  width: 20%;
  height: 100%;
  transition: color 0.2s ease, transform 0.1s ease;
  position: relative;
  cursor: pointer;
}

.tab-item svg {
  width: 22px;
  height: 22px;
  margin-bottom: 3px;
  transition: stroke 0.2s ease, fill 0.2s ease, transform 0.2s ease;
}

.tab-item.active {
  color: var(--color-brand);
}

.tab-item.active svg {
  transform: scale(1.1);
  stroke: var(--color-brand);
}

/* Active indicator line on tab item */
.tab-item::after {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  background-color: var(--color-brand);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tab-item.active::after {
  opacity: 1;
  transform: translateY(0);
}

/* Premium Inputs with paper haptics */
.paper-input {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-ui);
  color: var(--color-text-primary);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.paper-input:focus {
  border-color: var(--color-brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-brand-border-muted);
}

/* Animated organic glow bg */
.organic-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-brand-bg-muted) 0%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  animation: pulse-glow 8s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.9) translate(-10px, -10px);
    opacity: 0.25;
  }
  100% {
    transform: scale(1.1) translate(10px, 10px);
    opacity: 0.45;
  }
}

/* Notification banner */
.toast-msg {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background-color: var(--color-bg-card);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-ui);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 12px 24px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

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