/* Project specific styles that complement core.css */

/* Poppins Font-Deklarationen */
/* Regular */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/Poppins-Regular.woff2') format('woff2'),
        url('/fonts/Poppins-Regular.ttf') format('truetype');
}

/* Italic (Regular Italic) */
@font-face {
    font-family: 'Poppins';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/Poppins-Italic.woff2') format('woff2'),
        url('/fonts/Poppins-Italic.ttf') format('truetype');
}

/* Medium */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/Poppins-Medium.woff2') format('woff2'),
        url('/fonts/Poppins-Medium.ttf') format('truetype');
}

/* SemiBold */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/Poppins-SemiBold.woff2') format('woff2'),
        url('/fonts/Poppins-SemiBold.ttf') format('truetype');
}

/* Bold */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/Poppins-Bold.woff2') format('woff2'),
        url('/fonts/Poppins-Bold.ttf') format('truetype');
}

/* Bold Italic */
@font-face {
    font-family: 'Poppins';
    font-style: italic;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/Poppins-BoldItalic.woff2') format('woff2'),
        url('/fonts/Poppins-BoldItalic.ttf') format('truetype');
}

/* Poppins als Standard-Schriftart */
:root {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-feature-settings: 'liga' 1, 'calt' 1;
    /* Poppins unterstützt diese Features typischerweise */
}

/* HINZUGEFÜGT: Stärkere Regel für alle Elemente, um Inter Font global zu erzwingen */
* {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Formular-Fokus-Stil - vereinfachte Version, die Border erhält */
*:focus,
*:focus-visible,
input:focus,
button:focus,
select:focus,
textarea:focus,
a:focus {
    outline: none !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    ring-width: 0 !important;
    ring-offset-width: 0 !important;
}

/* Zusätzlich: Form-Elemente sollen bei Focus ihren Border behalten */
input:focus,
select:focus,
textarea:focus,
button:focus {
    border-color: hsl(var(--border)) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Verhindert jegliche Fokus-Stiländerungen im Browserstil */
:focus {
    outline: none !important;
}

::-moz-focus-inner {
    border: 0 !important;
}

/* Spezifische Regel für Formulare und Listen, die oft eigene Schriftarten haben */
input,
button,
select,
textarea,
label,
li,
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: inherit;
    /* !important entfernt, da die globale Regel dies abdeckt */
}

/* Refined hover states for a banking context */
.hover-elegant-UNUSED {
    transition: background-color 0.2s ease;
}

.hover-elegant-UNUSED:hover {
    background-color: #f8fafc;
    /* Super light gray */
}

/* Ensure background colors work correctly in dark mode */
.dark .bg-background {
    background-color: hsl(var(--background)) !important;
}

/* Make sure the background is enforced in case of conflicting styles */
.bg-background {
    background-color: hsl(var(--background)) !important;
}

/* Verbesserte Kontrastregeln für SVG-Elemente in der Pagination und Navigation */
.dark svg,
.dark .text-foreground svg {
    color: hsl(var(--foreground)) !important;
}

.light svg,
.light .text-foreground svg {
    color: hsl(var(--foreground)) !important;
}

/* Custom Select ohne natives Dropdown-Icon */
.custom-select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
}

.custom-select::-ms-expand {
    display: none !important;
}

/* Styling für Modul-Überschriften - deutlich größer und fetter */
.module-headline {
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    color: hsl(var(--foreground)) !important;
}

/* Hide border on empty search results container */
#search-results:empty {
    border: none;
    box-shadow: none;
    /* Auch Schatten ausblenden, wenn leer */
}

/* Optional: Style when HTMX is requesting */
#search-results.htmx-request {
    /* You might want to keep the border/shadow during loading */
    border-style: solid;
    /* Ensure border is shown if hidden by :empty */
}

/* Fix für Tabellen-Ränder: Stelle sicher, dass sie beim Dark-Mode-Wechsel synchron übergehen */
.divide-border>* {
    border-color: hsl(var(--border)) !important;
}

thead.border-b,
.border-t,
.border-border {
    border-color: hsl(var(--border)) !important;
}

/* Override sidebar hover states for a more elegant look */
/* Diese Styles wurden nach sidebar.css verschoben */

/* Stärkerer Font-Weight für aktive Sidebar-Links */
a[href].text-foreground.font-extrabold {
    font-weight: 900 !important;
}

.htmx-indicator {
    opacity: 0;
    pointer-events: none;
    /* Standardmäßig Klicks ignorieren */
    transition: opacity 200ms ease-in;
}

/* Macht den Indikator sichtbar, wenn das Element, auf das sich hx-indicator bezieht, */
/* oder ein Elternelement die htmx-request Klasse bekommt. */
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
    pointer-events: auto;
    /* Sichtbar -> Klicks wieder zulassen (falls nötig) */
}

/* Spezifische Regel nur für den Search-Indicator, falls nötig */
/* 
#search-input.htmx-request ~ #search-indicator,
#search-input.htmx-request + #search-results + #search-indicator { 
    opacity: 1;
    pointer-events: auto;
}
*/

/* Spezifische Regel für das Suchfeld - KEINE Änderung bei Focus/Active */
#search:focus,
#search:active,
#search:focus-visible,
#mobile-search:focus,
#mobile-search:active,
#mobile-search:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    ring-width: 0 !important;
    ring-offset-width: 0 !important;
    border-color: hsl(var(--input)) !important;
}

/* === Fix: Karten- & Tabellen-Border Dark-Mode = gleiche Farbe wie Light === */
.dark .border,
.dark .border-t,
.dark .border-b,
.dark .divide-border>* {
    border-color: hsl(var(--border)) !important;
}

/* NEU: Rand der Dashboard-Kacheln im Dark Mode entfernen */
.dark .bg-card.border {
    border-color: transparent !important;
}

/* Sidebar mobile: Links und Icons im Lightmode schwarz, außer active Link */
.sidebar-link.text-black {
    color: #111 !important;
}

.sidebar-icon.text-black {
    color: #111 !important;
}

/* Box Shadow für mobile Header Icons Container */
.mobile-icons-shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Dark Mode - Mehrere Schatten für mehr Dimension */
.dark .mobile-icons-shadow {
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.25),
        0 4px 16px rgba(0, 0, 0, 0.15);
}