/* Meting Verdeling Component CSS */
.meting-verdeling {
    /* Gebruik dezelfde card styling als andere stat-cards */
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    
    /* Grid positioning - past in stats-grid */
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between; /* Zorgt voor betere verdeling */
    
    /* Beperk maximale breedte om card-karakter te behouden */
    max-width: 500px;
    width: 100%;
    margin: 0 auto; /* Centreer de card als deze smaller is dan de container */
}

/* Override max-width wanneer de card gebruikt wordt binnen een stats-grid */
.stats-grid .meting-verdeling {
    max-width: none;
    margin: 0;
}

.meting-verdeling-titel {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
    color: #336699;
    text-align: left;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.meting-verdeling-container {
    width: 100%;
}

.balken-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 230px; /* Verhoogd van 200px naar 230px voor hogere staven */
    margin-bottom: 15px;
    padding: 20px 10px 0 10px;
    position: relative;
}

.categorie-kolom {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 18%;
    margin: 0 1%;
}

.balk-wrapper {
    height: 180px; /* Verhoogd van 140px naar 180px voor hogere staven */
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.balk {
    width: 80%;
    min-height: 3px;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.balk:hover {
    transform: scaleX(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.categorie-label {
    font-weight: bold;
    font-size: 0.85em;
    color: #333;
    text-align: center;
    margin-top: 8px;
    line-height: 1.2;
    word-wrap: break-word;
}

.categorie-waarden {
    margin-top: 8px;
    text-align: center;
    font-size: 0.9em;
}

.aantal {
    font-weight: normal;
    color: #666;
    font-size: 0.8em;
}

.percentage {
    color: #333;
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 2px;
}

.totaal-info {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
}

.meting-verdeling-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f1aeb5;
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .meting-verdeling {
        padding: 15px;
        max-width: none; /* Op kleinere schermen mag de card de volledige breedte gebruiken */
    }
    
    .balken-container {
        height: 200px !important;
        padding: 15px 5px 0 5px !important;
    }
    
    .balk-wrapper {
        height: 140px !important; /* Ook verhoogd voor mobile */
    }
    
    .categorie-label {
        font-size: 0.75em;
    }
    
    .categorie-waarden {
        font-size: 0.8em;
    }
    
    .aantal {
        font-size: 0.9em;
    }
    
    .percentage {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .balken-container {
        height: 180px !important;
        padding: 15px 5px 0 5px !important;
    }
    
    .balk-wrapper {
        height: 120px !important; /* Ook verhoogd voor kleinste mobile */
    }
    
    .categorie-label {
        font-size: 0.7em;
    }
    
    .categorie-waarden {
        font-size: 0.75em;
    }
}
