/* ============================================================
   URWAN CHECKLIST — SOPORTE RTL / ÁRABE

   IMPORTANTE:
   - Cargar este CSS después de form.css.
   - El documento árabe debe tener <html dir="rtl" lang="ar">
     o el wrapper:
       <div class="urwan-wrap" dir="rtl">
   ============================================================ */

:root {
    --urwan-choice-space: 32px;
    --urwan-choice-mark-offset: 5px;
}


/* ============================================================
   DIRECCIÓN GENERAL
   ============================================================ */

.urwan-wrap {
    text-align: start;
}

/* WordPress suele añadir body.rtl y html[dir="rtl"] */
html[dir="rtl"] .urwan-wrap,
html[lang^="ar"] .urwan-wrap,
body.rtl .urwan-wrap,
.urwan-wrap[dir="rtl"],
.urwan-wrap.urwan-rtl {
    direction: rtl;
    text-align: right;
}


/* Gravity Forms puede sobrescribir la dirección */
html[dir="rtl"] .urwan-wrap .gform_wrapper,
html[lang^="ar"] .urwan-wrap .gform_wrapper,
body.rtl .urwan-wrap .gform_wrapper,
.urwan-wrap[dir="rtl"] .gform_wrapper,
.urwan-wrap.urwan-rtl .gform_wrapper {
    direction: rtl;
    text-align: right;
}


/* Textos que deben respetar el inicio de la línea */
.urwan-instructions h3,
.urwan-instructions li,
.acc_head p,
.acc_content p,
.urwan-progress-label,
.urwan-progress-step,
.urwan-final-msg h3,
.urwan-final-msg p,
.gform_wrapper.gravity-theme .gfield_label,
.gform_wrapper.gravity-theme .gchoice label {
    text-align: start;
}


/* ============================================================
   BULLETS DE LAS INSTRUCCIONES
   ============================================================ */
.urwan-instructions li {
    position: relative;
    padding-left: 0;
    padding-right: 0;
    padding-inline-start: 26px;
}


.urwan-instructions li::before {
    left: auto;
    right: auto;
    inset-inline-start: 0;
    inset-inline-end: auto;
}


/* ============================================================
   BULLETS DEL CONTENIDO DE LOS ACORDEONES
   ============================================================ */

.acc_content p {
    position: relative;

    padding-left: 0;
    padding-right: 0;

    padding-inline-start: 22px;
}


.acc_content p::before {
    left: auto;
    right: auto;

    inset-inline-start: 0;
    inset-inline-end: auto;
}

.acc_content ul {
    list-style: none;
    padding-inline-start: 0;
}

.acc_content li {
    position: relative;
    list-style: none;

    padding-left: 0;
    padding-right: 0;
    padding-inline-start: 22px;
}

.acc_content li::before {
    content: "";
    position: absolute;
    top: 7px;
    width: 9px;
    height: 9px;
    background: var(--urwan-teal);
    left: auto;
    right: auto;
    inset-inline-start: 0;
    inset-inline-end: auto;
}


/* ============================================================
   CHECKBOXES PERSONALIZADOS DE GRAVITY FORMS
   ============================================================ */

.gf_browser_chrome.gform_wrapper.gravity-theme form .ginput_container_checkbox .gfield_checkbox .gchoice label,
.gform_wrapper.gravity-theme form .ginput_container_checkbox .gfield_checkbox .gchoice label {
    position: relative;
    box-sizing: border-box;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline-start: var(--urwan-choice-space) !important;
    text-align: start !important;
}

.gf_browser_chrome.gform_wrapper.gravity-theme form .ginput_container_checkbox .gfield_checkbox .gchoice label::before,
.gform_wrapper.gravity-theme form .ginput_container_checkbox .gfield_checkbox .gchoice label::before {
    inset-inline-start: 5px !important;
    inset-inline-end: auto !important;
}

