:root {
    --wk-primary: #2d5a4c;
    /* Dark green from the button */
    --wk-primary-light: #3d6b5c;
    --wk-accent: #d4a373;
    --wk-text-dark: #333333;
    --wk-text-light: #ffffff;
    --wk-sidebar-bg: #1A2645;
    --wk-sidebar-width: 376px;
    --wk-radius: 8px;
    --wk-btn-radius: 4px;
    --wk-transition: all 0.3s ease;
}

.wk-quiz-container-v2 {
    display: flex;
    max-width: 1250px;
    /* Slightly wider to accommodate larger sidebar */
    min-height: 700px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Montserrat', 'Inter', sans-serif;
}

/* Sidebar */
.wk-sidebar {
    width: var(--wk-sidebar-width);
    flex: 0 0 var(--wk-sidebar-width);
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.wk-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, #1A2645 0%, #334678 100%);
    opacity: 0.9;
    /* Slightly increased for better readability of the gradient */
    z-index: 1;
}

.wk-sidebar-content {
    position: relative;
    z-index: 2;
    padding: 60px 30px;
    height: 100%;
}

.wk-sidebar-steps {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.wk-sidebar-step {
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0.5;
    transition: var(--wk-transition);
}

.wk-sidebar-step.active {
    opacity: 1;
}

.wk-step-number {
    width: 44px;
    height: 44px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.wk-sidebar-step.active .wk-step-number {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--wk-accent);
    color: var(--wk-accent);
}

.wk-step-label {
    display: flex;
    flex-direction: column;
}

.wk-step-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.wk-step-name {
    font-size: 1rem;
    font-weight: 600;
}

/* Main Content */
.wk-main-content {
    flex-grow: 1;
    padding: 20px 50px;
    /* Reduced top padding further */
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fcfcfc;
}

.wk-step {
    display: none;
    height: 100%;
    flex-direction: column;
}

.wk-step.active {
    display: flex;
    animation: wkFadeIn 0.5s ease;
}

@keyframes wkFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step 1: Welcome */
.wk-content-centered {
    margin-top: auto;
    margin-bottom: auto;
}

.wk-title-large {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: #1a1a1a;
    line-height: 1.2;
}

.wk-desc-large {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    max-width: 90%;
    margin-bottom: 40px;
}

/* Buttons */
.wk-footer-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    padding-top: 40px;
}

.wk-footer-actions.j-between {
    justify-content: space-between;
}

.wk-btn-next,
.wk-btn-back {
    background: linear-gradient(135deg, var(--wk-primary), var(--wk-primary-2, var(--wk-primary)));
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: var(--wk-btn-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--wk-transition);
    text-decoration: none;
}

.wk-btn-next:hover,
.wk-btn-back:hover {
    background: var(--wk-primary-light);
    transform: translateY(-2px);
    color: #fff;
}

/* Questions */
.wk-step-title-v2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0;
    /* Removed default h1 margin */
    margin-bottom: 25px;
    color: #1a1a1a;
    text-align: left;
    line-height: 1.3;
}

.wk-options-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2-column grid */
    gap: 12px;
    margin-bottom: 30px;
    flex-grow: 1;
    /* Allow to take space */
}

.wk-option-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 12px 18px;
    /* Reduced padding */
    border-radius: 6px;
    cursor: pointer;
    transition: var(--wk-transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    /* Reduced font size */
    font-weight: 500;
    color: #333;
}

.wk-option-card::before {
    content: '';
    width: 18px;
    /* Slightly smaller */
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--wk-transition);
}

.wk-option-card:hover {
    border-color: var(--wk-primary);
    background: #f8f9f9;
}

.wk-option-card.active {
    background: var(--wk-primary) !important;
    border-color: var(--wk-primary) !important;
    color: #fff !important;
}

.wk-option-card.active::before {
    background: #fff;
    border-color: #fff;
    box-shadow: inset 0 0 0 4px var(--wk-primary);
}

/* Footer Actions Redesign */
.wk-footer-actions-v2 {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
}

/* .wk-btn-back styles are handled by the unified button class */
.wk-footer-actions-v2 .wk-btn-next {
    background: linear-gradient(135deg, var(--wk-primary), var(--wk-primary-2, var(--wk-primary)));
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Specific position from Design */
.wk-main-content {
    display: flex;
    flex-direction: column;
}

.wk-step {
    flex-grow: 1;
    display: none;
    flex-direction: column;
}

.wk-step.active {
    display: flex;
}

/* Summary Screen Step 6 */
.wk-step-subtitle-v2 {
    font-size: 0.95rem;
    color: #999;
    margin-bottom: 20px;
    margin-top: -15px;
}

.wk-recommendations-slider {
    margin-bottom: 30px;
    position: relative;
}

/* Subtle fade on the right side to indicate more content */
.wk-recommendations-slider::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    background: linear-gradient(to left, rgba(252, 252, 252, 0.9) 0%, rgba(252, 252, 252, 0) 100%);
    pointer-events: none;
    z-index: 5;
}

.splide__track {
    cursor: grab;
}

.splide__track:active {
    cursor: grabbing;
}

.wk-recommendations-grid {
    display: none;
    /* Replaced by slider */
}

