<style>

html[data-bs-theme="dark"] .text-danger  { color: #ff6b6b !important; }
html[data-bs-theme="dark"] .text-success { color: #3ddc84 !important; }


#ergebnis{
position: absolute;
z-index: 1000;
margin-left: 1rem;
display: none;}

.card h4, .card h4 a {
	color: #6c757d;
	text-decoration: none;
	font-size: calc(1.53rem + .36vw); /* 20% größer als normal */
	white-space: nowrap;
	overflow: hidden;
	}
	
	

.kl-home {color: #6c757d;}

.text-better { color: var(--bs-purple);}
.text-worse { color: var(--bs-orange);}

@media (min-width: 1400px){ .container-xxl { max-width: 1600px; } }
  
.form-control {padding: .1rem .2rem;}
.navbar {margin-bottom: 1rem;}
/*.table-striped {font-size: 0.8rem;} 
@media (min-width: 1400px){ .table-striped {font-size: 0.9rem;} }*/

.table-striped td,
.table-striped th {
  white-space: nowrap;
}

@media (min-width: 576px) { .modal-xl { --bs-modal-width: 95%; } }


	/* Lässt den Diagramm-Container mit dem Modal-Hintergrund „verschmelzen“ */
	#asset_chart_div {
	background: transparent;
	}



/* h4 a {text-decoration: none;} */

#preloader {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
    height: 100%;
    width: 100%;
    background: #fff;
    display: flex;
}
.loader{
    margin: auto;
    height: 50px;
    width: 50px;
    border-radius: 50%;
    position: relative;
}

/* Verhindert Zeilenumbrüche in Tabellenzellen */
.text-nowrap {
    white-space: nowrap !important;
}

/* Optimierung für mobile Ansicht: Tabelle scrollbar machen */
.single-table.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Optional: Verkleinerung der Schrift auf sehr kleinen Displays */
@media (max-width: 576px) {
    #kaufen-div {
        font-size: 0.85rem;
    }
}


/* --- Modal: DivChange (responsive Tabelle) --- */
@media (max-width: 576px) {
/* DivChange – kompakte Tab-Navigation auf sehr kleinen Screens */

	.nav-tabs .nav-item {
	flex: 1 1 auto;
	}

	.nav-tabs .nav-link {
	padding: .35rem .4rem;          /* kleineres Padding */
	font-size: .85rem;               /* kleinere Schrift */
	white-space: nowrap;             /* kein Umbruch */
	text-align: center;
	}

	/* optional: Tabs minimal schmaler */
	.nav-tabs .nav-item {
	max-width: 20%;                  /* maximal 5 Tabs pro Zeile */
	}
	
}

/* --- Aktie-Spalte im DivChange Modal: Ellipsis + dynamische Breite --- */

#divTable .col-aktie {
  display: block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100px;
}

/* SM (>=576px): etwas mehr Platz */
@media (min-width: 576px) {
  #divTable .col-aktie {
    max-width: 120px;
  }
}

/* MD (>=768px): noch mehr 
@media (min-width: 768px) {
  #divTable .col-aktie {
    max-width: 220px;
  }
}

/* LG (>=992px): darf breit sein 
@media (min-width: 992px) {
  #divTable .col-aktie {
    max-width: 260px;
  }
}

/* Modal DivChange: responsive & kompakt */
@media (max-width: 576px) {
  #divTable th,
  #divTable td { padding: .35rem .5rem; }
  #divTable { font-size: .95rem; }
  #divTable td.text-truncate {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* weiches horizontales Scrollen im responsive Wrapper */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* ---- DivList/DivChange: Aktie-Spalte XS max 25% ---- 
@media (max-width: 576px) {
  #divErtraege th.col-aktie,
  #divErtraege td.col-aktie {
    width: 25%;
    max-width: 25%;
  }

  #divErtraege .truncate {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #divErtraege th,
  #divErtraege td {
    padding: .35rem .5rem;
  }

  #divErtraege {
    font-size: .95rem;
  }
}


/* Modal DivChange: responsive & kompakt */
@media (max-width: 576px) {
  #divErtraege th,
  #divErtraege td { padding: .35rem .5rem; }
  #divErtraege { font-size: .95rem; }
/*  #divErtraege td.text-truncate {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }*/
}
/* Zahlen niemals umbrechen */
.col-num {
  white-space: nowrap;
}

