/* --- Global Variables & Basic Reset --- */
:root {
    --restaurants-primary-color: #007bff; /* الأزرق المستخدم في الأزرار الرئيسية */
    --restaurants-secondary-color: #6c757d; /* للرمادي الثانوي */
    --restaurants-text-primary: #212529; /* أسود داكن للنصوص الرئيسية */
    --restaurants-text-secondary: #6c757d; /* رمادي للنصوص الثانوية والوصف */
    --restaurants-text-light: #888; /* رمادي أفتح */
    --restaurants-bg: #f8f9fa; /* خلفية الصفحة الرئيسية - أبيض مائل للرمادي */
    --restaurants-card-bg: #ffffff; /* خلفية البطاقات */
    --restaurants-border-color: #e9ecef; /* لون الحدود الخفيف */
    --restaurants-header-bg: #ffffff;
    --font-family-restaurants: "Cairo", sans-serif;
    --border-radius-restaurants: 8px;
    --star-color: #ffc107; /* لون النجوم للتقييم */
    --safe-area-top-restaurants: env(safe-area-inset-top, 0px);
    --safe-area-bottom-restaurants: env(safe-area-inset-bottom, 0px);
    --button-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
    --scrollbar-width: 10px;
    --scrollbar-track-bg: #fff;
    --scrollbar-thumb-bg: #007bff;
    --scrollbar-thumb-hover-bg: #0056b3;
    --scrollbar-border-radius: 5px;
}

body::-webkit-scrollbar,
div::-webkit-scrollbar,
main::-webkit-scrollbar,
aside::-webkit-scrollbar,
section::-webkit-scrollbar,
.custom-scrollable-element::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

body::-webkit-scrollbar-track,
div::-webkit-scrollbar-track,
main::-webkit-scrollbar-track,
aside::-webkit-scrollbar-track,
section::-webkit-scrollbar-track,
.custom-scrollable-element::-webkit-scrollbar-track {
    background: var(--scrollbar-track-bg);
    border-radius: var(--scrollbar-border-radius);
}

body::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb,
aside::-webkit-scrollbar-thumb,
section::-webkit-scrollbar-thumb,
.custom-scrollable-element::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-bg);
    border-radius: var(--scrollbar-border-radius);
    border: 2px solid var(--scrollbar-track-bg);
}

body::-webkit-scrollbar-thumb:hover,
div::-webkit-scrollbar-thumb:hover,
main::-webkit-scrollbar-thumb:hover,
aside::-webkit-scrollbar-thumb:hover,
section::-webkit-scrollbar-thumb:hover,
.custom-scrollable-element::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover-bg);
}

body::-webkit-scrollbar-button,
div::-webkit-scrollbar-button,
main::-webkit-scrollbar-button,
aside::-webkit-scrollbar-button,
section::-webkit-scrollbar-button,
.custom-scrollable-element::-webkit-scrollbar-button {
    display: none;
}

html,
body,
div,
main,
aside,
section,
.custom-scrollable-element {
    scrollbar-color: var(--scrollbar-thumb-bg) var(--scrollbar-track-bg);
}
button,
input,
select,
input::placeholder {
    font-family: var(--font-family-doctors);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-family-restaurants);
    background-color: var(--restaurants-bg);
    color: var(--restaurants-text-primary);
    line-height: 1.6;
    direction: rtl;
    min-height: 100vh;
    font-size: 14px; /* حجم خط أساسي أصغر قليلاً لمظهر التطبيق */
}
a {
    text-decoration: none;
    color: var(--restaurants-primary-color);
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn-restaurants-main {
    /* زر أساسي كبير */
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius-restaurants);
    cursor: pointer;
    font-family: var(--font-family-restaurants);
    font-weight: 600;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-size: 1em;
    background-color: var(--restaurants-primary-color);
    color: white;
    box-shadow: var(--button-shadow);
}
.btn-restaurants-main:hover {
    background-color: #0056b3;
}
.btn-restaurants-main:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Restaurants List Page (`restaurants.html`) --- */
.restaurants-page-container {
    display: flex;
    flex-direction: column;
    background-color: var(--restaurants-bg);
}

