/* =============================================================================
   styles_main.css - Variablen, Grundlagen, globale Styles
   ============================================================================= */

/* =============================================================================
   CSS VARIABLES
   ============================================================================= */
:root {
  --color-primary: #AD0470;
  --color-primary-dark: #8a0359;
  --color-secondary: #007AB4;
  --color-secondary-dark: #005a87;
  --color-accent-green: #A2C130;
  --color-accent-green-dark: #8aa028;
  --color-accent-yellow: #FFC000;
  --color-accent-yellow-dark: #e6ac00;
  
  --color-text-primary: #2c3e50;
  --color-text-secondary: #6c757d;
  --color-background: #f0f0f0;
  --color-white: #ffffff;
  --color-border: #e1e5e9;
  --color-home: #54595F;
  
  --font-heading: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 3px 15px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.1);
  
  --footer-height: 44px;
  --max-width: 1220px;
  --gutter: 20px;
}

/* =============================================================================
   GRUNDLAGEN
   ============================================================================= */
html {
  font-size: 16px;
}

html, body{
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font-body);
  margin: 0; 
  padding: 0; 
  background-color: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-primary);
}

p, span, label, .form-control {
  font-family: var(--font-body);
  font-weight: 400;
}

.container-fluid{
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* =============================================================================
   GLOBALE SCHRIFTGRÖSSEN UND -SCHNITTE
   ============================================================================= */
h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

p {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
}

li {
  font-size: 1.1rem;
}

/* =============================================================================
   HEADER
   ============================================================================= */
.main-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 0; 
  margin: 0;
  box-shadow: 0 2px 10px rgba(173, 4, 112, 0.3);
  position: sticky; 
  top: 0; 
  z-index: 1030;
  flex-shrink: 0;
}

.header-h1{
  margin: 0;
}

.header-subtitle p{
  margin: 0 0 22px 0;
}

.header-content {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  padding: 15px 30px; 
  margin: 0 auto;
}

.header-title {
  font-family: var(--font-heading);
  font-size: 1.8em; 
  font-weight: 700;
  margin: 0; 
  letter-spacing: 0.5px; 
  color: var(--color-white);
}

/* =============================================================================
   Main content
   ============================================================================= */
.main-content{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#page_content{
  height: 100%;
}

/* =============================================================================
   BREADCRUMB NAVIGATION (für alle Module)
   ============================================================================= */
.breadcrumb {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 22px;
  line-height: 1.6;
  background-color: unset;
  padding: 0;
}

.breadcrumb a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--color-text-primary);
  font-weight: 600;
}

.breadcrumb-redesign {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

.breadcrumb-redesign a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.breadcrumb-redesign a:hover {
  color: var(--color-text-primary);
  font-weight: 600;
}

/* =============================================================================
   RESPONSIVE - MOBILE
   ============================================================================= */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }
}

/* =============================================================================
   Datatable
   ============================================================================= */
.download-button {
  border-radius: 6px !important;
  border: 1px solid #ddd !important;
  padding: 5px 20px !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  color: #666 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  font-family: var(--font-body) !important;
}   

/* =============================================================================
   main layout
   ============================================================================= */
.page-layout {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.main-column {
  flex: 1 1 auto;
  min-width: 0; /* wichtig für Plotly/Leaflet */
}

.side-column {
  flex: 0 0 370px;
  min-width: 370px;
  max-width: 25%;
  position: sticky;
  top: 84px;
  align-self: flex-start;
}

.side-column .detail-sidebar {
  max-height: calc(100vh - 96px - var(--footer-height));
  overflow-y: auto;
  overflow-x: hidden;
}

@media (max-width: 1200px) {
  .page-layout.has-sidebar {
    flex-direction: column;
  }

  .page-layout.has-sidebar .main-column {
    order: 2;
  }

  .page-layout.has-sidebar .side-column {
    order: 1;
    position: static;
    top: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .page-layout.has-sidebar .side-column .detail-sidebar {
    max-height: none;
    overflow: visible;
  }

  .page-layout .main-column {
    width: 100%;
    max-width: 100%;
  }
}
  
