﻿:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #667085;
    --line: #e6eaf0;
    --primary: #1f6feb;
    --primary-soft: #eef4ff;
    --primary-soft-2: #dbe7ff;
    --shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
    --shadow-soft: 0 2px 8px rgba(16, 24, 40, 0.06);
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: radial-gradient(circle at top left, #ffffff 0%, #f5f7fb 45%), var(--bg);
    color: var(--text);
}

.survey-section {
    max-width: 980px;
    margin: 0 auto 40px;
}

/* Survey header */
.survey-header {
    margin-bottom: 18px;
}

.survey-header__title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.15;
}

.survey-header__subtitle {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.5;
    max-width: 64ch;
}

/* Page header */
.survey-page-header {
    background: linear-gradient(180deg, #f3f7ff 0%, #eef4ff 100%);
    border: 1px solid var(--primary-soft-2);
    border-left: 6px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.survey-page-header__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.survey-page-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: #ffffff;
    border: 1px solid var(--primary-soft-2);
    border-radius: 999px;
    padding: 8px 12px;
}

.survey-page-header__step {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.survey-page-header__title {
    margin: 0 0 8px;
    font-size: 1.45rem;
    color: #16325c;
    line-height: 1.25;
}

.survey-page-header__desc {
    margin: 0 0 18px;
    font-size: 0.97rem;
    color: #47607f;
    line-height: 1.55;
    /*max-width: 70ch;*/
}

/* Progress */
.survey-progress {
    display: grid;
    gap: 10px;
}

.survey-progress__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: #35527a;
    font-weight: 600;
}

.survey-progress__track {
    position: relative;
    height: 14px;
    background: rgba(31, 111, 235, 0.10);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.survey-progress__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--progress, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, #1f6feb 0%, #4f8df5 55%, #79a9ff 100%);
    box-shadow: 0 4px 14px rgba(31, 111, 235, 0.35);
    transition: width 0.35s ease;
}

.survey-progress__steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}

.survey-progress__step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #6d7f97;
    font-size: 0.86rem;
    font-weight: 600;
}

.survey-progress__dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #d8e3f8;
    border: 2px solid #d8e3f8;
    flex: 0 0 auto;
}

.survey-progress__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.survey-progress__step.is-complete,
.survey-progress__step.is-current {
    color: #20456f;
}

    .survey-progress__step.is-complete .survey-progress__dot {
        background: var(--primary);
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.12);
    }

    .survey-progress__step.is-current .survey-progress__dot {
        background: #ffffff;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.14);
    }

/* Questions */
.question-block {
   margin-bottom: 20px;
}

.question-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.question-help {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

/* Cards */
.matrix-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
}

.matrix-item-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
}

.matrix-item-subtitle {
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 14px;
    line-height: 1.5;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

/* Rating matrix */
/* Rating matrix */
.rating-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rating-group input[type="radio"] {
    display: none;
}

.rating-group label,
.rating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    min-width: 46px;
    border: 1px solid #cfd6e2;
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    padding: 10px 12px;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    flex: 1 1 46px;
}

.rating-group .rating-button:first-of-type,
.rating-group label:first-of-type {
    flex-basis: auto;
}

.rating-group.text-first-option .rating-button:first-of-type,
.rating-group.text-first-option label:first-of-type {
    flex-basis: 100%;
}

.rating-group label:hover,
.rating-button:hover {
    border-color: #8fa4c8;
    transform: translateY(-1px);
}

