body {
    direction: rtl;
    font-family: 'IS';
    text-align: right;
}

#map {
    height: 100dvh;
    width: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
}

.z-1000 {
    z-index: 1000 !important;
}

.left-20 {
    left: 30px;
}

.rbmap {
    right: 0px;
    bottom: 10px;
}

#map-control-button {
    width: 50px;
    height: 50px;
    border-radius: 50px;
}

.btn-sm {
    font-size: 0.7rem !important;
    line-height: 0.5;
    padding: 0.4rem 0.5rem;
}
/* Base style for the modal dialog to handle transition */
#addLocationModal .modal-dialog {
    transition: transform 0.3s ease-out; /* Smooth transition for sliding */
}

/* Style when entering fullscreen (sliding up) */
#addLocationModal.fullscreen .modal-dialog {
    transform: translateY(0); /* Final position */
}

/* Initial position before sliding up (only when modal is fullscreen) */
#addLocationModal.fullscreen.show .modal-dialog {
    transform: translateY(0); /* Ensure it's not off-screen when already fullscreen */
}

/* For the initial state (not fullscreen), it should be at its default position */
#addLocationModal:not(.fullscreen) .modal-dialog {
    transform: translateY(0); /* Default position for non-fullscreen modal */
}

.slide-up-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 90vh;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    z-index: 1050;
    padding: 20px;
    overflow-y: auto;
}

    .slide-up-modal.show {
        transform: translateY(0);
    }

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

    .modal-backdrop.show {
        display: block;
    }

/* Custom styles for the tab navigation in modal */

/* Style for the nav-tabs container */
.nav-tabs {
    border-bottom: 2px solid #e9ecef; /* A light silver line at the bottom */
}

    /* Style for the individual nav-link items */
    .nav-tabs .nav-link {
        border: none;
        border-bottom: 2px solid transparent; /* Hide the default border */
        color: #495057; /* A dark gray color for text */
        transition: all 0.3s ease-in-out;
        font-size: 0.8rem;
    }

        /* Style for the active tab */
        .nav-tabs .nav-link.active {
            border-color: #17a2b8; /* A bright blue line under the active tab */
            background-color: transparent;
            color: #000;
        }

        /* Hover effect for tabs */
        .nav-tabs .nav-link:hover {
            border-color: #17a2b8;
            background-color: #f8f9fa;
        }

/* Removing the bottom border from the tab content */
.tab-content {
    border: none;
}

.slide-up-modal.fullscreen {
    height: 100dvh;
    max-height: 100dvh;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
/* Custom styles for gallery thumbnails */
.gallery-thumbnail {
    width: 100%;
    height: 100px; /* Set a fixed height for all thumbnails */
    object-fit: cover; /* This property crops the image to fit the container */
    cursor: pointer;
}

/* Ensure the parent columns have consistent height for alignment */
.col-4 {
    height: 100px;
}

.modal-body {
    position: relative; /* Add this style to make modal-body the positioning parent */
}

#prevImage {
    width: 50px;
    left: 5px !important;
}

#nextImage {
    width: 50px;
    right: 5px !important;
}
/* Custom styles for map layer tiles */
.map-layer-tile {
    width: 96px;
    height: 96px;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.2s ease-in-out;
}

    .map-layer-tile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0;
        filter: brightness(0.7); /* Darken the image a bit for better text readability */
    }

    .map-layer-tile span {
        z-index: 1; /* Bring text to the front */
        color: white;
        font-size: 0.75rem;
        padding: 5px;
        background-color: rgba(0, 0, 0, 0.5);
        width: 100%;
        text-align: center;
    }

    .map-layer-tile:hover {
        border-color: #007bff;
    }

    .map-layer-tile.active {
        border-color: #007bff;
        box-shadow: 0 0 5px #007bff;
    }

#user-menu-button {
    border-radius: 50%; /* Make it round */
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.leaflet-popup-content {
    direction: rtl;
    font-family: 'IS';
    text-align: center;
}
