/* =========================================================
   GF55 - MATARA_MEVUGARIM_AMTANA
   Base styling adapted from GF54, scoped exclusively to GF55.
   Does not modify form content, values, or conditional logic.
   ========================================================= */

#gform_wrapper_55,
#gform_wrapper_55 * {
    box-sizing: border-box;
}

#gform_wrapper_55 {
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: 100%;
    background: #f3f9ed;
}

#gform_wrapper_55 .gform_body {
    padding-right: 24px;
    padding-left: 24px;
}

/* Fields and standard Gravity Forms grid */
#gform_wrapper_55 .gfield,
#gform_wrapper_55 .gfield_label,
#gform_wrapper_55 .gfield_description {
    direction: rtl;
    text-align: right;
}

#gform_wrapper_55 .gfield_label {
    width: 100%;
    font-weight: 600;
    line-height: 1.5;
}

#gform_wrapper_55 .gfield_description {
    line-height: 1.5;
}

#gform_wrapper_55 .gform_fields {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
}

#gform_wrapper_55 .gfield {
    grid-column: span 12;
    min-width: 0;
}

#gform_wrapper_55 .gfield--width-full { grid-column: span 12; }
#gform_wrapper_55 .gfield--width-half { grid-column: span 6; }
#gform_wrapper_55 .gfield--width-third { grid-column: span 4; }
#gform_wrapper_55 .gfield--width-two-thirds { grid-column: span 8; }
#gform_wrapper_55 .gfield--width-quarter { grid-column: span 3; }
#gform_wrapper_55 .gfield--width-three-quarter { grid-column: span 9; }

#gform_wrapper_55 .gfield_required {
    margin-right: 4px;
    margin-left: 0;
}

/* Inputs */
#gform_wrapper_55 input[type="text"],
#gform_wrapper_55 input[type="email"],
#gform_wrapper_55 input[type="tel"],
#gform_wrapper_55 input[type="number"],
#gform_wrapper_55 input[type="date"],
#gform_wrapper_55 select,
#gform_wrapper_55 textarea {
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
}

#gform_wrapper_55 input[type="file"] {
    direction: rtl;
    max-width: 100%;
    background: #ffffff;
}

#gform_wrapper_55 textarea {
    resize: vertical;
    min-height: 110px;
}

#gform_wrapper_55 .ginput_container_date,
#gform_wrapper_55 .ginput_container_date input,
#gform_wrapper_55 .ginput_container_fileupload,
#gform_wrapper_55 .gform_fileupload_rules {
    direction: rtl;
    text-align: right;
}

/* Choices and consent */
#gform_wrapper_55 .gfield_radio,
#gform_wrapper_55 .gfield_checkbox,
#gform_wrapper_55 .ginput_container_consent {
    direction: rtl;
    text-align: right;
}

#gform_wrapper_55 .gchoice {
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

#gform_wrapper_55 .gchoice input[type="radio"],
#gform_wrapper_55 .gchoice input[type="checkbox"],
#gform_wrapper_55 .ginput_container_consent input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 0;
}

#gform_wrapper_55 .gchoice label,
#gform_wrapper_55 .ginput_container_consent label {
    direction: rtl;
    text-align: right;
    margin: 0;
}

/* Section headings */
#gform_wrapper_55 .gsection {
    direction: rtl;
    text-align: right;
    width: 100%;
    border: 0;
}

#gform_wrapper_55 .gsection_title {
    direction: rtl;
    text-align: right;
    margin: 0;
    color: #2f6b3b;
    font-weight: 700;
}

#gform_wrapper_55 .gsection_description {
    direction: rtl;
    text-align: right;
    line-height: 1.6;
}

/* HTML fields and loaded external documents */
#gform_wrapper_55 .gfield--type-html,
#gform_wrapper_55 [data-include] {
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: 100%;
}

#gform_wrapper_55 [data-include] {
    display: block;
    font-size: 16px;
    line-height: 1.7;
}

#gform_wrapper_55 [data-include] p {
    margin: 0 0 9px;
    padding: 0;
    line-height: 1.7;
}

#gform_wrapper_55 [data-include] h2,
#gform_wrapper_55 [data-include] h3,
#gform_wrapper_55 [data-include] h4 {
    direction: rtl;
    text-align: right;
    color: #2f6b3b;
    font-weight: 700;
    border: 0;
}

