/* ==========================================================================
   CSS statistics Dashboard (Seite: StatisticsDashboardForm)
   ==========================================================================
   Enthält nur Styles für die Kachelansicht (Tiles) mit Bildern
   - nutzt Variablen für Farben, Abstände, Radien
   - entfernt Redundanzen
   ========================================================================== */

/* ===============================
   Variablen
================================= */
:root {
    --color-border: #e7e7e7;
    --color-bg: #fff;
    --color-bg-light: #f9f9f9;
    --color-text: #000;
    --color-accent: #6b6b6b;
    --color-tooltip-bg: #FFF9C4;

    --radius-none: 0;
    --radius-small: 4px;
    --radius-medium: 6px;

    --space-s: 5px;
    --space-m: 10px;
    --space-l: 20px;

    --font-size-base: 16px;
    --font-size-medium: 18px;
    --font-size-large: 20px;

    --tile-height: 400px;
    --tile-img-height: 300px;
    --tooltip-width: 250px;
}

/* ===============================
   Flex-Container für Dashboard
================================= */
.dashboard-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-s);
}

.dashboard-flex > .chart-wrapper {
    flex: 0 0 48%;
    max-width: 48%;
    height: var(--tile-height);
}

/* ===============================
   Tile-Bilder
================================= */
.dashboard-flex .tile-img {
    width: 100%;
    height: var(--tile-img-height);
    object-fit: contain;
    object-position: center;
    display: block;
    background-color: var(--color-bg);
}

/* ===============================
   Chart-Wrapper & Box
================================= */
.chart-wrapper {
    margin-bottom: 25px;
    width: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-border);
    color: var(--color-text);
    font-weight: bold;
    font-size: var(--font-size-large);
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-bottom: none;
    border-radius: var(--radius-none);
}

.chart-title {
    flex: 1;
}

.chart-box {
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: var(--radius-none);
    background: var(--color-bg);
    width: 100%;
    height: auto;
    box-sizing: border-box;
    padding: var(--space-m);
}

.chart-box.no-padding {
    padding: 0;
}

/* ===============================
   Info-Icon + Tooltip
================================= */
.info-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    background-color: transparent;
    color: var(--color-accent);
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    position: relative;
    margin-right: 10px;
    transition: border-color 0.2s, color 0.2s;
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-tooltip-bg);
    color: var(--color-text);
    padding: 8px 12px;
    border-radius: var(--radius-small);
    font-size: var(--font-size-base);
    font-weight: normal;
    white-space: normal;
    word-wrap: break-word;
    text-align: justify;
    line-height: 1.6;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    width: var(--tooltip-width);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}
