/**
 * DingenBerekenen Calculator Styles
 * Basis styling voor alle calculators
 */

/* Container */
.db-calculator {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.db-calculator h2 {
    text-align: center;
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

/* Mode selector */
.db-calc-mode {
    display: flex;
    gap: 0;
    margin-bottom: 25px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
}

.db-calc-mode button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
}

.db-calc-mode button:hover {
    color: #333;
}

.db-calc-mode button.active {
    background: #ffffff;
    color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Input groups */
.db-input-group {
    margin-bottom: 20px;
}

.db-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.db-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.db-input-prefix {
    position: absolute;
    left: 15px;
    color: #95a5a6;
    font-weight: 500;
    font-size: 16px;
    z-index: 1;
}

.db-input-wrapper input {
    padding-left: 35px !important;
}

.db-input-group input,
.db-input-group select {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.db-input-group input:focus,
.db-input-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.db-input-group input[type="number"] {
    -moz-appearance: textfield;
}

.db-input-group input[type="number"]::-webkit-outer-spin-button,
.db-input-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Input grid */
.db-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

/* Buttons */
.db-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.db-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.db-button:active {
    transform: translateY(0);
}

.db-button-secondary {
    display: inline-block;
    padding: 12px 20px;
    background: #95a5a6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.db-button-secondary:hover {
    background: #7f8c8d;
}

/* Results */
.db-results {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.db-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.db-result-row:last-child {
    border-bottom: none;
}

.db-result-label {
    color: #666;
    font-size: 14px;
}

.db-result-value {
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.db-result-value.highlight {
    color: #27ae60;
    font-size: 18px;
}

.db-result-value.euro {
    color: #2c3e50;
}

/* Info box */
.db-info-box {
    margin-top: 20px;
    padding: 15px 20px;
    background: #e8f4fd;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    font-size: 14px;
    color: #2c3e50;
}

.db-info-box.warning {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.db-info-box.error {
    background: #f8d7da;
    border-left-color: #dc3545;
}

.db-info-box.success {
    background: #d4edda;
    border-left-color: #28a745;
}

/* Responsive */
@media (max-width: 480px) {
    .db-calculator {
        padding: 20px 15px;
        margin: 0 10px;
    }
    
    .db-calculator h2 {
        font-size: 22px;
    }
    
    .db-input-grid {
        grid-template-columns: 1fr;
    }
    
    .db-result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .db-calc-mode button {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* Loading spinner */
.db-loading {
    text-align: center;
    padding: 30px;
}

.db-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: db-spin 1s linear infinite;
}

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

/* Tables */
.db-calculator table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.db-calculator table th,
.db-calculator table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.db-calculator table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.db-calculator table tbody tr:hover {
    background: #f8f9fa;
}

/* Charts container */
.db-chart-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

/* Preset buttons */
.db-preset-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.db-preset-buttons button {
    padding: 8px 16px;
    font-size: 13px;
    background: #e9ecef;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.db-preset-buttons button:hover {
    background: #dee2e6;
}
