/**
 * Techfringe GP Child — RTL Supplement
 *
 * Additional overrides for Arabic (RTL) layout.
 * Loaded only when is_rtl() is true.
 */

/* Typography adjustments for Arabic */
body {
    font-family: var(--tf-font-arabic);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tf-font-arabic);
}

/* Button letter-spacing reset for Arabic */
.tf-btn-primary,
.tf-btn-secondary,
.tf-btn-whatsapp,
.main-navigation a {
    letter-spacing: 0;
    text-transform: none;
}

/* Heading accent — flip to right-aligned */
.tf-heading-accent::after {
    margin-left: auto;
    margin-right: 0;
}

/* Ensure GeneratePress navigation respects RTL */
.main-navigation .sub-menu {
    left: auto;
    right: 0;
}

/* Top utility bar — swap content order for RTL */
.tfgp-topbar__left,
.tfgp-topbar__right {
    direction: rtl;
}

/* Nav CTA buttons — reset Latin letter-spacing */
.tfgp-nav-cta {
    letter-spacing: 0;
    text-transform: none;
}

.tfgp-nav-cta-item {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Footer heading accent — flip to right */
.tfgp-footer-heading::after {
    left: auto;
    right: 0;
}

/* WhatsApp float tooltip — position on right side */
.tf-whatsapp-float__tooltip {
    right: auto;
    left: calc(100% + 12px);
}

.tf-whatsapp-float__tooltip::after {
    right: auto;
    left: -6px;
    border-left: none;
    border-right: 6px solid var(--tf-white);
}

/* ==========================================================================
   Product Catalog — RTL Overrides
   ========================================================================== */

/* Button resets for Arabic */
.tf-btn {
    letter-spacing: 0;
    text-transform: none;
}

/* Breadcrumbs direction */
.tf-breadcrumbs__list {
    direction: rtl;
}

/* Product card badge: flip to right */
.tf-product-card__badge {
    left: auto;
    right: 12px;
}

/* Catalog sidebar: overlay from right on mobile */
@media (max-width: 768px) {
    .tf-catalog__sidebar {
        left: auto;
        right: -320px;
    }

    .tf-catalog__sidebar.is-open {
        left: auto;
        right: 0;
    }
}

/* Filter sublist: padding flip */
.tf-filter-sublist {
    padding-left: 0;
    padding-right: 1rem;
}

/* Filter toggle: flip position */
.tf-filter-toggle {
    right: auto;
    left: 0;
}

/* Filter search: border-radius flip */
.tf-filter-search__input {
    border-radius: 0 var(--tf-radius) var(--tf-radius) 0;
}

.tf-filter-search__btn {
    border-radius: var(--tf-radius) 0 0 var(--tf-radius);
}

/* Subcategory card small: margin flip */
.tf-subcategory-card small {
    margin-left: 0;
    margin-right: 0.25rem;
}

/* Specs table: text-align right */
.tf-specs-table th,
.tf-specs-table td {
    text-align: right;
}

/* Product detail: reading direction */
.tf-product-detail {
    direction: rtl;
}

/* Product section highlight: border flip */
.tf-product-section--highlight {
    border-left: none;
    border-right: 4px solid var(--tf-gold);
}

/* Prose blockquote: border flip */
.tf-prose blockquote {
    border-left: none;
    border-right: 4px solid var(--tf-gold);
    border-radius: var(--tf-radius) 0 0 var(--tf-radius);
}

/* ==========================================================================
   RFQ Form & Contact — RTL Overrides
   ========================================================================== */

/* Form labels */
.tf-form-group label {
    text-align: right;
}

/* Select dropdown arrow: flip to left */
.tf-form-group select {
    background-position: left 0.9rem center;
    padding-right: 0.9rem;
    padding-left: 2.5rem;
}

/* File upload icon: flip */
.tf-file-upload__label {
    direction: rtl;
}

.tf-file-list {
    text-align: right;
}

/* Response note: border flip */
.tf-response-note {
    border-left: none;
    border-right: 3px solid var(--tf-gold);
}

/* RFQ sidebar: block items direction */
.tf-sidebar-block__item {
    direction: rtl;
}

/* Contact grid: text alignment */
.tf-contact-item {
    text-align: center;
}

/* Contact form wrapper: direction */
.tf-contact-form-wrapper {
    direction: rtl;
}

.tf-contact-form-wrapper__intro h2::after {
    margin-left: auto;
    margin-right: 0;
}

/* ==========================================================================
   Homepage — RTL Overrides
   ========================================================================== */

.tf-hero__actions {
    justify-content: flex-start;
}

.tf-checklist__item svg {
    margin-right: 0;
    margin-left: 12px;
}

.tf-checklist__item {
    text-align: right;
}

.tf-process-step {
    text-align: right;
}

/* ==========================================================================
   About Page — RTL
   ========================================================================== */

.tf-aims-box {
    border-left: none;
    border-right: 4px solid var(--tf-gold);
    border-radius: var(--tf-radius) 0 0 var(--tf-radius);
}

.tf-aims-box ul {
    padding-left: 0;
    padding-right: 1.25rem;
}

/* ==========================================================================
   Language Switcher — RTL
   ========================================================================== */

.tf-lang-switcher {
    direction: ltr;
}

.tfgp-topbar__right .tf-lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-right: 1rem;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