.rating-group input[type="radio"]:checked + label,
.rating-button.is-selected {
    background: linear-gradient(180deg, #2f7afb 0%, #1f6feb 100%);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(31, 111, 235, 0.24);
}

/* Checkbox matrix */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #d6dce6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}

    .checkbox-option:hover {
        border-color: #8fa4c8;
        transform: translateY(-1px);
    }

    .checkbox-option input[type="checkbox"] {
        width: 18px;
        height: 18px;
        margin: 0;
        flex: 0 0 auto;
        accent-color: var(--primary);
    }

    .checkbox-option.checked {
        background: var(--primary-soft);
        border-color: var(--primary);
        box-shadow: 0 8px 18px rgba(31, 111, 235, 0.10);
    }

/* Minimal additions for Choice questions */
.choice-note {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    /*background: var(--primary-soft);*/
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.choice-note:empty {
    display: none;
}

.choice-other {
    margin-top: 12px;
}

    .choice-other input[type="text"] {
        width: 100%;
        min-height: 44px;
        padding: 12px 14px;
        border: 1px solid #d6d6d6;
        border-radius: 12px;
        font-size: 1rem;
        box-sizing: border-box;
    }

        .choice-other input[type="text"]:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(31,111,235,0.12);
        }

/* Desktop tables */
.desktop-table {
    display: none;
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
    border: 1px solid var(--line);
}
.desktop-table td.text-center {
    vertical-align: middle;
}
.desktop-table input[type="checkbox"],
.desktop-table input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
    vertical-align: middle;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th, td {
    padding: 12px 8px;
    text-align: center;
    border-bottom: 1px solid #eef1f5;
    vertical-align: top;
}

th {
    color: #385274;
    font-size: 0.92rem;
    background: #fbfcfe;
}

    th:first-child,
    td:first-child {
        text-align: left;
        width: 34%;
    }

.desktop-desc {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 0.85rem;
    font-weight: normal;
    line-height: 1.4;
}

/* Responsive */
@media (min-width: 900px) {
    .mobile-cards {
        display: none;
    }

    .desktop-table {
        display: block;
    }

    .checkbox-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding: 14px;
    }

    .survey-header__title {
        font-size: 1.45rem;
    }

    .survey-header__subtitle {
        font-size: 0.92rem;
    }

    .survey-page-header {
        padding: 16px;
    }

    .survey-page-header__title {
        font-size: 1.2rem;
    }

    .survey-page-header__desc {
        font-size: 0.92rem;
    }

    .question-title {
        font-size: 1.12rem;
    }

    .survey-progress__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .survey-progress__meta {
        font-size: 0.88rem;
    }

    .survey-page-header__top {
        align-items: flex-start;
    }
}
/* Navigation container */
.survey-navigation {
   /* margin-top: 40px;*/
    display: flex;
    justify-content: flex-end;
}

/* Button */
.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    background: linear-gradient(180deg, #2f7afb 0%, #1f6feb 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(31, 111, 235, 0.35);
    transition: all 0.2s ease;
}

    /* Hover */
    .btn-next:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 30px rgba(31, 111, 235, 0.45);
    }

/* Arrow */
.btn-next__arrow {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.btn-next:hover .btn-next__arrow {
    transform: translateX(4px);
}

/* Disabled state */
.btn-next:disabled {
    background: #c7d2e5;
    box-shadow: none;
    cursor: not-allowed;
}

.choice-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.choice-list label {
    display: block;
    position: relative;
    min-height: 46px;
    padding: 12px 14px 12px 44px;
    border: 1px solid #d6dce6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    margin: 0;
}

.choice-list label:hover {
    border-color: #8fa4c8;
    transform: translateY(-1px);
}

.choice-list input[type="checkbox"],
.choice-list input[type="radio"] {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block !important;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
}

.choice-list .custom {
    display: none !important;
}

.choice-list label.checked {
    background: #eef4ff;
    border-color: #1f6feb;
    box-shadow: 0 8px 18px rgba(31, 111, 235, 0.10);
}

.choice-list label a {
    color: var(--primary);
    text-decoration: underline;
}

.choice-other {
    margin-top: -9px;
    padding: 12px 14px 14px 44px;
    border: 1px solid #d6dce6;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: #fff;
    display: none;
}

.choice-other input[type="text"],
.ChoiceOtherTbx {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid #d6d6d6;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

.choice-other input[type="text"]:focus,
.ChoiceOtherTbx:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31,111,235,0.12);
}

.choice-list label.choice-option-other-selected {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.question-block.has-error {
    background: rgba(220, 38, 38, 0.08);
    border: 2px solid #dc2626;
    border-radius: 16px;
    padding: 16px;
}

.question-block.has-error .question-title {
    color: #b91c1c;
}

.choice-dropdown {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border: 1px solid #d8dbe0;
    border-radius: 10px;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;

    /* remove default styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    transition: all 0.2s ease;
}

.choice-dropdown:focus {
    outline: none;
    border-color: #4f8cff; /* same as your selected color */
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.15);
}

