.vd-form-shell {
    width: min(100% - 32px, 760px);
    max-width: 760px;
    margin: 24px auto;
    color: #202124;
    font-family: Arial, Helvetica, sans-serif;
}

.vd-form-shell * {
    box-sizing: border-box;
}

.vd-form-head,
.vd-form-question,
.vd-form-section,
.vd-form-notice {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 2px 7px rgba(60, 64, 67, 0.13);
}

.vd-form-head {
    padding: 30px 32px 28px;
    border-top: 10px solid #673ab7;
}

.vd-form-head h2 {
    margin: 0 0 12px;
    color: #202124;
    font-size: 31px;
    font-weight: 400;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.vd-form-head p {
    margin: 0;
    color: #5f6368;
    font-size: 15px;
    line-height: 1.6;
}

.vd-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.vd-form-question,
.vd-form-section {
    padding: 24px 26px;
}

.vd-form-section {
    border-top: 6px solid #673ab7;
}

.vd-form-section h3 {
    margin: 0 0 8px;
    color: #202124;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.25;
}

.vd-form-section p {
    margin: 0;
    color: #5f6368;
    line-height: 1.55;
}

.vd-form-question__label {
    display: block;
    margin-bottom: 12px;
    color: #202124;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.vd-form-question__label span {
    color: #d93025;
    margin-left: 3px;
}

.vd-form-question__help {
    margin: -2px 0 14px;
    color: #5f6368;
    font-size: 13px;
    line-height: 1.5;
}

.vd-form input:not([type]),
.vd-form input[type="text"],
.vd-form input[type="email"],
.vd-form input[type="tel"],
.vd-form input[type="number"],
.vd-form input[type="date"],
.vd-form input[type="time"],
.vd-form textarea,
.vd-form select {
    width: 100%;
    min-height: 44px;
    padding: 8px 2px;
    border: 0;
    border-bottom: 1px solid #dadce0;
    border-radius: 0;
    background: transparent;
    color: #202124;
    font: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.vd-form textarea {
    min-height: 112px;
    resize: vertical;
}

.vd-form select {
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #ffffff;
}

.vd-form input:not([type]):focus,
.vd-form input[type="text"]:focus,
.vd-form input[type="email"]:focus,
.vd-form input[type="tel"]:focus,
.vd-form input[type="number"]:focus,
.vd-form input[type="date"]:focus,
.vd-form input[type="time"]:focus,
.vd-form textarea:focus {
    outline: none;
    border-bottom-color: #673ab7;
    box-shadow: inset 0 -1px 0 #673ab7;
}

.vd-form select:focus {
    outline: none;
    border-color: #673ab7;
    box-shadow: 0 0 0 2px rgba(103, 58, 183, 0.14);
}

.vd-form-options {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.vd-form-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 26px;
    color: #3c4043;
    cursor: pointer;
    line-height: 1.45;
}

.vd-form-options input[type="radio"],
.vd-form-options input[type="checkbox"],
.vd-form-grid input[type="radio"],
.vd-form-grid input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #70757a;
    background: #ffffff;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.vd-form-options label:hover input[type="radio"],
.vd-form-options label:hover input[type="checkbox"],
.vd-form-grid label:hover input[type="radio"],
.vd-form-grid label:hover input[type="checkbox"] {
    border-color: #673ab7;
}

.vd-form-options input[type="radio"],
.vd-form-grid input[type="radio"] {
    border-radius: 999px;
}

.vd-form-options input[type="checkbox"],
.vd-form-grid input[type="checkbox"] {
    border-radius: 3px;
}

.vd-form-options input[type="radio"]:checked,
.vd-form-grid input[type="radio"]:checked {
    border-color: #673ab7;
}

.vd-form-options input[type="radio"]:checked::after,
.vd-form-grid input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 999px;
    background: #673ab7;
}

.vd-form-options input[type="checkbox"]:checked,
.vd-form-grid input[type="checkbox"]:checked {
    border-color: #673ab7;
    background: #673ab7;
}

.vd-form-options input[type="checkbox"]:checked::after,
.vd-form-grid input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.vd-form-options input[type="radio"]:focus-visible,
.vd-form-options input[type="checkbox"]:focus-visible,
.vd-form-grid input[type="radio"]:focus-visible,
.vd-form-grid input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(103, 58, 183, 0.16);
}

.vd-form-options span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.vd-form-scale {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.vd-form-scale__labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #5f6368;
    font-size: 13px;
}

