/**
 * NexApp Kostenrekentool Stylesheet
 * @version 2.0.0
 *
 * Stijlen voor de vernieuwde, uitgebreide kostenrekentool.
 * Ontworpen voor een moderne, twee-koloms layout die naadloos
 * integreert met het NexApp thema.
 */

/* === Algemene Wrapper & Layout === */
.nexapp-kostenrekentool-wrapper {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
    border: 1px solid #e2e8f0;
}

.nexapp-calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Twee kolommen layout */
    gap: 40px;
    align-items: center;
}

/* === Formulier Sectie (Linkerkolom) === */
.nexapp-calculator-form-section .nexapp-calculator-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 25px;
}

.nexapp-calculator-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Ruimte tussen de input rijen */
}

.nexapp-calculator-input-group {
    display: flex;
    align-items: baseline; /* Lijn de tekst en de select-box mooi uit */
    gap: 8px;
    font-size: 18px;
}

.nexapp-calculator-input-group label {
    color: #4a5568;
    white-space: nowrap;
}

.nexapp-calculator-input-group select {
    /* Reset standaard styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    border: none;
    
    /* Nieuwe styling */
    border-bottom: 2px dotted #a0aec0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    padding: 4px 0;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-grow: 1; /* Zorgt dat de lijn de ruimte vult */
}

.nexapp-calculator-input-group select:focus {
    outline: none;
    border-bottom: 2px solid #3182ce; /* Blauwe accentkleur bij focus */
}

.nexapp-calculator-button {
    background-color: #3182ce; /* Blauwe accentkleur, matcht website */
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.2s, opacity 0.2s;
    width: 100%;
}

.nexapp-calculator-button:hover:not(:disabled) {
    background-color: #2b6cb0;
}

.nexapp-calculator-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === Resultaten Sectie (Rechterkolom) === */
.nexapp-calculator-results {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    transition: opacity 0.4s ease-in-out;
}

.nexapp-calculator-results h4 {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 20px;
}

.nexapp-results-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Ruimte tussen de kostenposten */
}

.nexapp-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    padding-bottom: 15px;
}

.nexapp-result-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nexapp-result-label {
    color: #4a5568;
}

.nexapp-result-value {
    font-weight: 700;
    color: #1a202c;
}

.nexapp-result-totaal {
    border-top: 2px solid #e2e8f0;
    margin-top: 15px;
    padding-top: 15px;
}

.nexapp-result-totaal .nexapp-result-label {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
}

.nexapp-result-totaal .nexapp-result-value {
    font-size: 24px;
    font-weight: 700;
    color: #2b6cb0; /* Accentkleur voor totaal */
}

.nexapp-disclaimer {
    font-size: 12px;
    color: #718096;
    margin-top: 20px;
    text-align: center;
}


/* === Laden & Foutmeldingen === */
.nexapp-calculator-loading {
    text-align: center;
    padding: 40px 20px;
}

.nexapp-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3182ce;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: nexapp-spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes nexapp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nexapp-calculator-error {
    background-color: #fed7d7;
    color: #9b2c2c;
    border: 1px solid #f56565;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    transition: opacity 0.5s;
}

/* === Responsive Design === */
@media (max-width: 900px) {
    .nexapp-calculator-container {
        grid-template-columns: 1fr; /* Stapel de kolommen op mobiel */
        gap: 30px;
    }

    .nexapp-kostenrekentool-wrapper {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .nexapp-calculator-input-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .nexapp-calculator-input-group select {
        width: 100%;
    }
}