.gf_browser_chrome.gform_wrapper.gravity-theme form .ginput_container_checkbox .gfield_checkbox .gchoice label::after,
.gform_wrapper.gravity-theme form .ginput_container_checkbox .gfield_checkbox .gchoice label::after {
    left: auto !important;
    right: auto !important;

    inset-inline-start: var(--urwan-choice-mark-offset) !important;
    inset-inline-end: auto !important;
}

.gform_wrapper.gravity-theme .ginput_container_checkbox .gfield_checkbox,
.gform_wrapper.gravity-theme .ginput_container_checkbox .gfield_checkbox .gchoice {
    direction: inherit;
    text-align: start;
}

.gf_browser_chrome.gform_wrapper.gravity-theme form .ginput_container_checkbox .gfield_checkbox .gchoice input {
    right: 9px;
}

/* ============================================================
   ACORDEONES
   ============================================================ */

.acc_head p {
    flex: 1 1 auto;
    min-width: 0;
    text-align: start;
}

.acc_head:dir(rtl) {
    flex-direction: row;
}

html[dir="rtl"] .urwan-wrap .acc_head,
html[lang^="ar"] .urwan-wrap .acc_head,
body.rtl .urwan-wrap .acc_head,
.urwan-wrap[dir="rtl"] .acc_head,
.urwan-wrap.urwan-rtl .acc_head {
    flex-direction: row;
}

html[dir="rtl"] .acc_head p,
html[lang^="ar"] .acc_head p,
body.rtl .acc_head p,
.urwan-wrap[dir="rtl"] .acc_head p,
.urwan-wrap.urwan-rtl .acc_head p {
    direction: rtl;
    text-align: right;
}


/* ============================================================
   BARRA DE PROGRESO
   ============================================================ */

.urwan-progress-track {
    position: relative;
}

.urwan-progress-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: auto;
    right: auto;
    inset-inline-start: 0;
    inset-inline-end: auto;
    height: 100%;
    border-radius: inherit;
}


/* ============================================================
   BOTONES DE INSTRUCCIONES
   ============================================================ */
.urwan-actions:dir(rtl) {
    justify-content: flex-start;
}

html[dir="rtl"] .urwan-actions,
html[lang^="ar"] .urwan-actions,
body.rtl .urwan-actions,
.urwan-wrap[dir="rtl"] .urwan-actions,
.urwan-wrap.urwan-rtl .urwan-actions {
    direction: rtl;
    justify-content: flex-start;
}


/* ============================================================
   FOOTER DE GRAVITY FORMS
   ============================================================ */

.gf_browser_chrome.gform_wrapper.gravity-theme form .gform_page_footer,
.gform_wrapper.gravity-theme form .gform_page_footer {
    flex-wrap: wrap;
    direction: inherit;
}

html[dir="rtl"] .gform_wrapper.gravity-theme form .gform_page_footer,
html[lang^="ar"] .gform_wrapper.gravity-theme form .gform_page_footer,
body.rtl .gform_wrapper.gravity-theme form .gform_page_footer,
.urwan-wrap[dir="rtl"] .gform_wrapper.gravity-theme form .gform_page_footer,
.urwan-wrap.urwan-rtl .gform_wrapper.gravity-theme form .gform_page_footer {
    direction: rtl;
    justify-content: flex-start;
}

/* ============================================================
   AJUSTES RESPONSIVE RTL
   ============================================================ */

@media (max-width: 640px) {

    html[dir="rtl"] .urwan-actions,
    html[lang^="ar"] .urwan-actions,
    body.rtl .urwan-actions,
    .urwan-wrap[dir="rtl"] .urwan-actions,
    .urwan-wrap.urwan-rtl .urwan-actions {
        align-items: stretch;
    }

    html[dir="rtl"] .gform_wrapper.gravity-theme form .gform_page_footer,
    html[lang^="ar"] .gform_wrapper.gravity-theme form .gform_page_footer,
    body.rtl .gform_wrapper.gravity-theme form .gform_page_footer,
    .urwan-wrap[dir="rtl"] .gform_wrapper.gravity-theme form .gform_page_footer,
    .urwan-wrap.urwan-rtl .gform_wrapper.gravity-theme form .gform_page_footer {
        align-items: stretch;
    }
}