.vd-form-scale__options,
.vd-form-rating {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vd-form-scale__options label,
.vd-form-rating label {
    position: relative;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.vd-form-scale__options input,
.vd-form-rating input {
    position: absolute;
    opacity: 0;
}

.vd-form-scale__options span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dadce0;
    border-radius: 999px;
    color: #3c4043;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.vd-form-scale__options input:checked + span {
    border-color: #673ab7;
    background: #673ab7;
    color: #ffffff;
}

.vd-form-rating span {
    color: #c8c9cc;
    font-size: 32px;
    line-height: 1;
    transition: color 0.18s ease, transform 0.18s ease;
}

.vd-form-rating input:checked + span {
    color: #f4b400;
    transform: scale(1.08);
}

.vd-form-rating em {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.vd-form-grid-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid #edf0f2;
    border-radius: 8px;
}

.vd-form-grid {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
}

.vd-form-grid th,
.vd-form-grid td {
    padding: 12px 10px;
    border-bottom: 1px solid #edf0f2;
    text-align: center;
}

.vd-form-grid thead th {
    color: #5f6368;
    font-size: 13px;
    font-weight: 700;
}

.vd-form-grid tbody th {
    color: #3c4043;
    font-weight: 500;
    text-align: left;
}

.vd-form-grid input {
    vertical-align: middle;
}

.vd-form-file {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.vd-form-file input[type="file"] {
    width: 100%;
    padding: 13px;
    border: 1px dashed #b9bec6;
    border-radius: 6px;
    background: #fafafa;
}

.vd-form-file p {
    margin: 0;
    color: #5f6368;
    font-size: 13px;
}

.vd-form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: -2px;
}

.vd-form-actions button {
    min-height: 44px;
    padding: 0 30px;
    border: 0;
    border-radius: 5px;
    background: #673ab7;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease;
}

.vd-form-actions button:hover,
.vd-form-actions button:focus {
    background: #5b32a3;
    box-shadow: 0 2px 8px rgba(103, 58, 183, 0.26);
    outline: none;
}

.vd-form-notice {
    margin-top: 12px;
    padding: 16px 18px;
    font-weight: 700;
}

.vd-form-notice--success {
    border-color: rgba(13, 119, 129, 0.3);
    background: #edf7f4;
    color: #174e55;
}

.vd-form-notice small {
    display: block;
    margin-top: 8px;
    color: inherit;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.78;
}

.vd-form-notice--error {
    border-color: rgba(190, 72, 72, 0.3);
    background: #fff3f0;
    color: #8a2d22;
}

.vd-form-notice--closed {
    border-color: rgba(103, 58, 183, 0.24);
    background: #f5f1ff;
    color: #3f2b6d;
}

.vd-form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.vd-form-question--captcha {
    overflow: hidden;
    padding: 22px 26px;
}

.vd-form-question--captcha .g-recaptcha {
    max-width: 100%;
    transform-origin: left top;
}

html.vodokanal-dark-mode .vd-form-shell {
    color: #edf7f4;
}

html.vodokanal-dark-mode .vd-form-head,
html.vodokanal-dark-mode .vd-form-question,
html.vodokanal-dark-mode .vd-form-section,
html.vodokanal-dark-mode .vd-form-notice {
    background: #14262a;
    border-color: #365b60;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

html.vodokanal-dark-mode .vd-form-head h2,
html.vodokanal-dark-mode .vd-form-section h3,
html.vodokanal-dark-mode .vd-form-question__label {
    color: #edf7f4;
}

html.vodokanal-dark-mode .vd-form-head p,
html.vodokanal-dark-mode .vd-form-section p,
html.vodokanal-dark-mode .vd-form-question__help,
html.vodokanal-dark-mode .vd-form-options label,
html.vodokanal-dark-mode .vd-form-grid tbody th {
    color: #c3d7d5;
}

html.vodokanal-dark-mode .vd-form input:not([type]),
html.vodokanal-dark-mode .vd-form input[type="text"],
html.vodokanal-dark-mode .vd-form input[type="email"],
html.vodokanal-dark-mode .vd-form input[type="tel"],
html.vodokanal-dark-mode .vd-form input[type="number"],
html.vodokanal-dark-mode .vd-form input[type="date"],
html.vodokanal-dark-mode .vd-form input[type="time"],
html.vodokanal-dark-mode .vd-form textarea,
html.vodokanal-dark-mode .vd-form select,
html.vodokanal-dark-mode .vd-form-file input[type="file"] {
    background: #102025;
    border-color: #3f666c;
    color: #edf7f4;
}

html.vodokanal-dark-mode .vd-form-options input[type="radio"],
html.vodokanal-dark-mode .vd-form-options input[type="checkbox"],
html.vodokanal-dark-mode .vd-form-grid input[type="radio"],
html.vodokanal-dark-mode .vd-form-grid input[type="checkbox"] {
    background: #14262a;
    border-color: #8fb3b6;
}

html.vodokanal-dark-mode .vd-form-options input[type="checkbox"]:checked,
html.vodokanal-dark-mode .vd-form-grid input[type="checkbox"]:checked {
    background: #9d7dff;
    border-color: #9d7dff;
}

html.vodokanal-dark-mode .vd-form-options input[type="radio"]:checked,
html.vodokanal-dark-mode .vd-form-grid input[type="radio"]:checked {
    border-color: #9d7dff;
}

html.vodokanal-dark-mode .vd-form-options input[type="radio"]:checked::after,
html.vodokanal-dark-mode .vd-form-grid input[type="radio"]:checked::after {
    background: #9d7dff;
}

html.vodokanal-visual-mode .vd-form-head,
html.vodokanal-visual-mode .vd-form-question,
html.vodokanal-visual-mode .vd-form-section,
html.vodokanal-visual-mode .vd-form-notice {
    border: 2px solid #000000 !important;
    box-shadow: none !important;
}

html.vodokanal-visual-mode .vd-form-actions button {
    background: #000000 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

@media (max-width: 640px) {
    .vd-form-shell {
        width: min(100% - 20px, 760px);
        margin: 18px auto;
    }

    .vd-form-head,
    .vd-form-question,
    .vd-form-section {
        padding: 18px 16px;
    }

    .vd-form-head h2 {
        font-size: 26px;
    }

    .vd-form-actions button {
        width: 100%;
    }

    .vd-form-question--captcha .g-recaptcha {
        transform: scale(0.88);
    }
}

@media (max-width: 360px) {
    .vd-form-question--captcha .g-recaptcha {
        transform: scale(0.78);
    }
}
