/* ==========================================================================
   KI-Verbrauchsrechner — Lokales CSS (ersetzt Tailwind CDN)
   Generiert aus allen im Dashboard verwendeten Tailwind-Klassen
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border-width: 0; border-style: solid; border-color: #374151; }
html { -webkit-text-size-adjust: 100%; line-height: 1.5; tab-size: 4; }
body { line-height: inherit; -webkit-font-smoothing: antialiased; }
em { font-style: italic; }
strong { font-weight: 700; }
img, svg, video, canvas { display: block; max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
ul, ol { list-style: none; }
summary { cursor: pointer; }

/* --- @font-face GT Pressura (local) --- */
@font-face {
  font-family: 'GT Pressura Extended';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/GT-Pressura-Extended-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'GT Pressura Extended';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/GT-Pressura-Extended-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'GT Pressura Extended';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/GT-Pressura-Extended-Black.woff2') format('woff2');
}
@font-face {
  font-family: 'GT Pressura Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/GT-Pressura-Mono-Regular.woff2') format('woff2');
}

/* --- Font-Konfiguration --- */
:root {
  --font-body: 'GT Pressura Extended', system-ui, -apple-system, sans-serif;
  --font-heading: 'GT Pressura Mono', 'GT Pressura Extended', monospace;
  --font-meta: 'GT Pressura Mono', monospace;
}

body { font-family: var(--font-body); font-weight: 300; }

/* Bolt pulse animation */
@keyframes bolt-pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 transparent); }
  50% { opacity: 0.6; filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.4)); }
}
.bolt-pulse { animation: bolt-pulse 3s ease-in-out infinite; }

/* Heading font (H1, H2) */
h1, .text-3xl, .text-4xl { font-family: var(--font-heading); }
h2, .text-lg { font-family: var(--font-heading); }

/* Meta texts (small labels, source info, footer, disclaimer, timestamps) */
.text-xs,
footer,
.header-credit-link,
#faqContainer summary span,
.scope-toggle-btn { font-family: var(--font-meta); }

/* ============================================================
   LAYOUT
   ============================================================ */
.relative   { position: relative; }
.fixed      { position: fixed; }
.inset-0    { top: 0; right: 0; bottom: 0; left: 0; }
.block      { display: block; }
.flex       { display: flex; }
.inline-flex { display: inline-flex; }
.grid       { display: grid; }
.hidden     { display: none; }

.flex-1     { flex: 1 1 0%; }
.shrink-0   { flex-shrink: 0; }

.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }

.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.gap-8  { gap: 2rem; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }

/* ============================================================
   SIZING
   ============================================================ */
.w-full  { width: 100%; }
.w-16    { width: 4rem; }
.w-10    { width: 2.5rem; }
.w-5     { width: 1.25rem; }
.w-4     { width: 1rem; }
.w-3     { width: 0.75rem; }
.w-3\.5  { width: 0.875rem; }
.h-10    { height: 2.5rem; }
.h-5     { height: 1.25rem; }
.h-4     { height: 1rem; }
.h-3     { height: 0.75rem; }
.h-3\.5  { height: 0.875rem; }
.min-h-screen { min-height: 100vh; }
.max-w-5xl { max-width: 64rem; }
.max-w-lg  { max-width: 32rem; }

/* ============================================================
   SPACING — MARGIN
   ============================================================ */
.mx-auto  { margin-left: auto; margin-right: auto; }
.mx-2     { margin-left: 0.5rem; margin-right: 0.5rem; }
.mt-0\.5  { margin-top: 0.125rem; }
.mt-1     { margin-top: 0.25rem; }
.mt-2     { margin-top: 0.5rem; }
.mt-3     { margin-top: 0.75rem; }
.mt-4     { margin-top: 1rem; }
.mt-6     { margin-top: 1.5rem; }
.mt-12    { margin-top: 3rem; }
.mb-1     { margin-bottom: 0.25rem; }
.mb-1\.5  { margin-bottom: 0.375rem; }
.mb-2     { margin-bottom: 0.5rem; }
.mb-3     { margin-bottom: 0.75rem; }
.mb-4     { margin-bottom: 1rem; }
.mb-5     { margin-bottom: 1.25rem; }
.mb-6     { margin-bottom: 1.5rem; }
.mb-8     { margin-bottom: 2rem; }
.mb-10    { margin-bottom: 2.5rem; }
.ml-1\.5  { margin-left: 0.375rem; }