#gform_wrapper_55 [data-include] h2 {
    font-size: 20px;
    line-height: 1.4;
    margin: 0 0 12px;
}

#gform_wrapper_55 [data-include] h3 {
    font-size: 18px;
    line-height: 1.45;
    margin: 0 0 10px;
}

#gform_wrapper_55 [data-include] h4 {
    font-size: 16px;
    line-height: 1.5;
    margin: 16px 0 7px;
}

#gform_wrapper_55 [data-include] ul,
#gform_wrapper_55 [data-include] ol {
    direction: rtl;
    text-align: right;
    margin: 8px 0 12px;
    padding: 0 24px 0 0;
}

#gform_wrapper_55 [data-include] li {
    margin-bottom: 7px;
    line-height: 1.7;
}

/* Validation and navigation */
#gform_wrapper_55 .gfield_validation_message,
#gform_wrapper_55 .validation_message,
#gform_wrapper_55 .gform_validation_errors {
    direction: rtl;
    text-align: right;
}

#gform_wrapper_55 .gform_page_footer,
#gform_wrapper_55 .gform_footer {
    direction: rtl;
    text-align: right;
}

#gform_wrapper_55 .gform_page_footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

#gform_wrapper_55 .gform_page_footer input,
#gform_wrapper_55 .gform_footer input,
#gform_wrapper_55 .gform_button,
#gform_wrapper_55 .gform_next_button,
#gform_wrapper_55 .gform_previous_button {
    cursor: pointer;
}

#gform_wrapper_55 .gform_ajax_spinner {
    margin-right: 10px;
    margin-left: 0;
}

/* Mobile */
@media (max-width: 767px) {
    #gform_wrapper_55 .gform_body {
        padding-right: 12px;
        padding-left: 12px;
    }

    #gform_wrapper_55 .gform_fields {
        width: 100%;
        grid-template-columns: 1fr;
    }

    #gform_wrapper_55 .gfield,
    #gform_wrapper_55 .gfield--width-full,
    #gform_wrapper_55 .gfield--width-half,
    #gform_wrapper_55 .gfield--width-third,
    #gform_wrapper_55 .gfield--width-two-thirds,
    #gform_wrapper_55 .gfield--width-quarter,
    #gform_wrapper_55 .gfield--width-three-quarter {
        grid-column: 1 / -1;
        min-width: 0;
    }

    #gform_wrapper_55 [data-include],
    #gform_wrapper_55 [data-include] p,
    #gform_wrapper_55 [data-include] li {
        font-size: 15px;
        line-height: 1.65;
    }

    #gform_wrapper_55 [data-include] h3 { font-size: 17px; }
    #gform_wrapper_55 [data-include] h4 { font-size: 15px; }

    #gform_wrapper_55 .gform_page_footer input,
    #gform_wrapper_55 .gform_footer input,
    #gform_wrapper_55 .gform_button,
    #gform_wrapper_55 .gform_next_button,
    #gform_wrapper_55 .gform_previous_button {
        max-width: 100%;
    }
}
/* =========================================================
   GF55 — COMPACT VERTICAL SPACING
   Only form 55
   ========================================================= */

/* Уменьшаем расстояния между полями и разделами */
#gform_wrapper_55 .gform_fields {
    row-gap: 10px !important;
}

/* Убираем лишние отступы у заголовков разделов */
#gform_wrapper_55 .gsection {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Заголовки разделов */
#gform_wrapper_55 .gsection_title {
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
}

/* HTML-блоки */
#gform_wrapper_55 .gfield--type-html {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Заголовки внутри HTML */
#gform_wrapper_55 .gfield--type-html h2,
#gform_wrapper_55 .gfield--type-html h3,
#gform_wrapper_55 .gfield--type-html h4 {
    margin-top: 8px !important;
    margin-bottom: 6px !important;
}

/* Абзацы внутри HTML */
#gform_wrapper_55 .gfield--type-html p {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
}

/* Нумерованные и маркированные списки */
#gform_wrapper_55 .gfield--type-html ol,
#gform_wrapper_55 .gfield--type-html ul {
    margin-top: 4px !important;
    margin-bottom: 8px !important;
}

/* Пункты списков */
#gform_wrapper_55 .gfield--type-html li {
    margin-top: 0 !important;
    margin-bottom: 3px !important;
}