/* RTL Support for Arabic Language - WP UP Migrate */

/* Base RTL Styles */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Navigation RTL */
[dir="rtl"] .navbar-nav {
    direction: rtl;
}

[dir="rtl"] .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}

[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 1rem;
}

/* Card RTL */
[dir="rtl"] .card {
    text-align: right;
}

[dir="rtl"] .card-body {
    text-align: right;
}

/* Form RTL */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .form-label {
    text-align: right;
}

[dir="rtl"] .form-check {
    text-align: right;
}

[dir="rtl"] .form-check-input {
    margin-right: 0;
    margin-left: 0.25rem;
}

/* Button RTL */
[dir="rtl"] .btn {
    text-align: center;
}

[dir="rtl"] .btn i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* List RTL */
[dir="rtl"] .list-unstyled {
    text-align: right;
}

[dir="rtl"] .list-group-item {
    text-align: right;
}

/* Alert RTL */
[dir="rtl"] .alert {
    text-align: right;
}

[dir="rtl"] .alert i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Footer RTL */
[dir="rtl"] .footer {
    text-align: right;
}

[dir="rtl"] .footer ul {
    text-align: right;
}

/* Language Switcher RTL */
[dir="rtl"] .language-switcher .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}

[dir="rtl"] .language-switcher .dropdown-item {
    text-align: right;
}

[dir="rtl"] .language-switcher .dropdown-item i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Text Alignment Utilities */
[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-4 { margin-right: 1.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-5 { margin-right: 3rem !important; margin-left: 0 !important; }

[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-4 { margin-left: 1.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-5 { margin-left: 3rem !important; margin-right: 0 !important; }

[dir="rtl"] .ps-1 { padding-right: 0.25rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-2 { padding-right: 0.5rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-3 { padding-right: 1rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-4 { padding-right: 1.5rem !important; padding-left: 0 !important; }
[dir="rtl"] .ps-5 { padding-right: 3rem !important; padding-left: 0 !important; }

[dir="rtl"] .pe-1 { padding-left: 0.25rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-2 { padding-left: 0.5rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-3 { padding-left: 1rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-4 { padding-left: 1.5rem !important; padding-right: 0 !important; }
[dir="rtl"] .pe-5 { padding-left: 3rem !important; padding-right: 0 !important; }

/* Float RTL */
[dir="rtl"] .float-start {
    float: right !important;
}

[dir="rtl"] .float-end {
    float: left !important;
}

/* Flex RTL */
[dir="rtl"] .flex-row-reverse {
    flex-direction: row !important;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse !important;
}

/* Border RTL */
[dir="rtl"] .border-start {
    border-right: 1px solid var(--bs-border-color) !important;
    border-left: 0 !important;
}

[dir="rtl"] .border-end {
    border-left: 1px solid var(--bs-border-color) !important;
    border-right: 0 !important;
}

/* Responsive RTL */
@media (max-width: 768px) {
    [dir="rtl"] .navbar-nav {
        text-align: right;
    }
    
    [dir="rtl"] .dropdown-menu {
        text-align: right;
    }
    
    [dir="rtl"] .card {
        text-align: right;
    }
}

/* Custom RTL Styles for WP UP Migrate */
[dir="rtl"] .hero-section {
    text-align: right;
}

[dir="rtl"] .hero-section .display-4 {
    text-align: right;
}

[dir="rtl"] .hero-section .lead {
    text-align: right;
}

[dir="rtl"] .hero-section .btn {
    text-align: center;
}

[dir="rtl"] .features-section {
    text-align: right;
}

[dir="rtl"] .features-section .card {
    text-align: right;
}

[dir="rtl"] .features-section .card-body {
    text-align: right;
}

[dir="rtl"] .features-section .card-title {
    text-align: right;
}

[dir="rtl"] .features-section .card-text {
    text-align: right;
}

[dir="rtl"] .features-section .list-unstyled {
    text-align: right;
}

[dir="rtl"] .features-section .list-unstyled li {
    text-align: right;
}

[dir="rtl"] .features-section .list-unstyled li i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Extension Cards RTL */
[dir="rtl"] .extension-card {
    text-align: right;
}

[dir="rtl"] .extension-card .card-body {
    text-align: right;
}

[dir="rtl"] .extension-card .card-title {
    text-align: right;
}

[dir="rtl"] .extension-card .card-text {
    text-align: right;
}

[dir="rtl"] .extension-card .btn {
    text-align: center;
}

/* Footer RTL */
[dir="rtl"] .footer {
    text-align: right;
}

[dir="rtl"] .footer h5,
[dir="rtl"] .footer h6 {
    text-align: right;
}

[dir="rtl"] .footer ul {
    text-align: right;
}

[dir="rtl"] .footer ul li {
    text-align: right;
}

[dir="rtl"] .footer ul li a {
    text-align: right;
}

/* Form RTL Enhancements */
[dir="rtl"] .form-floating > label {
    right: 0;
    left: auto;
}

[dir="rtl"] .form-floating > .form-control {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

[dir="rtl"] .form-floating > .form-control:focus ~ label,
[dir="rtl"] .form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Accordion RTL */
[dir="rtl"] .accordion-button {
    text-align: right;
}

[dir="rtl"] .accordion-body {
    text-align: right;
}

/* Table RTL */
[dir="rtl"] .table {
    text-align: right;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

/* Modal RTL */
[dir="rtl"] .modal-header {
    text-align: right;
}

[dir="rtl"] .modal-body {
    text-align: right;
}

[dir="rtl"] .modal-footer {
    text-align: right;
}

/* Badge RTL */
[dir="rtl"] .badge {
    text-align: center;
}

/* Progress RTL */
[dir="rtl"] .progress {
    direction: ltr;
}

/* Carousel RTL */
[dir="rtl"] .carousel-control-prev {
    right: 0;
    left: auto;
}

[dir="rtl"] .carousel-control-next {
    left: 0;
    right: auto;
}

/* Pagination RTL */
[dir="rtl"] .pagination {
    justify-content: center;
}

[dir="rtl"] .page-link {
    text-align: center;
}

/* Breadcrumb RTL */
[dir="rtl"] .breadcrumb {
    text-align: right;
}

[dir="rtl"] .breadcrumb-item {
    text-align: right;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "←";
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Tooltip RTL */
[dir="rtl"] .tooltip {
    text-align: right;
}

/* Popover RTL */
[dir="rtl"] .popover {
    text-align: right;
}

/* Dropdown RTL */
[dir="rtl"] .dropdown-toggle::after {
    margin-right: 0.255em;
    margin-left: 0;
}

/* Navbar RTL */
[dir="rtl"] .navbar-toggler {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 1rem;
}

/* Container RTL */
[dir="rtl"] .container {
    text-align: right;
}

[dir="rtl"] .container-fluid {
    text-align: right;
}

/* Row RTL */
[dir="rtl"] .row {
    text-align: right;
}

[dir="rtl"] .col {
    text-align: right;
}

/* Utilities RTL */
[dir="rtl"] .text-nowrap {
    white-space: nowrap;
}

[dir="rtl"] .text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Print RTL */
@media print {
    [dir="rtl"] {
        direction: rtl;
        text-align: right;
    }
    
    [dir="rtl"] .no-print {
        display: none !important;
    }
}