.restaurants-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--restaurants-header-bg);
    border-bottom: 1px solid var(--restaurants-border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: calc(var(--safe-area-top-restaurants) + 10px);
}
.restaurants-main-header h1 {
    font-size: 1.15em;
    font-weight: 700;
    color: var(--restaurants-text-primary);
}
.header-action-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    color: var(--restaurants-text-primary);
    cursor: pointer;
    padding: 5px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-actions {
    display: flex;
    gap: 5px;
}

.delivery-location-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
    background-color: var(--restaurants-card-bg);
    border-bottom: 1px solid var(--restaurants-border-color);
    font-size: 0.9em;
    color: var(--restaurants-text-secondary);
    position: sticky;
    top: calc(
        var(--safe-area-top-restaurants) + 57px
    ); /* Height of header approx */
    z-index: 99;
}
.delivery-location-bar span {
    font-weight: 600;
    color: var(--restaurants-text-primary);
}
.delivery-location-bar span i {
    margin-right: 3px;
    font-size: 0.8em;
}
.change-location-btn {
    background: none;
    border: none;
    color: var(--restaurants-primary-color);
    font-size: 1.2em;
    cursor: pointer;
}

.quick-filters-categories {
    padding: 15px;
    background-color: var(--restaurants-card-bg);
    border-bottom: 6px solid var(--restaurants-bg); /* Thicker separator */
}
.global-search-restaurants {
    width: 100%;
    padding: 10px 15px 10px 40px; /* Space for icon */
    border: 1px solid var(--restaurants-border-color);
    border-radius: 20px; /* Pill shape */
    margin-bottom: 15px;
    font-family: var(--font-family-restaurants);
    font-size: 0.95em;
    background-color: var(
        --restaurants-bg
    ); /* Light grey background for input */
}
.quick-filters-categories h4 {
    font-size: 1em;
    margin-bottom: 12px;
    font-weight: 700;
}
.categories-scroller {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.categories-scroller::-webkit-scrollbar {
    display: none;
}
.category-chip {
    text-align: center;
    min-width: 75px;
    cursor: pointer;
}
.category-chip img {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.category-chip span {
    font-size: 0.85em;
    color: var(--restaurants-text-secondary);
    font-weight: 600;
}

.restaurant-list-controls {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 15px;
    background-color: var(--restaurants-bg); /* Match page background */
    border-bottom: 1px solid var(--restaurants-border-color);
    position: sticky;
    top: calc(
        var(--safe-area-top-restaurants) + 57px + 43px
    ); /* Header + Location Bar */
    z-index: 98;
    scrollbar-width: none;
}
.restaurant-list-controls::-webkit-scrollbar {
    display: none;
}
.control-btn {
    background-color: var(--restaurants-card-bg);
    border: 1px solid var(--restaurants-border-color);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 0.85em;
    color: var(--restaurants-text-primary);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.control-btn i {
    margin-left: 6px;
    color: var(--restaurants-text-secondary);
    font-size: 0.9em;
}
.control-btn.active {
    background-color: var(--restaurants-primary-color);
    color: white;
    border-color: var(--restaurants-primary-color);
}
.control-btn.active i {
    color: white;
}

.restaurants-listing-area {
    flex-grow: 1;
    padding: 15px;
    padding-bottom: 70px; /* Space for potential fixed cart footer */
}
.restaurant-card-link {
    text-decoration: none;
    color: inherit;
}
.restaurant-card {
    display: flex;
    gap: 15px;
    background-color: var(--restaurants-card-bg);
    padding: 15px;
    border-radius: var(--border-radius-restaurants);
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.2s;
}
.restaurant-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.restaurant-logo {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-restaurants);
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid var(--restaurants-border-color);
}
.restaurant-info {
    flex-grow: 1;
}
.restaurant-info h3 {
    font-size: 1.05em;
    font-weight: 700;
    margin-bottom: 2px;
}
.cuisine-type {
    font-size: 0.85em;
    color: var(--restaurants-text-secondary);
    margin-bottom: 6px;
}
.rating-delivery {
    font-size: 0.8em;
    color: var(--restaurants-text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}
.rating-delivery span i {
    margin-left: 3px;
}
.rating-delivery span .fa-star {
    color: var(--star-color);
}
.fav-restaurant-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    color: var(--restaurants-text-light);
    cursor: pointer;
    padding: 5px;
}
.fav-restaurant-btn.active i {
    color: var(--danger-color, #dc3545);
    font-weight: 900; /* Solid heart */
}

/* Bottom Sheet Styles */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1010;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.bottom-sheet-overlay.active {
    display: block;
    opacity: 1;
}
.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: var(--restaurants-card-bg);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    z-index: 1011;
    padding: 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transition: bottom 0.3s ease-out;
}
.bottom-sheet.active {
    bottom: 0;
}
.sheet-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 15px;
    position: relative;
    border-bottom: 1px solid var(--restaurants-border-color);
}
.sheet-handle {
    width: 40px;
    height: 5px;
    background-color: #ccc;
    border-radius: 3px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}
.sheet-header h3 {
    font-size: 1.05em;
    margin-top: 15px;
    text-align: center;
    flex-grow: 1;
    font-weight: 600;
}
.close-sheet-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    color: var(--restaurants-text-secondary);
    cursor: pointer;
    position: absolute;
    left: 15px;
    top: 15px;
} /* RTL */
.sheet-content {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
}
.filter-search-sheet input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--restaurants-border-color);
    border-radius: var(--border-radius-restaurants);
    margin-bottom: 15px;
    background-color: var(--restaurants-bg);
    font-family: var(--font-family-restaurants);
}
.filter-options-list .filter-option-item,
.sort-options-list .sort-option-item {
    display: flex;
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px solid var(--restaurants-border-color);
    font-size: 0.95em;
    cursor: pointer;
}
.filter-options-list .filter-option-item:last-child,
.sort-options-list .sort-option-item:last-child {
    border-bottom: none;
}
.filter-options-list input[type="checkbox"],
.sort-options-list input[type="radio"] {
    margin-left: 12px;
    accent-color: var(--restaurants-primary-color);
    transform: scale(1.2);
}
.sort-check-icon {
    margin-right: auto;
    color: var(--restaurants-primary-color);
    display: none;
    font-size: 1.1em;
}
.sort-options-list input[type="radio"]:checked ~ .sort-check-icon {
    display: inline-block;
} /* Show check for selected radio */
.sheet-footer {
    padding: 15px;
    border-top: 1px solid var(--restaurants-border-color);
    padding-bottom: calc(var(--safe-area-bottom-restaurants) + 15px);
}
.btn-restaurants-sheet.apply {
    width: 100%;
    padding: 12px;
    background-color: var(--restaurants-primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-restaurants);
    font-size: 1em;
    font-weight: 600;
}

