/* ==========================================================================
   Teemamuuttujat (Theme Variables) - Saavutettavuus ja Kontrasti
   Ylikirjoittaa Bulman vaikealukuiset vaaleat värit
   ========================================================================== */

:root {
  --text-grey: #5A5A5A;       /* Huomattavasti tummempi (Contrast > 4.5:1) */
  --text-grey-light: #707070; /* Tummempi vaalealle teemalle */
}

body.theme-dark {
  --text-grey: #A1A1AA;       /* Pehmeä harmaa tummaan teemaan */
  --text-grey-light: #71717A;
}

/* Bulma ylikirjoitukset */
.has-text-grey {
  color: var(--text-grey) !important;
}

.has-text-grey-light {
  color: var(--text-grey-light) !important;
}

/* ==========================================================================
   Yhteiset Komponenttityylit (UI Consistency)
   Korvaa HTML inline style="border: ..." -ratkaisut
   ========================================================================== */

.custom-box-dashed {
  background-color: var(--bg-surface) !important;
  border: 2px dashed var(--border-color) !important;
  border-radius: 8px; /* Yhtenäistetty radius */
}

.custom-box-dashed-weak {
  background-color: var(--bg-surface);
  border: 1px dashed var(--border-color) !important;
  border-radius: 6px;
}

/* Parannetaan tilaindikaattorien saavutettavuutta lisäämällä visuaaliset reunukset tyyleihin */
.status-indicator-success {
  border-left: 4px solid var(--bulma-success) !important;
}

.status-indicator-danger {
  border-left: 4px solid var(--bulma-danger) !important;
}

.status-indicator-warning {
  border-left: 4px solid var(--bulma-warning) !important;
}

.status-indicator-info {
  border-left: 4px solid var(--bulma-info) !important;
}

/* ==========================================================================
   Tabs - Tumman teeman korjaukset 
   (Bulman navigaatiotäbit heikolla kontrastilla korjattu)
   ========================================================================== */
body.theme-dark .tabs a {
  color: #c9c9c9;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .tabs a:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-bottom-color: #666;
}

body.theme-dark .tabs.is-boxed li.is-active a {
  background-color: var(--bg-surface, #1e1e1e);
  border-color: #444;
  border-bottom-color: transparent !important;
  color: #60a5fa; /* Vaalea sininen brändiväri korostamaan aktiivista tabiä */
}

/* ==========================================================================
   Käyttöliittymän Aputekstit (Tooltips)
   ========================================================================== */
.ui-tooltip-icon {
  color: var(--bulma-link);
  cursor: help;
  margin-left: 0.5rem;
  font-size: 0.9em;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ui-tooltip-icon:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(30, 30, 30, 0.95);
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: normal;
  width: max-content;
  max-width: 250px;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  pointer-events: none;
  font-weight: 500;
  line-height: 1.4;
}

.ui-tooltip-icon:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(30, 30, 30, 0.95) transparent transparent transparent;
  pointer-events: none;
}
