/*
 * RTL (Right-to-Left) Stylesheet
 *
 * Applied automatically when WordPress detects an RTL language (e.g., Arabic).
 *
 * @package MTT_Theme
 * @since   1.0.0
 */

/* General RTL adjustments */
body.rtl {
  direction: rtl;
  text-align: right;
}

/* Navigation */
body.rtl .flex-row-reverse {
  flex-direction: row;
}

/* Hero section adjustments */
body.rtl .hero-shape {
  border-radius: 70% 30% 30% 70% / 30% 70% 30% 70%;
}

body.rtl .text-left {
  text-align: right;
}

body.rtl .text-right {
  text-align: left;
}

/* Transform directions */
body.rtl .-skew-x-12 {
  --tw-skew-x: 12deg;
}

body.rtl .translate-x-1\/2 {
  --tw-translate-x: -50%;
}

body.rtl .group-hover\:translate-x-1:hover {
  --tw-translate-x: -0.25rem;
}

/* Margin/Padding flip */
body.rtl .ml-auto {
  margin-left: unset;
  margin-right: auto;
}

body.rtl .mr-auto {
  margin-right: unset;
  margin-left: auto;
}

/* Border adjustments */
body.rtl .border-r {
  border-right: none;
  border-left: 1px solid;
  border-color: inherit;
}

body.rtl .border-l {
  border-left: none;
  border-right: 1px solid;
  border-color: inherit;
}

body.rtl .border-l-4 {
  border-left: none;
  border-right: 4px solid;
  border-color: inherit;
}

/* Positioning flip */
body.rtl .right-0 {
  right: unset;
  left: 0;
}

body.rtl .left-0 {
  left: unset;
  right: 0;
}

body.rtl .-left-6 {
  left: unset;
  right: -1.5rem;
}

/* Breadcrumb direction */
body.rtl .breadcrumb {
  direction: rtl;
}

/* List styling */
body.rtl .prose ul,
body.rtl .prose ol {
  padding-left: 0;
  padding-right: 1.5rem;
}

/* Blockquote adjustments from Tailwind prose */
body.rtl .prose blockquote {
  border-left-width: 0;
  border-right-width: 4px;
  border-right-style: solid;
  /* Mirror rounded-r-xl to rounded-l-xl */
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

/* Form elements */
body.rtl input:not([type]),
body.rtl input[type="text"],
body.rtl input[type="search"],
body.rtl input[type="password"],
body.rtl textarea,
body.rtl select {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
}

body.rtl input[type="email"],
body.rtl input[type="tel"],
body.rtl input[type="url"],
body.rtl input[type="number"],
body.rtl input[type="date"],
body.rtl input[type="datetime-local"],
body.rtl input[type="time"],
body.rtl input[type="month"],
body.rtl input[type="week"] {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: right;
}

body.rtl input[type="email"]::placeholder,
body.rtl input[type="tel"]::placeholder,
body.rtl input[type="url"]::placeholder {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
}

/* Gap/flex adjustments - ensure proper spacing in RTL */
body.rtl .gap-2 > * + * {
  margin-right: 0;
}

/* Social icons */
body.rtl .flex.gap-4 {
  direction: ltr;
}

/* Dropdown menus */
body.rtl .absolute.right-0 {
  right: unset;
  left: 0;
}

body.rtl .absolute.left-0 {
  left: unset;
  right: 0;
}

/* Rotate icons for RTL */
body.rtl svg[class*="chevron_right"],
body.rtl .group-hover\:translate-x-1 {
  transform: scaleX(-1);
}

/* Divide utilities: reverse horizontal dividers */
body.rtl .divide-x > :not([hidden]) ~ :not([hidden]) {
  --tw-divide-x-reverse: 1;
}

/* Additional position utilities used in components */
body.rtl .right-6 {
  right: unset;
  left: 1.5rem;
}

body.rtl .-right-6 {
  right: unset;
  left: -1.5rem;
}

/* Accessibility: skip link placement in RTL */
body.rtl .skip-link:focus {
  left: auto;
  right: 1rem;
}