/* Restaurant Menu Page */
.restaurant-menu-page {
    padding-bottom: 70px;
    background-color: var(--restaurants-bg);
}
.menu-header {
    position: relative;
}
.header-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.header-bg-image::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.8) 100%
    );
}
.header-overlay-content {
    position: relative;
    z-index: 1;
    padding: var(--safe-area-top-restaurants, 15px) 15px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    color: white;
}
.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fav-btn-menu {
    top: 152px !important;
}
.action-icon {
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
    cursor: pointer;
    position: relative;
    top: 6px;
}
.restaurant-brand-info {
    text-align: center;
}
.menu-restaurant-logo {
    width: 70px;
    height: 70px;
    border-radius: var(--border-radius-restaurants);
    object-fit: contain;
    margin: 0 auto 8px;
    background-color: white;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
#menuRestaurantName {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.cuisine-type-menu {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 6px;
}
.rating-delivery-menu {
    font-size: 0.8em;
    opacity: 0.9;
    display: flex;
    justify-content: center;
    gap: 12px;
}
.rating-delivery-menu span i {
    margin-left: 3px;
}
.category-tabs-menu {
    display: flex;
    overflow-x: auto;
    padding: 12px 15px;
    background-color: var(--restaurants-card-bg);
    border-bottom: 1px solid var(--restaurants-border-color);
    position: sticky;
    top: 0;
    z-index: 90;
    scrollbar-width: none;
}
.category-tabs-menu::-webkit-scrollbar {
    display: none;
}
.category-tab {
    padding: 8px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--font-family-restaurants);
    font-size: 0.95em;
    color: var(--restaurants-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
}
.category-tab.active {
    color: var(--restaurants-primary-color);
    border-bottom-color: var(--restaurants-primary-color);
}
.menu-items-container {
    padding: 15px;
    background-color: var(--restaurants-bg);
}
.menu-category-section {
    display: none;
}
.menu-category-section.active {
    display: block;
}
.menu-category-section h2 {
    font-size: 1.25em;
    margin-bottom: 15px;
    font-weight: 700;
    padding-top: 10px;
}
.menu-item-card {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--restaurants-border-color);
    cursor: pointer;
    background-color: var(--restaurants-card-bg);
    padding: 12px;
    border-radius: var(--border-radius-restaurants);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.menu-item-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.menu-item-image {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: var(--border-radius-restaurants);
    flex-shrink: 0;
}
.menu-item-info {
    flex-grow: 1;
}
.menu-item-info h3 {
    font-size: 1em;
    margin-bottom: 3px;
    font-weight: 600;
}
.item-description {
    font-size: 0.85em;
    color: var(--restaurants-text-secondary);
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.item-price {
    font-size: 0.95em;
    font-weight: 600;
}
.add-item-to-cart-btn {
    background-color: var(--restaurants-primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
}
.cart-summary-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--restaurants-card-bg);
    padding: 12px 15px calc(var(--safe-area-bottom-restaurants) + 12px) 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--restaurants-border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 95;
}
.cart-info {
    font-size: 0.9em;
}
.cart-info span {
    font-weight: 600;
    color: var(--restaurants-primary-color);
}
.view-cart-btn {
    background-color: var(--restaurants-primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: var(--border-radius-restaurants);
    font-size: 1em;
    font-weight: 600;
    box-shadow: var(--button-shadow);
}

/* Item Detail Modal (Bottom Sheet) */
.modal-overlay-restaurants {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1005;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay-restaurants.active {
    display: block;
    opacity: 1;
}
.modal-restaurants.item-detail-modal {
    background-color: var(--restaurants-card-bg);
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1007;
    transition: bottom 0.3s ease-out;
    transform: none;
    top: auto;
}
.modal-restaurants.item-detail-modal.active {
    bottom: 0;
}
.close-modal-restaurants-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.modal-item-image-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.modal-content-restaurants {
    padding: 15px;
    flex-grow: 1;
    overflow-y: auto;
}
.modal-content-restaurants h2 {
    font-size: 1.3em;
    margin-bottom: 5px;
    font-weight: 700;
}
.modal-item-desc {
    font-size: 0.9em;
    color: var(--restaurants-text-secondary);
    margin-bottom: 20px;
}
.quantity-selector-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}
.quantity-selector-modal .qty-btn {
    background-color: var(--restaurants-bg);
    border: 1px solid var(--restaurants-border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--restaurants-text-primary);
}
#modalItemQuantity {
    border: none;
    text-align: center;
    font-size: 1.3em;
    font-weight: 600;
    width: 50px;
    color: var(--restaurants-text-primary);
}
.options-group-modal {
    margin-bottom: 20px;
}
.options-group-modal h4 {
    font-size: 1em;
    margin-bottom: 10px;
    font-weight: 600;
}
.options-group-modal h4 small {
    font-size: 0.8em;
    color: var(--restaurants-text-light);
    margin-right: 5px;
}
.option-radio-modal,
.option-checkbox-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--restaurants-border-color);
    font-size: 0.95em;
    cursor: pointer;
}
.option-radio-modal:last-child,
.option-checkbox-modal:last-child {
    border-bottom: none;
}
.option-radio-modal input,
.option-checkbox-modal input {
    margin-left: 10px;
    accent-color: var(--restaurants-primary-color);
    transform: scale(1.2);
}
.option-radio-modal span,
.option-checkbox-modal span {
    color: var(--restaurants-text-secondary);
    font-size: 0.9em;
}
.modal-footer-restaurants {
    padding: 15px;
    border-top: 1px solid var(--restaurants-border-color);
    background-color: var(--restaurants-card-bg);
    padding-bottom: calc(var(--safe-area-bottom-restaurants) + 15px);
}
.btn-restaurants-modal.add-to-cart-modal-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--restaurants-primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-restaurants);
    font-size: 1em;
    font-weight: 600;
}

