/**
 * Rekentool Kinderopvang - Public Styles
 *
 * @package Rekentool_Kinderopvang
 */

/* ============================================
   CSS Variables
   ============================================ */

.rekentool-wrapper {
    --rekentool-primary: #2271b1;
    --rekentool-primary-dark: #135e96;
    --rekentool-secondary: #1d2327;
    --rekentool-success: #00a32a;
    --rekentool-warning: #dba617;
    --rekentool-danger: #d63638;
    --rekentool-light: #f6f7f7;
    --rekentool-border: #c3c4c7;
    --rekentool-text: #1d2327;
    --rekentool-text-muted: #646970;
    --rekentool-radius: 6px;
    --rekentool-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Wrapper
   ============================================ */

.rekentool-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--rekentool-text);
    max-width: 1000px;
    margin: 0 auto;
    /* padding: 20px; */
}

.rekentool-wrapper * {
    box-sizing: border-box;
}

/* ============================================
   Steps / Sections
   ============================================ */

.rekentool-section {
    background: #fff;
    border: 1px solid var(--rekentool-border);
    border-radius: var(--rekentool-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--rekentool-shadow);
}

.rekentool-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rekentool-primary);
    color: var(--rekentool-secondary);
}

.rekentool-section-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--rekentool-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    margin-right: 10px;
}

/* ============================================
   Form Elements
   ============================================ */

.rekentool-form-group {
    margin-bottom: 20px;
}

.rekentool-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--rekentool-text);
}

.rekentool-input,
.rekentool-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    border: 1px solid var(--rekentool-border);
    border-radius: var(--rekentool-radius);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rekentool-input:focus,
.rekentool-select:focus {
    outline: none;
    border-color: var(--rekentool-primary);
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.rekentool-input-group {
    display: flex;
    align-items: stretch;
}

.rekentool-input-prefix,
.rekentool-input-suffix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: var(--rekentool-light);
    border: 1px solid var(--rekentool-border);
    font-weight: 500;
    color: var(--rekentool-text-muted);
}

.rekentool-input-prefix {
    border-right: none;
    border-radius: var(--rekentool-radius) 0 0 var(--rekentool-radius);
}

.rekentool-input-suffix {
    border-left: none;
    border-radius: 0 var(--rekentool-radius) var(--rekentool-radius) 0;
}

.rekentool-input-group .rekentool-input {
    border-radius: 0;
    flex: 1;
}

.rekentool-input-group .rekentool-input:first-child {
    border-radius: var(--rekentool-radius) 0 0 var(--rekentool-radius);
}

.rekentool-input-group .rekentool-input:last-child {
    border-radius: 0 var(--rekentool-radius) var(--rekentool-radius) 0;
}

.rekentool-helper-text {
    font-size: 13px;
    color: var(--rekentool-text-muted);
    margin-top: 4px;
}

/* ============================================
   Slider
   ============================================ */

.rekentool-slider-container {
    padding: 10px 0;
}

.rekentool-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--rekentool-light);
    border-radius: 3px;
    outline: none;
}

.rekentool-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--rekentool-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rekentool-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--rekentool-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.rekentool-slider-value {
    display: inline-block;
    padding: 4px 12px;
    background: var(--rekentool-primary);
    color: #fff;
    border-radius: var(--rekentool-radius);
    font-weight: 600;
    margin-top: 8px;
}

/* ============================================
   Days Selection
   ============================================ */

