* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Brand colour ── */
:root {
    --brand: #0693e3;
    --brand-dark: #057abf;
}

html {
    font-size: 16px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #fff;
    color: #333;
}

.wFormContainer {
    max-width: 780px;
    margin: 30px auto;
    background: #fff;
    border: 3px solid #0693e3;
    border-radius: 5px;
    padding: 1.5em !important;
}


/* ── Question heading ── */
.nps-heading {
    text-align: center;
    font-size: 1.1em;
    font-weight: 900;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.35;
    margin-bottom: 1em;
}

/* ── Table wrapper – enables horizontal scroll on small screens ── */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
}

/* ── Matrix table ── */
.matrixLayout {
    width: 100%;
    border-collapse: collapse;
    background: #efefef;
    border-radius: 6px;
    overflow: hidden;
    table-layout: fixed;
}

.matrixLayout thead tr {
    background: #efefef;
}

.matrixLayout thead th {
    font-size: 0.8em;
    font-weight: 700;
    color: #222;
    text-align: center;
    padding: 0.5em 0.2em 0.3em;
    border-right: 1px solid #ddd;
    white-space: nowrap;
}

.matrixLayout thead th:last-child {
    border-right: none;
}

.matrixLayout tbody tr {
    background: #f8f8f8;
}

.matrixLayout tbody td {
    text-align: center;
    padding: 0.4em 0.2em 0.6em;
    border-right: 1px solid #ddd;
}

.matrixLayout tbody td:last-child {
    border-right: none;
}

/* ── Radio button styling ── */
.oneChoice input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.4em;
    height: 1.4em;
    border: 2px solid #aaa;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: border-color 0.15s;
    vertical-align: middle;
}

.oneChoice input[type="radio"]:hover {
    border-color: var(--brand);
}

.oneChoice input[type="radio"]:checked {
    border-color: var(--brand);
    background: var(--brand);
}

.oneChoice input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 0.45em;
    height: 0.45em;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ── Scale labels below table ── */
.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5em;
    font-size: 0.75em;
    color: #444;
    flex-wrap: wrap;
    gap: 4px;
}

/* ── Conditional textareas ── */
.conditional-field {
    margin-top: 1.2em;
    display: none;
}

.conditional-field label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 0.4em;
    color: #333;
}

.conditional-field textarea {
    width: 100%;
    height: 5.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5em 0.6em;
    font-size: 0.9em;
    resize: vertical;
}

.conditional-field textarea:focus {
    outline: none;
    border-color: var(--brand);
}

/* ── Validation error messages ── */
.error-msg {
    display: none;
    color: #c0392b;
    font-size: 0.8em;
    margin-top: 0.4em;
}

.error-msg.visible {
    display: block;
}

.conditional-field textarea.invalid {
    border-color: #c0392b;
}

/* ── Submit button ── */
.actions {
    margin-top: 1.5em;
    text-align: center;
}

.primaryAction {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.75em 2.5em;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.15s;
    width: 100%;
    max-width: 300px;
}

.primaryAction:hover {
    background: var(--brand-dark);
}

/* ── Mobile responsiveness ── */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .wFormContainer {
        margin: 8px;
        padding: 1em;
    }

    .nps-heading {
        font-size: 1em;
    }

    .primaryAction {
        max-width: 100%;
    }
}