.wk-treatment-card-v2 {
    background: transparent;
    text-align: center;
    transition: var(--wk-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wk-treatment-img-v2 {
    width: 100%;
    aspect-ratio: 1.6 / 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    background: #f0f0f0;
}

.wk-treatment-img-v2 img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wk-placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #f9f9f9;
}

.wk-treatment-title-v2 {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
    min-height: 2.5em;
    /* Ensure consistent spacing for titles */
    display: flex;
    align-items: center;
    justify-content: center;
}

.wk-btn-more {
    display: block;
    background: linear-gradient(135deg, var(--wk-primary), var(--wk-primary-2, var(--wk-primary)));
    color: #fff;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--wk-transition);
    margin-top: auto;
    /* Push to bottom of card */
}

.wk-btn-more:hover {
    background: var(--wk-primary-light);
    transform: translateY(-2px);
}

.wk-btn-more:hover a {
    color: #fff;
}

.wk-disclaimer {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 25px;
}



.wk-main-content {
    overflow-y: auto;
    /* Allow scrolling on summary if content is long */

    /* Or use height of container */
}

.wk-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.wk-treatment-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid #f0f0f0;
    transition: var(--wk-transition);
}

.wk-treatment-img-container {
    height: 200px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wk-treatment-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wk-treatment-info {
    padding: 25px;
}

.wk-treatment-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.wk-treatment-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Loading View */
.wk-loading-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.wk-loader-ring {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--wk-primary);
    border-radius: 50%;
    animation: wkSpin 1s linear infinite;
    margin-bottom: 30px;
}

@keyframes wkSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .wk-quiz-container-v2 {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .wk-sidebar {
        width: 100%;
        min-height: auto;
    }

    .wk-sidebar-content {
        padding: 40px 20px;
    }

    .wk-sidebar-steps {
        flex-direction: column;
        gap: 15px;
    }

    .wk-sidebar-step {
        gap: 15px;
    }

    .wk-step-number {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .wk-step-name {
        font-size: 0.9rem;
    }

    .wk-main-content {
        padding: 30px 20px 100px;
        /* Extra bottom padding for buttons */
        position: relative;
    }

    .wk-title-large {
        font-size: 2rem;
    }

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

    .wk-footer-actions-v2 {
        position: relative;
        bottom: auto;
        right: auto;
        padding-top: 30px;
        justify-content: center;
        width: 100%;
    }

    .wk-btn-next,
    .wk-btn-back {
        flex: 1;
        justify-content: center;
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    /* Summary image reduction */
    .wk-treatment-card-v2 {
        max-width: 280px;
        margin: 0 auto;
    }

    .wk-treatment-img-v2 {
        aspect-ratio: 1.8 / 1;
    }

    /* Slider pagination visibility */
    .wk-recommendations-slider {
        margin-bottom: 20px;
        /* Space for dots */
    }
}

/* --- User Provided Contact Form 7 Styles --- */

/* Kontener główny */
.wk-form-box-v2 {
    width: 100%;
    margin-bottom: 40px;
}

.custom-cf7-form {
    width: 100%;
}

/* Układ górny: dwa pola obok siebie */
.form-row {
    display: flex;
    gap: 30px;
    /* Odstęp między imieniem a telefonem */
    margin-bottom: 20px;
}

/* Każdy element formularza (label + input) */
.form-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Sprawia, że imię i telefon mają tę samą szerokość */
}

/* Naprawa ucinania etykiet */
.custom-cf7-form label {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    font-weight: 500;
    white-space: nowrap;
    /* Zapobiega ucinaniu tekstu labela */
}

/* Pole wiadomości na całą szerokość */
.form-item.full-width {
    width: 100%;
    margin-bottom: 25px;
}

/* Stylizacja pól tekstowych */
.custom-cf7-form input[type="text"],
.custom-cf7-form input[type="tel"],
.custom-cf7-form textarea {
    width: 100% !important;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Wysokość pola wiadomości */
.custom-cf7-form textarea {
    min-height: 150px;
}

/* Przycisk wyrównany do prawej */
.form-submit-container {
    text-align: right;
    width: 100%;
    padding-right: 0 !important;
}

/* Styl przycisku zgodny z Twoim designem */
.custom-cf7-form input[type="submit"] {
    background-color: var(--wk-form-btn, #2c5144);
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-right: 0 !important;
}

.custom-cf7-form input[type="submit"]:hover {
    background-color: #666 !important;
}

.custom-cf7-form br {
    display: none !important;
}

.custom-cf7-form p {
    margin: 0 !important;
    padding: 0 !important;
}

.wpcf7-form {
    margin: 0 !important;
    padding: 0 !important;
}

.wpcf7-spinner {
    display: none !important;
}

/* Poprawka dla urządzeń mobilnych */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .form-submit-container {
        text-align: center;
    }

    .custom-cf7-form input[type="submit"] {
        width: 100%;
    }
}

/* Reset Button */
.wk-reset-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #eee;
    padding-top: 30px;
    width: 100%;
    padding-right: 0 !important;
}

.wk-btn-reset {
    background: transparent;
    color: #888;
    border: 1px solid #ccc;
    padding: 10px 25px;
    border-radius: var(--wk-btn-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--wk-transition);
    margin-right: 0 !important;
}

.wk-btn-reset:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #999;
}

.wk-icon-reset {
    font-size: 1.1rem;
}

/* Mobile adjustments for reset */
@media (max-width: 991px) {
    .wk-reset-wrapper {
        margin-top: 30px;
        padding-top: 20px;
        justify-content: center;
        /* Center on mobile */
    }

    .wk-btn-reset {
        width: 100%;
        justify-content: center;
    }
}
/* ─── FIX v1.1: Inline error messages ─────────────────────────────────────── */
.wk-inline-error {
    display: none;
    color: #c0392b;
    font-size: 0.9rem;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 8px 12px;
    background: #fdecea;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* FIX v1.1: Keyboard focus styles dla kart opcji (accessibility) */
.wk-option-card:focus {
    outline: 2px solid var(--wk-accent);
    outline-offset: 2px;
}

.wk-option-card:focus:not(:focus-visible) {
    outline: none;
}