.rekentool-days {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rekentool-day {
    flex: 1;
    min-width: 60px;
}

.rekentool-day-checkbox {
    display: none;
}

.rekentool-day-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--rekentool-light);
    border: 2px solid var(--rekentool-border);
    border-radius: var(--rekentool-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.rekentool-day-checkbox:checked + .rekentool-day-label {
    background: var(--rekentool-primary);
    border-color: var(--rekentool-primary);
    color: #fff;
}

.rekentool-day-name {
    font-weight: 600;
    font-size: 14px;
}

.rekentool-day-hours {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

/* ============================================
   Children
   ============================================ */

.rekentool-children-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rekentool-child {
    background: var(--rekentool-light);
    border: 1px solid var(--rekentool-border);
    border-radius: var(--rekentool-radius);
    padding: 20px;
}

.rekentool-child-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.rekentool-child-title {
    font-weight: 600;
    font-size: 16px;
}

.rekentool-child-remove {
    background: none;
    border: none;
    color: var(--rekentool-danger);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
}

.rekentool-child-remove:hover {
    text-decoration: underline;
}

.rekentool-add-child {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 2px dashed var(--rekentool-border);
    border-radius: var(--rekentool-radius);
    background: transparent;
    color: var(--rekentool-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.rekentool-add-child:hover {
    border-color: var(--rekentool-primary);
    background: rgba(34, 113, 177, 0.05);
}

/* ============================================
   Care Types
   ============================================ */

.rekentool-care-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.rekentool-care-type {
    position: relative;
}

.rekentool-care-type-radio {
    display: none;
}

.rekentool-care-type-label {
    display: block;
    padding: 16px;
    background: #fff;
    border: 2px solid var(--rekentool-border);
    border-radius: var(--rekentool-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.rekentool-care-type-radio:checked + .rekentool-care-type-label {
    border-color: var(--rekentool-primary);
    background: rgba(34, 113, 177, 0.05);
}

.rekentool-care-type-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.rekentool-care-type-price {
    font-size: 14px;
    color: var(--rekentool-text-muted);
}

/* ============================================
   Results
   ============================================ */

.rekentool-results {
    background: linear-gradient(135deg, var(--rekentool-primary) 0%, var(--rekentool-primary-dark) 100%);
    color: #fff;
    border-radius: var(--rekentool-radius);
    padding: 30px;
}

.rekentool-results-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 24px;
    text-align: center;
}

.rekentool-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.rekentool-result-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--rekentool-radius);
    padding: 20px;
    text-align: center;
}

.rekentool-result-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.rekentool-result-value {
    font-size: 28px;
    font-weight: 700;
}

.rekentool-result-value small {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
}

.rekentool-result-highlight {
    background: rgba(255, 255, 255, 0.2);
}

.rekentool-result-highlight .rekentool-result-value {
    font-size: 36px;
}

/* ============================================
   Buttons
   ============================================ */

.rekentool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: var(--rekentool-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.rekentool-btn-primary {
    background: var(--rekentool-primary);
    color: #fff;
}

.rekentool-btn-primary:hover {
    background: var(--rekentool-primary-dark);
    color: #fff;
}

.rekentool-btn-secondary {
    background: var(--rekentool-light);
    color: var(--rekentool-text);
    border: 1px solid var(--rekentool-border);
}

.rekentool-btn-secondary:hover {
    background: #e5e5e5;
}

.rekentool-btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.rekentool-btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   Actions
   ============================================ */

.rekentool-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

/* ============================================
   Branding
   ============================================ */

.rekentool-branding {
    text-align: center;
    font-size: 12px;
    color: var(--rekentool-text-muted);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--rekentool-border);
}

.rekentool-branding a {
    color: var(--rekentool-primary);
    text-decoration: none;
}

.rekentool-branding a:hover {
    text-decoration: underline;
}

/* ============================================
   Loading
   ============================================ */

.rekentool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.rekentool-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--rekentool-light);
    border-top-color: var(--rekentool-primary);
    border-radius: 50%;
    animation: rekentool-spin 0.8s linear infinite;
}

@keyframes rekentool-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Error
   ============================================ */

.rekentool-error {
    background: #fef2f2;
    border: 1px solid var(--rekentool-danger);
    color: var(--rekentool-danger);
    padding: 16px;
    border-radius: var(--rekentool-radius);
    text-align: center;
}

/* ============================================
   Responsive
   ============================================ */

@media screen and (max-width: 600px) {
    .rekentool-wrapper {
        padding: 10px;
    }
    
    .rekentool-section {
        padding: 16px;
    }
    
    .rekentool-days {
        flex-direction: column;
    }
    
    .rekentool-day {
        min-width: 100%;
    }
    
    .rekentool-day-label {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .rekentool-results-grid {
        grid-template-columns: 1fr;
    }
    
    .rekentool-result-value {
        font-size: 24px;
    }
    
    .rekentool-result-highlight .rekentool-result-value {
        font-size: 30px;
    }
}

/* Income range slider */
.rt-income-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e5e3;
    outline: none;
    cursor: pointer;
}
.rt-income-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--rt-slider-color, #3d3728);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: transform 0.15s ease;
}
.rt-income-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.rt-income-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--rt-slider-color, #3d3728);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.rt-income-slider::-webkit-slider-runnable-track {
    border-radius: 3px;
}
.rt-income-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: #e5e5e3;
}