.choice-dropdown {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23999' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.open-card {
    padding: 18px;
}

.open-input-wrap {
    display: block;
    width: 100%;
}

.open-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d6dce6;
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

textarea.open-input {
    min-height: 140px;
    resize: vertical;
    font-family: inherit;
}

.open-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

.open-multi-list {
    display: grid;
    gap: 14px;
}

.open-multi-item {
    display: grid;
    gap: 8px;
}

.open-multi-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.open-multi-title {
    display: inline-block;
}

.validator-message {
    display: inline-block;
    margin-top: 6px;
    color: #dc2626;
    font-weight: 700;
    font-size: 0.9rem;
}

.survey-page-hero {
    margin: 0 auto 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    background: #fff;
}

.survey-page-hero__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .survey-page-hero {
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .survey-page-hero__image {
        max-height: 160px;
    }
}


@media (max-width: 768px) {
    .open-card {
        padding: 16px;
    }

    .open-input {
        font-size: 1rem;
    }

    textarea.open-input {
        min-height: 120px;
    }
}

/* MOBILE: sticky bottom CTA */
@media (max-width: 768px) {
    .survey-navigation {
       /* position: sticky;
	    backdrop-filter: blur(6px);*/
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px;
      
       
 
        z-index: 10;
    }

    .btn-next {
        width: 100%;
        justify-content: center;
        padding: 16px;
        font-size: 1.1rem;
        border-radius: 16px;
    }

    
            .choice-list .custom.checkbox {
                border-radius: 6px;
            }

            .choice-list .custom.radio {
                border-radius: 999px;
            }



            .choice-list label.checked .custom.checkbox {
                background: #1f6feb;
                border-color: #1f6feb;
            }

                .choice-list label.checked .custom.checkbox::after {
                    content: "";
                    position: absolute;
                    left: 4px;
                    top: 0px;
                    width: 5px;
                    height: 10px;
                    border: solid #fff;
                    border-width: 0 2px 2px 0;
                    transform: rotate(45deg);
                }

            .choice-list label.checked .custom.radio {
                border-color: #1f6feb;
            }

                .choice-list label.checked .custom.radio::after {
                    content: "";
                    position: absolute;
                    left: 3px;
                    top: 3px;
                    width: 8px;
                    height: 8px;
                    border-radius: 999px;
                    background: #1f6feb;
                }
}

@media print {

    @page {
        size: A4;
        margin: 14mm 12mm 14mm 12mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
    }

    body {
        padding: 0 !important;
        margin: 0 !important;
    }

    .survey-page-hero {
        box-shadow: none !important;
        border: none !important;
        margin-bottom: 10mm !important;
    }

    .survey-page-hero__image {
        max-height: none !important;
    }

    .survey-section {
        max-width: none !important;
        margin: 0 !important;
    }

    .survey-header,
    .survey-navigation,
    #divProcess,
    .btn-next,
    #hfCond,
    .choice-other,
    .validator-message {
        display: none !important;
    }

    .survey-page-header {
        box-shadow: none !important;
        background: #fff !important;
        border: 1px solid #ccc !important;
        border-left: 4px solid #666 !important;
        margin-bottom: 8mm !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .survey-page-preview {
        break-before: page;
        page-break-before: always;
    }

    .survey-page-preview:first-child {
        break-before: auto;
        page-break-before: auto;
    }

    .question-block {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 8mm !important;
    }

    .matrix-card,
    .desktop-table,
    .open-card,
    .choice-question,
    .open-question {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

    table,
    tr,
    td,
    th {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .desktop-table {
        display: block !important;
        overflow: visible !important;
        border: 1px solid #ddd !important;
    }

    .mobile-cards {
        display: none !important;
    }

    .choice-list label,
    .checkbox-option,
    .open-multi-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    input,
    textarea,
    select {
        color: #000 !important;
        border: 1px solid #bbb !important;
        background: #fff !important;
    }

    a {
        color: #000 !important;
        text-decoration: none !important;
    }
}