/* Address Page */
.address-page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--restaurants-bg);
}
.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--restaurants-card-bg);
    border-bottom: 1px solid var(--restaurants-border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}
.address-header h1 {
    font-size: 1.1em;
    font-weight: 700;
    flex-grow: 1;
    text-align: center;
}
.address-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: var(--restaurants-card-bg);
}
.select-on-map-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: var(--restaurants-primary-color);
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 1em;
    padding: 10px;
    border: 1px dashed var(--restaurants-primary-color);
    border-radius: var(--border-radius-restaurants);
}
.form-group-address {
    margin-bottom: 18px;
}
.form-group-address label {
    display: block;
    font-size: 0.9em;
    margin-bottom: 6px;
    font-weight: 600;
}
.form-group-address input[type="text"],
.form-group-address select,
.form-group-address textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--restaurants-border-color);
    border-radius: var(--border-radius-restaurants);
    font-family: var(--font-family-restaurants);
    background-color: var(--restaurants-bg);
    font-size: 0.95em;
}
.form-group-address textarea {
    resize: vertical;
    min-height: 80px;
}
.form-row-address {
    display: flex;
    gap: 15px;
}
.form-row-address .half-width {
    flex: 1;
}
.btn-address-page {
    width: 100%;
    padding: 12px;
    background-color: var(--restaurants-primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-restaurants);
    font-size: 1em;
    font-weight: 600;
    margin-top: 15px;
    box-shadow: var(--button-shadow);
}
.address-map-view .map-search-bar {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    z-index: 10;
}
.address-map-view .map-search-bar input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: none;
    border-radius: var(--border-radius-restaurants);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    font-size: 0.95em;
}
.address-map-view .map-search-bar i {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: var(--restaurants-text-light);
    font-size: 1.1em;
}
#mapPlaceholder {
    height: 350px;
    background-color: var(--restaurants-border-color);
    border-radius: var(--border-radius-restaurants);
    margin-bottom: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
#mapPlaceholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    opacity: 0.7;
}
.map-pin {
    position: absolute;
    font-size: 2.5em;
    color: var(--restaurants-primary-color);
}
.selected-address-map {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--restaurants-bg);
    border-radius: var(--border-radius-restaurants);
}
.selected-address-map h4 {
    font-size: 1em;
    margin-bottom: 3px;
    font-weight: 600;
}
.selected-address-map p {
    font-size: 0.9em;
    color: var(--restaurants-text-secondary);
}
.address-fields-map {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.address-fields-map .half-width-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--restaurants-border-color);
    border-radius: var(--border-radius-restaurants);
    background-color: var(--restaurants-bg);
    font-size: 0.95em;
}
.manual-address-link {
    background: none;
    color: var(--restaurants-primary-color);
    margin-top: 20px;
    border: none;
    padding: 0;
    text-decoration: underline;
    font-size: 0.95em;
    display: block;
    text-align: center;
}

/* Booking Success Page */
.booking-success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    height: 100vh;
    background-color: var(--restaurants-card-bg);
}
.success-icon-container-booking {
    font-size: 5em;
    color: var(--restaurants-primary-color);
    margin-bottom: 25px;
}
.booking-success-page h2 {
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 10px;
}
.booked-appointment-details {
    background-color: var(--restaurants-bg);
    padding: 20px 25px;
    border-radius: var(--border-radius-restaurants);
    margin-bottom: 35px;
    font-size: 1em;
    width: 100%;
    max-width: 350px;
}
.appointment-type {
    display: inline-block;
    background-color: var(--restaurants-primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-bottom: 10px;
    font-weight: 600;
}
.booked-doctor-name {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 1.1em;
}
.booked-date-time {
    color: var(--restaurants-text-secondary);
}
.go-to-main-btn {
    width: 100%;
    max-width: 300px;
}

/* Responsive */
@media (max-width: 480px) {
    .restaurant-list-controls {
        padding: 8px 10px;
    }
    .control-btn {
        font-size: 0.8em;
        padding: 6px 10px;
    }
    .category-tabs-menu {
        padding: 8px 10px;
    }
    .category-tab {
        font-size: 0.9em;
        padding: 6px 10px;
    }
    .menu-item-image {
        width: 65px;
        height: 65px;
    }
    .menu-item-info h3 {
        font-size: 0.9em;
    }
    .item-price {
        font-size: 0.85em;
    }
    .add-item-to-cart-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
    .cart-summary-footer {
        padding: 10px 12px calc(var(--safe-area-bottom-restaurants, 0px) + 10px)
            12px;
    }
    .view-cart-btn {
        padding: 9px 18px;
        font-size: 0.9em;
    }
    .modal-restaurants.item-detail-modal {
        max-height: 95vh;
    }
    .modal-content-restaurants h2 {
        font-size: 1.15em;
    }
}

/* ==========================================================================
   LTR overrides (English mode) — mirrors the directional rules above.
   ========================================================================== */
[dir="ltr"] body {
    direction: ltr;
}
[dir="ltr"] .delivery-location-bar span i {
    margin-right: 0;
    margin-left: 3px;
}
[dir="ltr"] .control-btn i {
    margin-left: 0;
    margin-right: 6px;
}
[dir="ltr"] .rating-delivery span i {
    margin-left: 0;
    margin-right: 3px;
}
[dir="ltr"] .close-sheet-btn {
    left: auto;
    right: 15px;
}
[dir="ltr"] .filter-options-list input[type="checkbox"],
[dir="ltr"] .sort-options-list input[type="radio"] {
    margin-left: 0;
    margin-right: 12px;
}
[dir="ltr"] .sort-check-icon {
    margin-right: 0;
    margin-left: auto;
}
[dir="ltr"] .rating-delivery-menu span i {
    margin-left: 0;
    margin-right: 3px;
}
[dir="ltr"] .close-modal-restaurants-btn {
    left: auto;
    right: 12px;
}
[dir="ltr"] .options-group-modal h4 small {
    margin-right: 0;
    margin-left: 5px;
}
[dir="ltr"] .option-radio-modal input,
[dir="ltr"] .option-checkbox-modal input {
    margin-left: 0;
    margin-right: 10px;
}
[dir="ltr"] .address-map-view .map-search-bar input {
    padding: 12px 15px 12px 45px;
}
[dir="ltr"] .address-map-view .map-search-bar i {
    right: auto;
    left: 15px;
}
