/**
 * SnelPen Keuzehulp Styling
 * 
 * Calm, professional, responsive e-commerce design.
 * Aligns strictly with SnelPen branding (#08abc6, slate typography, clean cards).
 */

.sw-keuzehulp-wrapper {
    max-width: 960px;
    margin: 30px auto 60px;
    padding: 0 16px;
    font-family: inherit;
    color: #0f172a;
    box-sizing: border-box;
}

.sw-keuzehulp-wrapper *,
.sw-keuzehulp-wrapper *::before,
.sw-keuzehulp-wrapper *::after {
    box-sizing: border-box;
}

/* Card Container */
.sw-keuzehulp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    padding: 36px 32px;
    min-height: 480px;
    position: relative;
    transition: all 0.25s ease;
}

@media (max-width: 640px) {
    .sw-keuzehulp-card {
        padding: 24px 18px;
        border-radius: 10px;
    }
}

/* Loading state */
.sw-keuzehulp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    color: #64748b;
    gap: 16px;
}

.sw-keuzehulp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top-color: #08abc6;
    border-radius: 50%;
    animation: sw-kh-spin 0.8s linear infinite;
}

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

/* Progress Header */
.sw-kh-header {
    margin-bottom: 28px;
}

.sw-kh-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sw-kh-step-counter {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #08abc6;
}

.sw-kh-step-indicator {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
}

.sw-kh-progress-track {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}

.sw-kh-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #08abc6 0%, #00bcd4 100%);
    border-radius: 9999px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Titles */
.sw-kh-title-area {
    margin-top: 24px;
    margin-bottom: 28px;
}

.sw-kh-title {
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin: 0 0 8px 0;
    letter-spacing: -0.015em;
}

.sw-kh-subtitle {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

/* Option Cards Grid */
.sw-kh-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .sw-kh-options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.sw-kh-option-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    user-select: none;
    text-align: left;
}

.sw-kh-option-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
}

.sw-kh-option-card.selected {
    border-color: #08abc6;
    background: #f0fdf4;
    background: rgba(8, 171, 198, 0.04);
    box-shadow: 0 0 0 1px #08abc6;
}

.sw-kh-option-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    margin-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sw-kh-option-card.selected .sw-kh-option-radio {
    border-color: #08abc6;
    background: #08abc6;
}

.sw-kh-option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.sw-kh-option-card.selected .sw-kh-option-radio::after {
    opacity: 1;
    transform: scale(1);
}

.sw-kh-option-content {
    flex: 1;
}

.sw-kh-option-label {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 4px;
}

.sw-kh-option-card.selected .sw-kh-option-label {
    color: #0f172a;
}

.sw-kh-option-desc {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

/* Footer Navigation Bar */
.sw-kh-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.sw-kh-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-kh-btn-back:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

.sw-kh-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: #08abc6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(8, 171, 198, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-kh-btn-next:hover:not(:disabled) {
    background: #0796ad;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(8, 171, 198, 0.35);
}

.sw-kh-btn-next:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.sw-kh-footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sw-kh-step-hint {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-style: italic;
}

.sw-kh-btn-next-secondary {
    padding: 8px 18px;
    font-size: 0.875rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    box-shadow: none;
}

.sw-kh-btn-next-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   RESULTS SCREEN
   ========================================================================== */

.sw-kh-results-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
}

.sw-kh-results-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(8, 171, 198, 0.1);
    color: #08abc6;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 9999px;
    margin-bottom: 12px;
}

.sw-kh-results-title {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.sw-kh-results-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.sw-kh-notice-banner {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.875rem;
    color: #b45309;
    margin: 0 auto 24px;
    text-align: left;
}

/* 3 Products Grid */
.sw-kh-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 860px) {
    .sw-kh-products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.sw-kh-product-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-kh-product-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.08);
}

/* Rank 1: Beste Match Highlight */
.sw-kh-product-card.rank-1 {
    border-color: #08abc6;
    box-shadow: 0 8px 24px -2px rgba(8, 171, 198, 0.15);
}

.sw-kh-rank-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sw-kh-product-card.rank-1 .sw-kh-rank-tag {
    background: #08abc6;
    color: #ffffff;
}

.sw-kh-product-card.rank-2 .sw-kh-rank-tag,
.sw-kh-product-card.rank-3 .sw-kh-rank-tag {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* Feature Badge Top-Right */
.sw-kh-feature-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.71875rem;
    font-weight: 600;
    color: #334155;
}

/* Product Image Area */
.sw-kh-img-wrapper {
    width: 100%;
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    border-bottom: 1px solid #f1f5f9;
}

.sw-kh-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sw-kh-product-card:hover .sw-kh-img-wrapper img {
    transform: scale(1.04);
}

/* Product Content */
.sw-kh-product-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sw-kh-product-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

/* Rationale Quote */
.sw-kh-product-rationale {
    background: #f8fafc;
    border-left: 3px solid #08abc6;
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 16px;
    flex: 1;
}

/* Price Box */
.sw-kh-price-box {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 16px;
}

.sw-kh-price-amount {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.sw-kh-price-amount small {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
}

.sw-kh-price-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

/* CTA Button */
.sw-kh-btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-kh-product-card.rank-1 .sw-kh-btn-cta {
    background: #08abc6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(8, 171, 198, 0.28);
}

.sw-kh-product-card.rank-1 .sw-kh-btn-cta:hover {
    background: #0796ad;
    box-shadow: 0 4px 14px rgba(8, 171, 198, 0.4);
    transform: translateY(-1px);
}

.sw-kh-product-card.rank-2 .sw-kh-btn-cta,
.sw-kh-product-card.rank-3 .sw-kh-btn-cta {
    background: #f8fafc;
    color: #0f172a;
    border: 1.5px solid #cbd5e1;
}

.sw-kh-product-card.rank-2 .sw-kh-btn-cta:hover,
.sw-kh-product-card.rank-3 .sw-kh-btn-cta:hover {
    background: #ffffff;
    border-color: #08abc6;
    color: #08abc6;
}

/* Restart Bar */
.sw-kh-results-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.sw-kh-btn-restart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-kh-btn-restart:hover {
    border-color: #08abc6;
    color: #08abc6;
    background: #f8fafc;
}
