/**
 * Vereenvoudigde BMI Calculator Stijlen
 */

/* Root variabelen voor BMI Calculator */
:root {
    /* BMI Categorie Kleuren - Niet overschrijven */
    --bmi-color-underweight: #FFFC7C;
    --bmi-color-normal: #A0E57C;
    --bmi-color-overweight: #FFD966;
    --bmi-color-obesity: #FF9F9F;
    
    /* Overschrijfbare thema-variabelen */
    --bmi-button-color: #4f46e5;
    --bmi-button-hover-color: #4338ca;
    --bmi-heading-color: #1f2937;
    --bmi-text-color: #4b5563;
    --bmi-background-color: #ffffff;
    --bmi-result-bg-color: #ffffff;
    --bmi-font-family: inherit;
    --bmi-border-radius: 4px;
}

/* Algemene container */
.bmi-calculator-container {
    font-family: var(--bmi-font-family, inherit);
    line-height: 1.5;
    color: var(--bmi-text-color, #4b5563);
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Formulier container */
.bmi-calculator-form-container {
    flex: 1;
    min-width: 300px;
}

/* Resultaten container */
.bmi-calculator-results-container {
    flex: 1;
    min-width: 300px;
}

/* Rijen en kolommen */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
    width: calc(100% + 20px);
}

.col {
    flex: 1;
    padding: 10px;
    min-width: 0;
}

/* Formulier stijlen */
.bmi-calculator-form {
    background-color: var(--bmi-background-color, #ffffff);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.calculator-content {
    margin-bottom: 20px;
}

.calculator-action {
    display: flex;
    justify-content: flex-end;
}

.input-wrapper {
    margin-bottom: 15px;
}

.input {
    margin-bottom: 15px;
}

.input__title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: var(--bmi-heading-color, #1f2937);
}

.input-field {
    display: flex;
    align-items: center;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0 12px;
    height: 40px;
}

.input-field__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #1f2937;
    font-size: 16px;
    padding: 0;
    height: 100%;
    min-width: 0;
}

.input-field__hint {
    color: #9ca3af;
    font-size: 14px;
    margin-left: 8px;
}

/* Gender switcher */
.button-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0 12px;
    height: 40px;
    width: 100%;
    cursor: pointer;
}

.button-switcher--active {
    background-color: var(--bmi-button-color, #4f46e5);
    border-color: var(--bmi-button-color, #4f46e5);
    color: white;
}

.button-switcher__text {
    font-size: 16px;
    color: #4b5563;
}

.button-switcher__text--active {
    color: #ffffff;
}

/* Bereken knop */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s ease;
}

.button--primary {
    background-color: var(--bmi-button-color, #4f46e5);
    color: #ffffff;
    border-color: var(--bmi-button-color, #4f46e5);
}

.button--primary:hover {
    background-color: var(--bmi-button-hover-color, #4338ca);
    border-color: var(--bmi-button-hover-color, #4338ca);
}

/* Foutmeldingen */
.calculator-result--error {
    background-color: #fee2e2;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    display: none;
    color: #b91c1c;
}

.calculator-result--error p {
    margin: 5px 0;
}

/* Resultaten stijlen */
.bmi-calculator-results {
    background-color: var(--bmi-result-bg-color, #ffffff);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.bmi-calculator-results h3 {
    color: var(--bmi-heading-color, #1f2937);
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
}

.table-cell {
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}

.table-cell--dark {
    background-color: #f3f4f6;
}

.table-cell--only-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--bmi-heading-color, #1f2937);
}

/* BMI Voortgangsbalk */
.table-progress-list {
    margin-bottom: 10px;
}

.table-progress-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
}

.table-progress-list__item {
    font-size: 12px;
    color: #4b5563;
    text-align: center;
    padding: 0 5px;
}

/* Verbeterde styling voor voortgangsbalk */
.table-progress {
    position: relative;
    height: 12px;
    border-radius: 6px;
    overflow: visible;
    margin: 20px 0;
    background: linear-gradient(90deg, 
        var(--bmi-color-underweight, #FFFC7C) 0%, var(--bmi-color-underweight, #FFFC7C) 16.7%,
        var(--bmi-color-normal, #A0E57C) 16.7%, var(--bmi-color-normal, #A0E57C) 50%,
        var(--bmi-color-overweight, #FFD966) 50%, var(--bmi-color-overweight, #FFD966) 66.7%,
        var(--bmi-color-obesity, #FF9F9F) 66.7%, var(--bmi-color-obesity, #FF9F9F) 100%
    );
    border: 1px solid #e0e0e0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Verbeterde styling voor indicator */
.table-progress__indicator {
    position: absolute;
    width: 20px !important;
    height: 20px !important;
    background-color: white !important;
    border: 3px solid #222222 !important;
    border-radius: 50% !important;
    top: -5px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important; /* Hogere z-index om zichtbaarheidsproblemen te voorkomen */
    transition: left 0.3s ease-out !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.7) !important;
    pointer-events: none; /* Zorgt ervoor dat de indicator muisklikken doorgeeft */
}

/* Resultatentabel */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.result-table th, 
.result-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.result-table th {
    color: var(--bmi-heading-color, #1f2937);
    font-weight: 500;
    width: 60%;
}

.result-table td {
    color: var(--bmi-text-color, #4b5563);
}

.semibold {
    font-weight: 600;
    color: var(--bmi-heading-color, #1f2937);
}

/* E-mail abonnement */
.bmi-email-subscription {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.bmi-email-form .form-row {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
}

.bmi-email-form input[type="email"] {
    flex: 1;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 16px;
    color: #1f2937;
    margin-right: 10px;
}

.bmi-email-form .checkbox-row {
    align-items: flex-start;
}

.bmi-email-form .checkbox-label {
    display: flex;
    align-items: flex-start;
}

.bmi-email-form .checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    margin-right: 10px;
}

.bmi-email-form .checkbox-label span {
    font-size: 13px;
    color: #6b7280;
}

.bmi-email-form .response-message {
    font-size: 14px;
    padding: 10px 0;
}

.bmi-email-form .response-message.success {
    color: #10b981;
}

.bmi-email-form .response-message.error {
    color: #ef4444;
}

/* Animatie voor resultaten */
.animate {
    transition: all 0.3s ease;
}

/* Responsieve aanpassingen */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
    
    .result-table th, 
    .result-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .bmi-email-form .form-row {
        flex-direction: column;
    }
    
    .bmi-email-form input[type="email"] {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .bmi-email-form button {
        width: 100%;
    }
}