/********** Template CSS **********/
:root {
    --primary: #20599b;
    --light: #F3F6F9;
    --dark: #191C24;
}

body, h1, h2, h3, h4, h5, h6, p {
    font-family: 'Baloo Bhaijaan 2', sans-serif;
    direction: rtl; /* Set layout to RTL */
}

.back-to-top {
    position: fixed;
    display: none;
    left: 45px; /* Adjust for RTL */
    bottom: 45px;
    z-index: 99;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}






/*** Button ***/
.btn {
    transition: .5s;
}

.btn.btn-primary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}

/*** Layout ***/
.sidebar {
    position: fixed;
    top: 0;
    right: 0; /* Adjust for RTL */
    bottom: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    background: var(--light);
    transition: 0.5s;
    z-index: 999;
}

.content {
    margin-right: 250px; /* Adjust for RTL */
    min-height: 100vh;
    background: #FFFFFF;
    transition: 0.5s;
}

@media (min-width: 992px) {
    .sidebar {
        margin-right: 0;
    }

    .sidebar.open {
        margin-right: -250px;
    }

    .content {
        width: calc(100% - 250px);
    }

    .content.open {
        width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-right: -250px;
    }

    .sidebar.open {
        margin-right: 0;
    }

    .content {
        width: 100%;
        margin-right: 0;
    }
}

/*** Navbar ***/
.sidebar .navbar .navbar-nav .nav-link {
    padding: 7px 20px;
    color: var(--dark);
    font-weight: 500;
    border-right: 3px solid var(--light); /* Adjust for RTL */
    border-radius: 30px 0 0 30px; /* Adjust for RTL */
    outline: none;
}

.sidebar .navbar .navbar-nav .nav-link:hover,
.sidebar .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    background: #FFFFFF;
    border-color: var(--primary);
}

.sidebar .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 40px;
}

.sidebar .navbar .navbar-nav .nav-link:hover i,
.sidebar .navbar .navbar-nav .nav-link.active i {
    background: var(--light);
}

.sidebar .navbar .dropdown-toggle::after {
    position: absolute;
    top: 15px;
    left: 15px; /* Adjust for RTL */
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.sidebar .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

.sidebar .navbar .dropdown-item {
    padding-right: 25px; /* Adjust for RTL */
    border-radius: 30px 0 0 30px; /* Adjust for RTL */
}

.content .navbar .navbar-nav .nav-link {
    margin-right: 25px; /* Adjust for RTL */
    padding: 12px 0;
    color: var(--dark);
    outline: none;
}

.content .navbar .navbar-nav .nav-link:hover,
.content .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.content .navbar .sidebar-toggler,
.content .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 40px;
}

.content .navbar .dropdown-toggle::after {
    margin-right: 6px; /* Adjust for RTL */
    vertical-align: middle;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.content .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

@media (max-width: 575.98px) {
    .content .navbar .navbar-nav .nav-link {
        margin-right: 15px; /* Adjust for RTL */
    }
}

/* add newly from me  */




/* Ensure proper text and placeholder alignment for RTL */
html[lang="ar"] .form-floating > .form-control {
    direction: rtl; /* Set input text direction to RTL */
    text-align: right; /* Align text to the right */
}

/* Adjust label alignment in RTL */
html[lang="ar"] .form-floating > label {
    direction: rtl; /* Label direction */
    text-align: right; /* Align label text to the right */
    right: 1.25rem; /* Adjust label position for Bootstrap */
    left: auto; /* Reset left position */
}

/* Placeholder fix for RTL */
html[lang="ar"] .form-floating > .form-control::placeholder {
    direction: rtl;
    text-align: right;
}

/* Ensure compatibility for LTR (default Bootstrap behavior) */
html[lang="en"] .form-floating > .form-control {
    direction: ltr;
    text-align: left;
}

html[lang="en"] .form-floating > label {
    direction: ltr;
    text-align: left;
    left: 1.25rem; /* Keep default Bootstrap positioning */
    right: auto; /* Reset right position */
}

html[lang="en"] .form-floating > .form-control::placeholder {
    direction: ltr;
    text-align: left;
}



.text-primary {
    color: var( --primary) !important;
}

.table td {
    position: relative;
}

.dropdown-menu {
       z-index: 1050;
}








/***** MODAL DIALOG ****/
#modal {
    /* Underlay covers entire screen. */
    position: fixed;
    top:0px;
    bottom: 0px;
    left:0px;
    right:0px;
    background-color:rgba(0,0,0,0.5);
    z-index:1000;

    /* Flexbox centers the .modal-content vertically and horizontally */
    display:flex;
    flex-direction:column;
    align-items:center;

    /* Animate when opening */
    animation-name: fadeIn;
    animation-duration:150ms;
    animation-timing-function: ease;
}

#modal > .modal-underlay {
    /* underlay takes up the entire viewport. This is only
    required if you want to click to dismiss the popup */
    position: absolute;
    z-index: -1;
    top:0px;
    bottom:0px;
    left: 0px;
    right: 0px;
}

#modal > .modal-content {
    /* Position visible dialog near the top of the window */
    margin-top:10vh;

    /* Sizing for visible dialog */
    width:80%;
    max-width:600px;

    /* Display properties for visible dialog*/
    border:solid 1px #999;
    border-radius:8px;
    box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
    background-color:white;
    padding:20px;

    /* Animate when opening */
    animation-name:zoomIn;
    animation-duration:150ms;
    animation-timing-function: ease;
}

#modal.closing {
    /* Animate when closing */
    animation-name: fadeOut;
    animation-duration:150ms;
    animation-timing-function: ease;
}

#modal.closing > .modal-content {
    /* Animate when closing */
    animation-name: zoomOut;
    animation-duration:150ms;
    animation-timing-function: ease;
}

@keyframes fadeIn {
    0% {opacity: 0;}
    100% {opacity: 1;}
}

@keyframes fadeOut {
    0% {opacity: 1;}
    100% {opacity: 0;}
}

@keyframes zoomIn {
    0% {transform: scale(0.9);}
    100% {transform: scale(1);}
}

@keyframes zoomOut {
    0% {transform: scale(1);}
    100% {transform: scale(0.9);}
}


.status-circle {
    width: 10px; /* Adjust size as needed */
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-circle.member {
    background-color: green; /* Green for members */
}

.status-circle.non-member {
    background-color: red; /* Red for non-members */
}

.btn-primary {
    color: #000;
    background-color: var(--primary);
    border-color:  var(--primary);
}




/*card template*/
.membership-card {
    width: 300px;
    height: 450px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    background-color: #fff;
}

.profile-photo {
    width: 152px;
    height: 152px;
    border: 4px solid var(--bs-gray);
    object-fit: cover;
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    z-index: -1;
}


/* Fade-out animation */
tr.htmx-swapping td {
    opacity: 0;
    transition: opacity 1s ease-out; /* Match duration with swap:1s */
}


/*** Pagination Styles ***/
/*** Pagination Styles ***/
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    direction: rtl; /* Ensure RTL alignment */
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light);
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
}

.pagination a:hover {
    background-color: var(--primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination a[disabled] {
    pointer-events: none;
    opacity: 0.5;
}

/* Current Page Style */
.pagination .current-page {
    background-color: var(--primary);
    color: #FFFFFF;
    font-weight: bold;
    border: 1px solid var(--primary);
}

.pagination .ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--dark);
    font-weight: 500;
}

/*** Responsive Pagination ***/
@media (max-width: 576px) {
    .pagination a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .pagination .ellipsis {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}