/* ============================================================
   SPACING — PADDING
   ============================================================ */
.p-3  { padding: 0.75rem; }
.p-5  { padding: 1.25rem; }
.p-6  { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1   { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-8   { padding-top: 2rem; padding-bottom: 2rem; }
.pt-3   { padding-top: 0.75rem; }
.pt-4   { padding-top: 1rem; }
.pl-1   { padding-left: 0.25rem; }
.pr-8   { padding-right: 2rem; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.text-center { text-align: center; }
.text-xs   { font-size: 0.75rem; line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem; line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }

.font-medium    { font-weight: 500; }
.font-semibold  { font-weight: 600; }
.font-bold      { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.uppercase      { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-relaxed { line-height: 1.625; }
.tabular-nums   { font-variant-numeric: tabular-nums; }
.italic { font-style: italic; }

/* ============================================================
   COLORS — TEXT
   ============================================================ */
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-emerald-400 { color: #34d399; }
.text-emerald-500 { color: #10b981; }
.text-teal-300  { color: #5eead4; }
.text-teal-400  { color: #2dd4bf; }
.text-yellow-400 { color: #facc15; }
.text-yellow-500 { color: #eab308; }
.text-red-400   { color: #f87171; }
.text-transparent { color: transparent; }

/* ============================================================
   COLORS — BACKGROUND
   ============================================================ */
.bg-gray-950   { background-color: #030712; }
.bg-gray-800   { background-color: #1f2937; }
.bg-gray-800\/50 { background-color: rgba(31, 41, 55, 0.5); }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-emerald-500\/20 { background-color: rgba(16, 185, 129, 0.2); }
.bg-teal-500\/10 { background-color: rgba(20, 184, 166, 0.1); }
.bg-teal-500\/20 { background-color: rgba(20, 184, 166, 0.2); }

/* Gradient */
.bg-gradient-to-r.from-emerald-400.to-teal-300 {
  background-image: linear-gradient(to right, #34d399, #5eead4);
}
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================
   BORDERS
   ============================================================ */
.border      { border-width: 1px; }
.border-t    { border-top-width: 1px; }
.border-gray-700    { border-color: #374151; }
.border-gray-800    { border-color: #1f2937; }
.border-gray-800\/50 { border-color: rgba(31, 41, 55, 0.5); }
.border-emerald-500\/20 { border-color: rgba(16, 185, 129, 0.2); }
.border-emerald-500\/10 { border-color: rgba(16, 185, 129, 0.1); }
.border-yellow-500\/10  { border-color: rgba(234, 179, 8, 0.1); }

.rounded-full { border-radius: 9999px; }
.rounded-2xl  { border-radius: 1rem; }
.rounded-xl   { border-radius: 0.75rem; }
.rounded-lg   { border-radius: 0.5rem; }

/* ============================================================
   EFFECTS & TRANSITIONS
   ============================================================ */
.transition     { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.appearance-none { -webkit-appearance: none; appearance: none; }

.opacity-0 { opacity: 0; }

/* Outline / Focus */
.focus\:border-emerald-500:focus { border-color: #10b981; }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }

/* ============================================================
   HOVER STATES
   ============================================================ */
.hover\:border-emerald-500\/50:hover { border-color: rgba(16, 185, 129, 0.5); }
.hover\:border-emerald-500\/30:hover { border-color: rgba(16, 185, 129, 0.3); }
.hover\:text-emerald-400:hover { color: #34d399; }
.hover\:text-teal-400:hover    { color: #2dd4bf; }
.hover\:text-gray-400:hover    { color: #9ca3af; }
.hover\:text-gray-300:hover    { color: #d1d5db; }
.hover\:bg-emerald-500\/20:hover { background-color: rgba(16, 185, 129, 0.2); }
.hover\:bg-teal-500\/20:hover   { background-color: rgba(20, 184, 166, 0.2); }
.hover\:gap-2:hover { gap: 0.5rem; }

/* ============================================================
   GROUP STATES
   ============================================================ */
.group:hover .group-hover\:bg-emerald-500\/20 { background-color: rgba(16, 185, 129, 0.2); }
.group:hover .group-hover\:bg-teal-500\/20    { background-color: rgba(20, 184, 166, 0.2); }
.group:hover .group-hover\:text-emerald-400   { color: #34d399; }
.group:hover .group-hover\:text-teal-400      { color: #2dd4bf; }
.group:hover .group-hover\:gap-2              { gap: 0.5rem; }

/* details[open] */
.group-open\:rotate-180 { /* default no rotation */ }
details[open] > summary .group-open\:rotate-180,
.group[open] .group-open\:rotate-180 { transform: rotate(180deg); }

/* ============================================================
   RESPONSIVE — sm: (640px+)
   ============================================================ */
@media (min-width: 640px) {
  .sm\:py-12       { padding-top: 3rem; padding-bottom: 3rem; }
  .sm\:text-4xl    { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-3xl    { font-size: 1.875rem; line-height: 2.25rem; }
  .sm\:text-base   { font-size: 1rem; line-height: 1.5rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============================================================
   RESPONSIVE — lg: (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:col-span-2  { grid-column: span 2 / span 2; }
  .lg\:col-span-3  { grid-column: span 3 / span 3; }
}

/* ============================================================
   SVG / FILL
   ============================================================ */
/* These are used directly on SVG elements via attributes, no class needed */

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   CUSTOM STYLES (from original inline <style>)
   ============================================================ */

/* Number Input — Spinner-Buttons ausblenden */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 9999px;
  background: #374151;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  border: 2px solid #064e3b;
}
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  border: 2px solid #064e3b;
}

/* Card Glassmorphism */
.card {
  background: rgba(17, 24, 39, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(52, 211, 153, 0.1);
}
.card:hover {
  border-color: rgba(52, 211, 153, 0.25);
}

/* Input Panel — linker Filterbereich */
.input-panel {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(71, 85, 105, 0.4);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.05);
}
.input-divider {
  border: none;
  height: 1px;
  background: rgba(71, 85, 105, 0.4);
}

/* Result Card Hover & Active */
.result-card {
  transition: all 0.3s ease;
  cursor: pointer;
}
.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
}
.result-card.active {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15), inset 0 0 20px rgba(16, 185, 129, 0.05);
}

/* Glow */
.glow {
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.08);
}

/* Comparison Icon */
.comparison-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Fade-In Animation */
.fade-in {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Select Arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8.5L1 3.5h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Header Credit Links */
.header-credit-link {
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 150ms;
}
.header-credit-link:hover {
  color: #34d399;
}

.subtitle-scope-link {
  color: #6b7280;
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 150ms;
}
.subtitle-scope-link:hover {
  color: #34d399;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Number Transition */
.num-transition {
  transition: all 0.3s ease;
}

/* Details / Summary Accordion */
details summary {
  list-style: none;
}
details summary::-webkit-details-marker {
  display: none;
}
details[open] summary {
  color: #34d399;
}
details + details {
  border-top: 1px solid rgba(75, 85, 99, 0.3);
  padding-top: 1rem;
}

/* ============================================================
   FLIP CARD — Comparison Boxes
   ============================================================ */
.flip-card {
  perspective: 600px;
  cursor: default;
}
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 0.75rem;
}
.flip-card-front {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(31, 41, 55, 0.5);
  padding: 0.75rem;
}
.flip-card-back {
  transform: rotateY(180deg);
  background: #0a0f1a;
  border: 1px solid rgba(75, 85, 99, 0.3);
  display: flex;
  align-items: center;
  padding: 0.625rem 0.75rem;
}

/* ============================================================
   SCOPE TOGGLE — Segmented Control
   ============================================================ */
.scope-toggle-group {
  display: flex;
  background: #1f2937;
  border-radius: 9999px;
  padding: 3px;
  border: 1px solid rgba(71, 85, 105, 0.4);
}
.scope-toggle-btn {
  flex: 1;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
  color: #9ca3af;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scope-toggle-btn:hover:not(.active) {
  color: #d1d5db;
}
.scope-toggle-btn.active {
  background: #10b981;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* FAQ inline links */
#faqContainer p a {
  color: #6ee7b7;
  text-decoration: underline;
  text-decoration-color: rgba(110, 231, 183, 0.3);
  text-underline-offset: 2px;
  transition: color 150ms, text-decoration-color 150ms;
}
#faqContainer p a:hover {
  color: #34d399;
  text-decoration-color: #34d399;
}