#divErtraege .col-aktie {
  display: block;
  overflow: hidden;
  white-space: nowrap;
}



/**************************************************************************
 * Mobile Cards statt Tabelle – Bootstrap 5.3 kompatibel (Light/Dark)
 **************************************************************************/

/* --- DESKTOP: Cards ausblenden --- */
#cards-container {
  display: none;
}

/* --- MOBILE: Tabelle & Datatable-UI ausblenden, Cards zeigen --- */
@media (max-width: 768px) {
  #vkdiv,
  .datatable-top,
  .datatable-info {
    display: none !important;
  }
  #cards-container {
    display: block !important;
  }
}

/**************************************************************************
 * CARD STYLES (nutzt Bootstrap Theme-Variablen → Dark/Light automatisch)
 **************************************************************************/

.stock-card {
  background-color: var(--bs-card-bg);           /* Themeaware */
  color: var(--bs-card-color);                   /* Themeaware */
  border: 1px solid var(--bs-border-color);      /* Themeaware */
  border-radius: .6rem;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,.05);         /* dezent, passt auch in dark */
}

/* Zeilen-Statusfarben: in Dark leicht gedämpft via Subtle-Variablen */
.stock-card.warning {
  background-color: var(--bs-warning-bg-subtle);
  border-color: var(--bs-warning-border-subtle);
}
.stock-card.danger {
  background-color: var(--bs-danger-bg-subtle);
  border-color: var(--bs-danger-border-subtle);
}
.stock-card.success {
  background-color: var(--bs-success-bg-subtle);
  border-color: var(--bs-success-border-subtle);
}

html[data-bs-theme="dark"] .text-better {
  color: #b985ff; /* brighter purple für bessere Lesbarkeit auf dunklem BG */
}


/* ----------------- Card-Kopf: Name/ISIN links, Kurs rechts ----------------- */

.stock-card {
  font-size: 125%;
}

.stock-card .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

/* Linke Seite (aus buildAktieHTML) darf umbrechen */
.stock-card .card-name {
  min-width: 0;           /* ermöglicht sauberes Wrapping */
  line-height: 1.25;
}

/* Rechte Seite: Kurs groß + Change klein darunter */
.stock-card .card-price {
  text-align: right;
  flex: 0 0 auto;
}

.stock-card .card-price .price-big {
  font-size: 1.35rem;     /* Kurs prominent */
  font-weight: 600;
  line-height: 1.15;
}

.stock-card .card-price .price-change {
  font-size: 0.95rem;     /* Change dezenter */
  opacity: 0.9;
  line-height: 1.2;
}

/* Farben für Veränderung (nutzt Bootstrap Theme-Farben) */
.stock-card .card-price .price-change.chg-up {
  color: var(--bs-success);
}
.stock-card .card-price .price-change.chg-down {
  color: var(--bs-danger);
}
.stock-card .card-price .price-change.chg-neutral {
  color: var(--bs-secondary-color);
}

/* Dark-Mode Feinabstimmung für Neutral */
html[data-bs-theme="dark"] .stock-card .card-price .price-change.chg-neutral {
  color: #adb5bd;
}

/* kräftigeres Grün/Rot im Dark-Mode für Kurs-Change */
html[data-bs-theme="dark"] .stock-card .card-price .price-change.chg-up   { 
  color: #3ddc84;  /* helleres Grün */
}
html[data-bs-theme="dark"] .stock-card .card-price .price-change.chg-down { 
  color: #ff6b6b;  /* helleres Rot */
}




/* ----------------- Datenzeilen ----------------- */

.stock-card .card-field {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dotted var(--bs-border-color);
  font-size: 1.05rem;   /* „a bisserl größer“ wie gewünscht */
  line-height: 1.4;
}

.stock-card .card-field:last-of-type {
  border-bottom: 0;
}

.stock-card .card-field b {
  font-size: 1.05rem;
}

/**************************************************************************
 * ACTION BAR (Icons) – schick & theme-aware
 **************************************************************************/

.stock-card .card-actions {
  display: flex;
  justify-content: space-between;  /* gleichmäßig verteilen */
  align-items: center;
  margin-top: 12px;
  gap: 8px;
}

