.qr-wrap {
    width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

@media (min-width: 700px) {
    .qr-wrap {
        max-width: 33.333vw;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
    }
}

.qr-wrap h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.qr-wrap h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.qr-wrap .qr-bodytext {
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.qr-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Each field: label stacked above its control */
.qr-field {
    display: block;
}

.qr-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: inherit;
}

.qr-label .qr-required {
    color: #c00;
    margin-left: 0.2em;
}

/* Wrapper that owns the width — nothing in the site CSS overrides a plain div */
.qr-control {
    display: block;
    width: 100%;
}

.qr-control input[type="text"],
.qr-control textarea,
.qr-control select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.qr-control input[type="text"],
.qr-control select:not([multiple]) {
    height: 44px;
}

.qr-control textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.qr-control select[multiple] {
    min-height: 120px;
    padding: 0.25rem 0;
    -webkit-appearance: auto;
    appearance: auto;
}

.qr-control input[type="text"]:focus,
.qr-control textarea:focus,
.qr-control select:focus {
    outline: 2px solid #00776B;
    border-color: #00776B;
}

/* Vote field: two-column layout */
.qr-vote-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: start;
}

.qr-vote-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.qr-vote-caption {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

.qr-vote-caption .qr-required {
    color: #c00;
    margin-left: 0.2em;
}

.qr-vote-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 1000px) {
    .qr-vote-layout {
        grid-template-columns: 1fr;
    }
}

/* Radio / checkbox option lists */
.qr-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.qr-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.4;
}

.qr-option input[type="radio"],
.qr-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    accent-color: #00776B;
}

/* Error states */
.qr-field--error .qr-control input,
.qr-field--error .qr-control textarea,
.qr-field--error .qr-control select {
    border-color: #c00;
}

.qr-field-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #c00;
}

.qr-error-summary {
    padding: 0.75rem 1rem;
    background: #fff0f0;
    border: 1px solid #c00;
    border-radius: 4px;
    color: #c00;
    font-size: 0.95rem;
}

/* Altcha + submit */
.qr-altcha {
    margin-top: 0.5rem;
}

.qr-submit {
    display: block;
    margin-top: 0.5rem;
    width: 100%;
    min-height: 48px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    background: #00776B;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0px 4px 4px 0px #00000040;
    -webkit-appearance: none;
    appearance: none;
}

.qr-submit:hover,
.qr-submit:focus {
    background: #a2bf16;
    outline: 2px solid #a2bf16;
}
