.cb-calculator {
    max-width: 1280px;
    margin: 30px auto 50px;
    padding: 30px 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.cb-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.cb-field {
    margin-bottom: 20px;
}

/* Single vertical flow, matching the original per-page calculators
   (calculator.twig / noviy_calculator.twig): big preview photo, then the
   format thumbnail row (both full-width, centered), then the rest of the
   fields (2 per row on desktop, except wide/visual ones which stay
   full-width — this naturally puts "Профіль" as the first, full-width row
   right under the format switcher, since radio fields span both columns). */
.cb-preview {
    text-align: center;
    margin-bottom: 20px;
}

.cb-preview img {
    max-width: 100%;
    max-height: 480px;
}

.cb-format:empty {
    display: none;
}

.cb-format .cb-label {
    text-align: center;
}

.cb-format .cb-image-choice-group {
    justify-content: center;
}

.cb-fields {
    margin-top: 20px;
}

/* Two fields per row within .cb-fields, except the wide/visual ones
   (heading, photo, radio) which stay full-width. */
@media (min-width: 768px) {
    .cb-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 20px;
    }

    .cb-fields .cb-field-heading,
    .cb-fields .cb-field-photo,
    .cb-fields .cb-field-radio {
        grid-column: 1 / -1;
    }
}

.cb-label {
    display: block;
    font-size: 0.95em;
    color: #333;
    margin-bottom: 6px;
    font-weight: bold;
}

.cb-help {
    font-size: 0.8em;
    color: #888;
    margin-top: 4px;
}

.cb-field-heading .cb-heading {
    text-align: center;
}

.cb-field-photo .cb-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.cb-input {
    width: 100%;
    color: #666;
    font-size: 14px;
    line-height: 1.25;
    border-radius: 4px;
    border: 1px solid #eee;
    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 10px;
    transition: all 0.2s linear 0s;
}

.cb-field.cb-invalid .cb-input,
.cb-field.cb-invalid .cb-radio-group,
.cb-field.cb-invalid .cb-image-choice-group {
    border-color: #d9534f;
    box-shadow: 0 0 0 1px #d9534f;
}

.cb-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cb-radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}

.cb-radio-option.active {
    border-color: #f39c12;
    background: #fff8ec;
}

.cb-image-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cb-image-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 110px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-weight: normal;
    font-size: 0.85em;
    margin: 0;
}

.cb-image-option.active {
    border-color: #f39c12;
    background: #fff8ec;
}

.cb-image-option__image img {
    max-width: 100%;
    max-height: 80px;
}

.cb-image-option__label {
    margin-top: 6px;
}

.cb-image-option input,
.cb-radio-option input {
    display: none;
}

.cb-total {
    text-align: center;
    margin-top: 30px;
}

.cb-price {
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
}

.cb-disclaimer {
    font-size: 0.85em;
    color: #888;
}

.cb-lead-form,
.cb-success {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.cb-lead-form .form-group {
    text-align: left;
}

.cb-lead-form .button-form {
    display: flex;
    justify-content: center;
    gap: 10px;
}