.stock-card .card-actions a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  text-decoration: none;
  background: var(--action-bg);
  color: var(--action-fg);
  transition: all 0.15s ease-in-out;
}

.stock-card .card-actions a i {
  font-size: 1.6rem;   /* Icons etwas größer */
  pointer-events: none;
}

.stock-card .card-actions a:hover {
  background: var(--action-bg-hover);
  transform: translateY(-2px);
}

.stock-card .card-actions a:active {
  transform: scale(0.92);
}

/* Light Theme Action-Button Farben */
:root,
html[data-bs-theme="light"] {
  --action-bg: rgba(0,0,0,0.05);
  --action-bg-hover: rgba(0,0,0,0.12);
  --action-fg: #333;
}

/* Dark Theme Action-Button Farben */
html[data-bs-theme="dark"] {
  --action-bg: rgba(255,255,255,0.08);
  --action-bg-hover: rgba(255,255,255,0.15);
  --action-fg: #f2f2f2;
}

/**************************************************************************
 * QUICKBAR – kompakt, mit hartem Zeilenumbruch zwischen Top/Flop
 **************************************************************************/

/* Abstand unter der Button-Gruppe */
#cards-quickbar .btn-group.flex-wrap {
  margin-bottom: 10px;
}

/* Flex-Break erzwingt neue Zeile zwischen Top und Flop */
.btn-group.flex-wrap .flex-break {
  flex-basis: 100%;
  height: 0;
  padding: 0;
  margin: 0;
}

/* Alle Quickbar-Buttons gleich groß → 4 pro Zeile */
#cards-quickbar .btn-group.flex-wrap .btn {
  flex: 1 1 24%;
  white-space: nowrap;
}

/* Mini-Helper aus deiner bisherigen Quickbar */
#cards-quickbar .btn-group .btn {
  flex: 1 1 auto;
}

#cards-quickbar .form-label {
  min-width: 56px;
}

/* Sehr kleine Bildschirme: 2 Buttons je Zeile */
@media (max-width: 360px) {
  #cards-quickbar .btn-group.flex-wrap .btn {
    flex: 1 1 48%;
  }
}

/* Quickbar: Buttons im Dark-Mode etwas knackiger */
html[data-bs-theme="dark"] #cards-quickbar .btn-outline-primary {
  color: #6ca8ff;          /* helleres Blau für Text/Border */
  border-color: #6ca8ff;
}
html[data-bs-theme="dark"] #cards-quickbar .btn-outline-primary:hover {
  color: #0b234a;
  background-color: #6ca8ff;
  border-color: #6ca8ff;
}

html[data-bs-theme="dark"] #cards-quickbar .btn-outline-secondary {
  color: #cfd6df;          /* etwas heller als Bootstrap-Default */
  border-color: #cfd6df;
}
html[data-bs-theme="dark"] #cards-quickbar .btn-outline-secondary:hover {
  color: #0b0e13;
  background-color: #cfd6df;
  border-color: #cfd6df;
}


/* 2×2-Raster für die Action-Buttons in Tabellenzellen */
.table-actions-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1.9rem);
  grid-auto-rows: 1.9rem;
  gap: .3rem;
  justify-content: end;     /* rechtsbündig */
  align-content: center;    /* vertikal mittig */
}
.table-actions-2x2 .btn {
  --bs-btn-padding-x: 0;
  --bs-btn-padding-y: 0;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: .9rem;
}
.table-actions-2x2 .btn:hover { background-color: var(--bs-gray-100); }

/* Optional, falls in der TD Umbrüche verhindert werden sollen */
td.text-nowrap .table-actions-2x2 { margin-left: .25rem; }

/* (Optional) Zeile als klickbar markieren – wenn du Row-Click aktiv nutzt */
tr.is-clickable:hover td { background: rgba(0,0,0,.02); cursor: pointer; }


.is-not-ready {
  visibility: hidden;
}


.kaufen-card {
  font-size: 125%;
}


.kaufen-card .card-field {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dotted var(--bs-border-color);
  font-size: 1.05rem;   /* „a bisserl größer“ wie gewünscht */
  line-height: 1.4;
}

.kaufen-header {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  justify-content: center;

  background: white;
  padding: 0.5rem 0;
}



</style>

