/**
 * Tools Stylesheet (Einbürgerungs-Check, Kosten-Rechner, Kantone-Quiz)
 * Kai Schnider 2025
 */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========== TOOL HERO ========== */
.tool-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    padding: 3rem 0 2.5rem;
    text-align: center;
}

.tool-hero h1 {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.tool-hero-sub {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tool-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ========== STEPPER PROGRESS ========== */
.tool-section {
    padding: 2.5rem 0 3rem;
    background: var(--bg-alt);
    min-height: 500px;
}

.stepper-progress {
    position: relative;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.stepper-progress-bar {
    position: absolute;
    top: 16px;
    left: 5%;
    right: 5%;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    z-index: 0;
}

.stepper-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--gov-red);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.stepper-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.stepper-step span {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stepper-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.stepper-step.active .stepper-step-dot {
    background: var(--gov-red);
    border-color: var(--gov-red);
    color: white;
    box-shadow: 0 0 0 4px rgba(216, 35, 42, 0.15);
}

.stepper-step.done .stepper-step-dot {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.stepper-step.active span,
.stepper-step.done span {
    color: var(--text);
}

/* ========== STEPPER CARD ========== */
.stepper-card {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    animation: fadeInUp 0.35s ease;
}

.stepper-card.hidden {
    display: none;
}

.stepper-card-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-alt);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--navy);
}

.stepper-card h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.stepper-hint {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ========== SELECT ========== */
.stepper-select-wrap {
    margin-bottom: 1.5rem;
}

.stepper-select {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    transition: border-color 0.2s;
}

.stepper-select:focus {
    outline: none;
    border-color: var(--gov-red);
    box-shadow: 0 0 0 3px rgba(216, 35, 42, 0.1);
}

/* ========== RANGE SLIDER ========== */
.stepper-field-group {
    margin-bottom: 1.5rem;
}

.stepper-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.stepper-range-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stepper-range {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.stepper-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gov-red);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(216, 35, 42, 0.3);
}

.stepper-range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gov-red);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(216, 35, 42, 0.3);
}

.stepper-range-value {
    min-width: 70px;
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    color: var(--navy);
}

.stepper-range-value-big {
    font-size: 1.5rem;
    min-width: 100px;
}

/* ========== OPTION CARDS ========== */
.stepper-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stepper-option {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.stepper-option:hover {
    border-color: var(--navy-light);
    background: var(--bg-alt);
}

.stepper-option.selected {
    border-color: var(--gov-red);
    background: rgba(216, 35, 42, 0.04);
}

.stepper-option-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: block;
}

.stepper-option-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    display: block;
}

/* ========== INFO BOX ========== */
.stepper-info-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: var(--bg-alt);
    border-left: 4px solid var(--navy);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.stepper-info-box.stepper-info-warning {
    border-left-color: var(--warning);
    background: #FFFBEB;
}

.stepper-info-box.stepper-info-success {
    border-left-color: var(--success);
    background: var(--success-light);
}

.stepper-info-box.stepper-info-error {
    border-left-color: var(--error);
    background: var(--error-light);
}

/* ========== BUTTONS ========== */
.stepper-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.stepper-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========== RESULT ========== */
.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.result-icon-success {
    background: var(--success-light);
    color: var(--success);
}

.result-icon-warning {
    background: #FFFBEB;
    color: var(--warning);
}

.result-icon-error {
    background: var(--error-light);
    color: var(--error);
}

.result-title {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.result-subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

.result-details {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--bg-alt);
}

.result-detail-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.result-detail-icon.ok {
    background: var(--success-light);
    color: var(--success);
}

.result-detail-icon.warn {
    background: #FFFBEB;
    color: var(--warning);
}

.result-detail-icon.fail {
    background: var(--error-light);
    color: var(--error);
}

.result-detail-text strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.result-detail-text span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.result-cta {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 8px;
    margin-top: 1.5rem;
}

.result-cta h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.result-cta p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ========== SEO SECTION ========== */
.tool-seo-section {
    padding: 3rem 0;
    background: white;
}

.tool-seo-section h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--navy);
}

.tool-seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.tool-seo-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-alt);
}

.tool-seo-card h3 {
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.tool-seo-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.tool-cta-box {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: 12px;
    color: white;
}

.tool-cta-box h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tool-cta-box p {
    opacity: 0.9;
    margin-bottom: 1.25rem;
}

.tool-cta-box .btn-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tool-cta-box .btn-outline {
    border-color: rgba(255,255,255,0.4);
    color: white;
}

.tool-cta-box .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* ========== KOSTEN-RECHNER ========== */
.kosten-breakdown {
    margin: 1.5rem 0;
}

.kosten-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
}

.kosten-bar-label {
    min-width: 120px;
    font-weight: 600;
    font-size: 0.9rem;
}

.kosten-bar-track {
    flex: 1;
    height: 28px;
    background: var(--bg-alt);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.kosten-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.kosten-bar-fill.bund { background: var(--navy); }
.kosten-bar-fill.kanton { background: var(--gov-red); }
.kosten-bar-fill.gemeinde { background: var(--navy-light); }

.kosten-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--navy);
    color: white;
    border-radius: 8px;
    margin-top: 1rem;
}

.kosten-total-label {
    font-weight: 600;
}

.kosten-total-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.kosten-vergleich {
    margin-top: 2rem;
}

.kosten-vergleich h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--navy);
}

.kosten-vergleich-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.kosten-vergleich-name {
    min-width: 140px;
    font-weight: 500;
}

.kosten-vergleich-bar {
    flex: 1;
    height: 16px;
    background: var(--bg-alt);
    border-radius: 4px;
    overflow: hidden;
}

.kosten-vergleich-fill {
    height: 100%;
    background: var(--border);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.kosten-vergleich-fill.active {
    background: var(--gov-red);
}

.kosten-vergleich-value {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .tool-hero {
        padding: 2rem 0 1.5rem;
    }

    .tool-hero h1 {
        font-size: 1.5rem;
    }

    .tool-hero-sub {
        font-size: 0.95rem;
    }

    .stepper-card {
        padding: 1.5rem;
    }

    .stepper-step span {
        display: none;
    }

    .stepper-options {
        grid-template-columns: 1fr;
    }

    .tool-seo-grid {
        grid-template-columns: 1fr;
    }

    .stepper-buttons {
        gap: 0.75rem;
    }

    .stepper-range-value-big {
        font-size: 1.25rem;
    }

    .result-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .stepper-card {
        padding: 1.25rem;
    }

    .tool-hero h1 {
        font-size: 1.3rem;
    }

    .stepper-card h2 {
        font-size: 1.15rem;
    }
}
