/*
Theme Name: Kadence Framework Core (RTL)
Template: kadence
Description: RTL directional overrides for Arabic and Hebrew layouts. The
             base style.css already uses logical CSS properties
             (margin-inline, padding-inline, inset-inline-start, text-align:
             start) wherever possible, so most layout does not need an
             override here. This file only covers the exceptions that
             still need one.
*/

body {
    direction: rtl;
    unicode-bidi: embed;
}

/*
 * Opt-in utility for template authors: apply this class to any flex
 * container whose visual (not logical) order needs to reverse in RTL
 * — e.g. an icon-plus-label pattern where the icon should swap sides
 * rather than follow normal reading-order flow.
 */
.rtl-flex-reverse {
    flex-direction: row-reverse;
}

/* Navigation & Header RTL Adjustments */
.site-navigation ul {
    padding-inline-start: 0;
}

.site-navigation .sub-menu {
    text-align: start;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="number"],
textarea,
select {
    text-align: start;
}

label {
    text-align: start;
}

/* Buttons */
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button {
    text-align: center; /* buttons stay centered regardless of direction */
}

/* Gutenberg blocks */
.entry-content ul,
.entry-content ol {
    padding-inline-start: var(--kfc-space-md, 1.5rem);
    padding-inline-end: 0;
}

.entry-content blockquote {
    border-inline-start: 3px solid var(--kfc-border, #e2e8f0);
    border-inline-end: 0;
    padding-inline-start: var(--kfc-space-sm, 1rem);
}

/* WooCommerce RTL fixes */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
    direction: rtl;
}

.woocommerce .quantity input.qty {
    text-align: center;
}
