﻿
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}
.esri-basemap-toggle {
    border-radius: 12px !important; /* adjust value (8px, 12px, 50%) */
    overflow: hidden;
    bottom: 80px !important;
    
    /* clip inner image to the rounded shape */
}
.esri-basemap-toggle__image {
    border-radius: 12px !important; /* match the parent radius */
    height: 55px !important;
    
}
.sidebar {
    position: fixed;
    top: 0px;
    right: 0px;
    width: 510px;
    background: #fff;
    color: #333;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 20px);
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(0);
    opacity: 1;
}
    .sidebar.collapsed {
        transform: translateX(520px); /* width + spacing */
        opacity: 0;
        pointer-events: none;
    }
    /* Fancy scrollbar for Chrome, Edge, Safari */
    .sidebar::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #f4f4f4;
        border-radius: 8px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, #66bb6a, #2e7d32);
        border-radius: 8px;
        border: 2px solid #f4f4f4;
    }

        .sidebar::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #57a85b, #256d27);
        }

/* Firefox support */
    .sidebar.collapsed {
        transform: translateX(520px);
        opacity: 0;
        pointer-events: none;
    }

.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 10px;
    background: #044442;
    color: white;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #044442;
    color: white;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.open-sidebar-btn {
    position: fixed;
    top: 15px;
    /* move it farther from the sidebar’s right edge */
    right:10px; /* 510px sidebar width + 30px gap */
    width: 40px;
    height: 40px;
    font-size: 22px;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    background: #044442;
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: right 0.3s ease;
}

/* when sidebar is collapsed — move button to screen edge */
.sidebar.collapsed ~ .open-sidebar-btn {
    right: 20px;
}

   
.details-panelnew {
    position: relative;
    
   
    width: 100%;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 188;
    max-height: calc(100% - 20px);
    overflow-y: auto;
    /* Make it always visible */
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.details-panel {
    position: fixed;
    top: 10px;
    right: 523px;
    width: 400px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 188;
    max-height: calc(100% - 20px);
    opacity: 0;
    pointer-events: none; /* disables clicks when hidden */
    transform: translateX(100%); /* slide out to the right */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .details-panel.show {
        opacity: 1;
        pointer-events: auto; /* clickable again */
        transform: translateX(0); /* slide back into view */
        display: flex;
        flex-direction: column;
    }

.details-header {
    display: flex;
    flex-direction: row-reverse;
    align-items: start;
    justify-content: space-between;
    padding: 4px 12px; /* Less vertical space */
    background-color: #044442;
    height: 30px;
    color: wheat;
    border-radius: 0.375rem;
}

.details-body {
    padding: 10px;
    overflow-y: auto;
    height: calc(100% - 50px);
    direction: rtl
}

.details-panel label {
    display: block;
    font-weight: bold;
    margin: 10px 0 5px;
}

.details-panel select,
.details-panel input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.details-body .search-btn {
    background-color: #1e5128;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

    .details-body .search-btn:hover {
        background-color: #2e7d32;
    }
    .details-body .search-btn:disabled {
        background-color: #aaa; /* gray out */
        color: #666;
        cursor: not-allowed;
        opacity: 0.7; /* makes it look inactive */
    }
.close-btn {
    position: absolute;
    top: 10px;
    left: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.panel-title {
    margin-top: 0;
    color: #1e5128;
    font-weight: bold;
}

#paginationControls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; /* Always full width of detailCard */
    min-width: 100%; /* Prevent shrink when fewer cards */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 10px;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    box-sizing: border-box;
}

    /* Style buttons */
    #paginationControls button {
        background: linear-gradient(135deg, #044442, #2E7D32);
        border: none;
        color: white;
        padding: 8px 18px;
        border-radius: 30px;
        font-size: 14px;
        font-weight: bold;
        cursor: pointer;
        box-shadow: 0 3px 6px rgba(0,0,0,0.2);
        transition: all 0.3s ease;
        font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    }

        #paginationControls button:hover {
            background: linear-gradient(135deg, #66BB6A, #388E3C);
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0,0,0,0.25);
        }

        #paginationControls button:disabled {
            background: #ccc;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

    /* Style text in between */
    #paginationControls span {
        font-weight: bold;
        font-size: 14px;
        color: #555;
    }

.org-header {
    display: flex;
    flex-direction: row-reverse; /* Image on right, text on left for Arabic style */
    align-items: center;
    gap: 12px;
}

.org-logo {
    width: 120px; /* Increased size */
    height: 120px; /* Make it square */
    object-fit: contain;
}

.org-title {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.5;
    text-align: right;
    white-space: normal; /* Allow 2 lines */
}

.toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background-color: #006946;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

    .toggle-btn:hover {
        background-color: #006946;
    }

.sidebar-content {
    padding: 15px;
   /* overflow-y: auto;*/
    transition: max-height 0.5s ease, opacity 0.5s ease;
    max-height: 1000px;
    opacity: 1;
}

.collapsed .sidebar-content {
    max-height: 0;
    opacity: 0;
    padding: 0 15px;
}

.welcome {
    font-size: 18px;
    font-weight: 600;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    color: #044442;
    margin: 10px 0;
    text-align: right;
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 8px;
}

.amananame {
    font-size: 18px;
    font-weight: 600;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    color: #044442;
    margin: 15px 0;
    text-align: center;
    direction: rtl;
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center;
    gap: 10px;
    position: relative;
}

    /* Decorative line on both sides */
    .amananame::before,
    .amananame::after {
        content: "";
        flex: 1;
        height: 1px;
        background-color: #ccc;
    }

    .amananame span {
        background-color: #fff; /* same as page bg to “cut” lines */
        padding: 0 8px;
    }
.search-box {
    position: relative;
    width: 100%;
    margin-bottom: 12px; /* <-- space under the box */
}

    .search-box input {
        width: 100%;
        padding-right: 35px; /* <-- ensures text/placeholder don't overlap with icon */
        padding-left: 10px;
        height: 36px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background: #f2f2f2;
        box-sizing: border-box;
        direction: rtl;
    }

    .search-box i {
        position: absolute;
        right: 10px; /* put icon inside input on right side */
        top: 50%;
        transform: translateY(-50%);
        color: #888;
        font-size: 16px;
        pointer-events: none;
    }

.card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 8px;
    direction: rtl;
    font-size: 16px;
    text-align: right;
    overflow: visible;
    height: auto;
    position: relative;
}

    .card h3 {
        font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif; /* Arabic-friendly fonts */
        font-size: 16px;
        font-weight: bold;
        color: #2c3e50;
        background: linear-gradient(to right, #e8f5e9, #ffffff); /* Light green to white */
        border-right: 5px solid #3498db;
        padding: 6px 8px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
        direction: rtl;
    }

        .card h3 i {
            margin-right: 6px;
        }

.cardexpand {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 6px,8px;
    border-radius: 6px;
    margin-bottom: 15px;
    direction: rtl;
    text-align: right;
    position: relative; /* Required for absolute positioning inside */
    padding-bottom: 10px; /* Leave space for bottom button */
    padding-top: 1px; /* Leave space for bottom button */
}

    .cardexpand h3 {
        font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif; /* Arabic-friendly fonts */
        font-size: 16px;
        font-weight: bold;
        color: #2c3e50;
        background: linear-gradient(to right, #e8f5e9, #ffffff); /* Light green to white */
        border-right: 5px solid #3498db;
        padding: 6px 8px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
        direction: rtl;
    }

        .cardexpand h3 i {
            margin-right: 6px;
        }

.highlight {
    background-color: #e8f5e9 !important;
    color: #000 !important;
    font-weight: bold; /* can stay bold */
    border: 2px solid #000 !important; /* keep border width same */
}

button.highlight::before {
    content: "✔";
    position: absolute;
    top: 6px; /* adjust as needed */
    right: 6px; /* put in top-right corner */
    color: green;
    font-size: 16px;
}

.highlightdetail {
    background-color: #f0fff0 !important;
    color: white;
    font-weight: bold;
    border: 1px solid #000 !important; /* black border */
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .button-group button {
        padding: 10px 20px;
        border: 1px solid #ccc;
        border-radius: 30px;
        background-color: #f5f5f5; /* light smoke background */
        color: #333;
        font-weight: bold;
        cursor: pointer;
        font-size: 13px;
        font-family: 'Tajawal', 'Cairo', sans-serif; /* Arabic-friendly */
        transition: all 0.3s ease;
    }

        .button-group button:hover {
            background-color: #e0e0e0;
        }

.button-groupexpand {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

    .button-groupexpand button {
        padding: 6px 8px;
        border: 1px solid #ccc;
        border-radius: 30px;
        background-color: #f5f5f5; /* light smoke background */
        color: #333;
        font-weight: bold;
        cursor: pointer;
        font-size: 13px;
        font-family: 'Tajawal', 'Cairo', sans-serif; /* Arabic-friendly */
        transition: all 0.3s ease;
    }

        .button-groupexpand button:hover {
            background-color: #e0e0e0;
        }

.card::after {
    content: "";
    display: table;
    clear: both;
}

.hidden-section {
    display: none;
}

.expanded {
    display: block;
}

.back-button {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: none;
    color: green; /* Bootstrap success green */
    border: none;
    padding: 0;
    font-weight: bold;
    font-size: 16px;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    cursor: pointer;
    text-decoration: underline;
}

/* Detail card below expanded card */
#detailCard {
    position: relative;
    background-color: #f9f9f9; /* match main card */
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px;
    font-size: 14px;
    color: #222;
    direction: rtl;
    text-align: right;
    margin-bottom: 15px;
    margin-left: 0;
    margin-right: 0;
    /* Ensure same width/position inside sidebar */
    width: auto;
    padding-bottom: 60px; /* Keep space for pagination */
}
#detailCard2 {
    position: relative;
    background-color: #e0f7fa; /* light cyan */
    border: 1px solid #bbb;
    border-radius: 6px;
    padding: 6px;
    font-size: 13px;
    color: #000;
    margin-bottom: 8px; /* spacing before detailCard */
    direction: rtl;
    text-align: right;
}
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    color: #333;
    direction: rtl;
}

    .breadcrumb span {
        display: inline-block;
    }

.breadcrumb-sep {
    color: #999;
    font-size: 16px;
}

#siteAmana, #siteSubMun, #siteDist {
    font-weight: bold;
    color: #1e5128; /* أخضر غامق */
}

#expandedButtons {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    gap: 4px; /* tight spacing */
    padding: 5px;
    margin: 5px;
}

    #expandedButtons button {
        /*aspect-ratio: 2 / 1;*/ /* make buttons square */
        /*width: 100%;*/ /* full width of the grid cell */
        /*padding: 0;*/ /* remove padding */
        /*font-size: 15px;
                background-color: white;
                color: #000 !important;
                font-weight: bold;
                border: 2px solid #ccc;
                border-radius: 10px;
                transition: background-color 0.3s ease, color 0.3s ease;
                font-family: 'Tajawal', 'Cairo', sans-serif;
                display: flex;
                align-items: center;
                justify-content: center;
                text-align: center;*/
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        aspect-ratio: 2 / 1;
        width: 100%;
        height: 100%; /* force equal size */
        padding: 6px;
        font-size: 15px;
        font-weight: bold; /* keep normal weight */
        justify-content: center;
        background-color: white;
        color: #000 !important;
        border: 2px solid #ccc;
        text-align: center; /* base border same width as highlight */
        border-radius: 10px;
        box-sizing: border-box; /* 👈 prevents border from growing */
        transition: background-color 0.3s ease, color 0.3s ease;
    }

        #expandedButtons button i {
            font-size: 20px;
            margin-bottom: 4px;
        }

        #expandedButtons button span {
            display: block;
            line-height: 1.2;
        }

        #expandedButtons button:hover {
            background-color: #c8e6c9;
            color: #000000 !important; /* Keep font black on hover */
        }

.card-description {
    font-family: 'Tajawal', 'Cairo', 'Amiri', sans-serif; /* Arabic-friendly */
    font-size: 15px;
    color: #333;
    margin: 8px 0 12px 0;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

#map {
    height: 100%;
    width: 100%;
    position: absolute;
    padding-top: 0 !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1; /* Behind sidebar/header */
}

.card-grid-3col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px; /* tight spacing */
    padding: 3px;
    margin: 2px;
}

.card-label {
    font-weight: bold;
    color: #333;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.card-content {
    flex-grow: 1;
}

.card-row {
    /* margin-bottom: 6px;*/
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 3px;
    /* font-size: 12px;*/
    color: #333;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    white-space: normal; /* ✅ allow wrapping */
    overflow: visible; /* ✅ don't clip */
    text-overflow: unset; /* ✅ disable ellipsis */
}

.card-item {
    border: 1px solid #ccc;
    padding: 4px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 200px;
    border-right: 5px solid #407140;
    height: auto;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 3px; /* tighter spacing between children */
}

.card-link-button {
    align-self: flex-start;
    background: none;
    border: none;
    color: #006946d1;
    padding: 0;
    margin-top: 10px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
}

.card-item.highlightdetail .card-link-button::after {
    content: "✔";
    margin-right: 6px;
    color: green;
    font-size: 16px;
}

.card-link-button:hover {
    color: #0056b3;
    text-decoration: none;
}

.details-title {
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #1b4332; /* deep green for strong contrast */
    background: #f0fff0; /* soft green gradient */
    border-right: 6px solid #40916c; /* accent green on right (RTL style) */
    padding: 6px 8px;
    margin-bottom: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-align: right;
    direction: rtl;
}

#map .esri-popup__main-container {
    width: 350px !important;
    fixed width max-width: 350px !important;
}

#map .esri-popup__content {
    max-height: 600px !important;
    control inner scroll area overflow: auto !important;
}
.esri-popup__footer {
    padding: 2px 6px !important;
    font-size: 11px !important;
    min-height: 22px !important;
    direction: rtl
}


.esri-popup__navigation {
    display: none !important;
}
    .esri-popup__footer .esri-popup__button {
        background-color: #136a6a !important;
        color: white !important;
        border: none !important;
        border-radius: 8px;
        padding: 6px 14px;
        font-weight: bold;
        cursor: pointer !important; /* force clickable */
        pointer-events: auto !important; /* re-enable clicks */
        opacity: 1 !important; /* ensure it looks active */
        transition: transform 0.15s ease-in-out;
    }
        .esri-popup__footer .esri-popup__button:hover,
        .esri-popup__footer .esri-popup__button:focus,
        .esri-popup__footer .esri-popup__button:active {
            background-color: #136a6a !important;
            color: white !important;
        }
/* overlay */
.loader {
    position: fixed; /* or absolute if you want it only over a specific container */
    inset: 0; /* top/right/bottom/left: 0 */
    background: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 9999;
    flex-direction: column;
    font-family: 'Cairo','Tajawal',sans-serif;
}
.loader.hidden { display: none; }

/* spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #e0e0e0;
  border-top-color: #2e7d32;   /* green accent */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.msg { color:#044442; font-weight:600; }
/* Tabs */
.tab-buttons {
    display: flex;
    flex-direction: row-reverse; /* RTL: first tab appears on right */
    border-bottom: 2px solid #ccc;
}

.tab-btn {
    flex: 1;
    padding: 8px;
    cursor: pointer;
    background: #f1f1f1;
    border: none;
    border-right: 1px solid #ccc; /* because RTL */
    font-weight: bold;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
}

    .tab-btn:last-child {
        border-right: none;
    }

    .tab-btn.active {
        background: #fff;
        border-bottom: 2px solid forestgreen;
        color: forestgreen;
    }

.tab-content {
    padding: 10px;
    background: #fff;
    direction: rtl; /* make content RTL */
    text-align: right;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif;
}

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
    }
/* Wrapper for actions */
.tab-actions {
    display: flex;
    justify-content: flex-end; /* button on the right for Arabic UI */
    margin-bottom: 8px;
}

/* Add button */

.btn-add {
    background-color: whitesmoke; /* light gray/white-smoke background */
    color: #212529; /* Bootstrap default text color */
    width: 100%;
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 0.375rem; /* Bootstrap-style corners */
    font-size: 16px;
    font-weight: bolder;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center; /* centers text and icons */
    gap: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    /* Hover effect */
    .btn-add:hover {
        background-color: #e6e6e6; /* slightly darker whitesmoke */
        border-color: #bbb;
    }

    /* Active click effect */
    .btn-add:active {
        transform: scale(0.98);
        background-color: #dcdcdc;
    }

    /* Focus ring like Bootstrap */
    .btn-add:focus {
        outline: none;
        box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25);
    }
/* Delete button */
.btn-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #e53935;
    font-size: 18px;
    transition: 0.3s;
}

    .btn-delete:hover {
        color: #b71c1c;
    }
.map-back-btn {
    position: absolute;
    top: 15px; /* below navbar */
    left: 60px;
    z-index: 999;
    background: #044442;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    cursor: pointer;
}

    .map-back-btn:hover {
        background: #066e6b;
    }

.tab-actions {
    display: flex;
    justify-content: flex-end; /* button on the right for Arabic UI */
    margin-bottom: 8px;
}

/* Add button */


/* Delete button */
.btn-delete {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #e53935;
    font-size: 18px;
    transition: 0.3s;

}

    .btn-delete:hover {
        color: #b71c1c;
    }
.btn-search {
    background-color: #4caf50; /* Green base */
    width: 15%;
    border: none;
    
    color: #fff;
    padding: 6px 14px;
    font-weight:bold;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-align:center;
    transition: background-color 0.3s, transform 0.2s;
}

    .btn-search i {
        font-size: 16px;
    }

    

    .btn-search:active {
        background-color: #388e3c; /* Even darker on click */
        transform: translateY(0);
    }
/* Table styling */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    text-align: center;
    direction: rtl;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    font-size: 13px;
    padding-top:4px;
}

    .custom-table th {
        background: #f7f7f7;
        padding: 8px;
        font-weight: bold;
        border-bottom: 2px solid #ddd;
    }

    .custom-table td {
        padding: 6px;
        border-bottom: 1px solid #eee;
    }

    .custom-table tr:hover {
        background: #f9f9f9;
    }

    /* Inputs inside table */
    .custom-table input.form-control {
     /*   width: 60%;*/
        padding: 4px;
        font-weight:bold;
        font-size: 12px;
        border: 1px solid #ccc;
        border-radius: 4px;
        text-align: center;
        text-align:center
    }
.form-control {
    height: 20px !important;
   /* width: 60% !important;*/
}
/* Overlay (background) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal box */
.modal-content {
    background: #fff;
    border-radius: 10px;
   /* width: 450px;*/
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    animation: fadeIn 0.3s ease;
}

/* Header */
.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

    .details-header h4 {
        margin: 0;
    }

/* Close button */
.toggle-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    transition: 0.3s;
}

    .toggle-btn:hover {
        color: red;
    }

/* Modal open/close animation */
@keyframes fadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Table styling */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

    .custom-table th, .custom-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: center;
    }

/* Buttons */
.btn-add {
    background-color: whitesmoke;
    color: #212529;
    width: 100%;
    height:50px;
    padding: 6px 14px;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-add:hover {
        background-color: #e6e6e6;
        border-color: #bbb;
    }
.btn-add2 {
    background-color: lightgray;
    color: black;
    
    padding: 6px 14px;
   /* border: 1px solid #ccc;*/
    border-radius: 0.375rem;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-add2:hover {
        background-color: #e6e6e6;
        border-color: #bbb;
    }
.btn-search {
    background-color: #0d6efd;
    color: #fff;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .btn-search:hover {
        background-color: #0b5ed7;
    }
/* ==== Button ==== */

/* ==== Button ==== */
.btn-show {
    background-color: forestgreen;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px 2px;
    
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}

    .btn-show:hover {
        background-color: #228b22;
    }

/* ==== Sidebar (Modal Style) ==== */
.side-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

    .side-modal.open {
        transform: translateX(0);
    }

/* ==== Modal Header ==== */
.modal-header {
    background: whitesmoke;
    padding: 10px 15px;
    border-bottom: 1px solid #ccc;
    display: flex;
    /*justify-content: center;
    align-items: center;
    position: center;
    text-align:center;*/
    top: 0;
    z-index: 10;
}

    .modal-header h3 {
        margin: 0;
        font-size: 18px;
    }

.close-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #444;
}

    .close-btn:hover {
        color: #000;
    }

/* ==== Accordion Layer ==== */
.layer-section {
    border-bottom: 1px solid #eee;
   
}

.layer-header {
    background: #fafafa;
    padding: 10px 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

    .layer-header:hover {
        background: #f0f0f0;
    }

    .layer-header::after {
        content: "▸";
        font-size: 14px;
        transition: transform 0.3s;
    }

    .layer-header.active::after {
        transform: rotate(90deg);
    }
    
.delete-layer-btn {
    background: none;
    border: none;
    color: #d9534f;
    font-size: 14px;
    font-weight:bold;
    cursor: pointer;
    transition: color 0.2s ease;
    /* 🧠 Push button to the far left (for LTR) */
    margin-left: auto;
}
.toggle-visibility-btn {
    background: none;
    border: none;
    color: #645757;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    /* 🧠 Push button to the far left (for LTR) */
    margin-left: auto;
}
    .delete-layer-btn:hover {
        color: #b52b27;
    }
.layer-content {
    display: none;
    padding: 10px;
    background: #fff;
    overflow: auto;
    height: 100%;
}

/* ==== Table ==== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    border: 1px solid #ddd;
    padding: 6px 10px;
    text-align: center;
}

th {
    background: #f3f3f3;
    font-weight: bold;
}

tr:hover {
    background: #e7f3ff;
    cursor: pointer;
}


/* Custom button */
.custom-btn {
    position: fixed;
    left: 14px;
    top: 150px; /* below zoom controls */
    z-index: 1000;
    background: #044442;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

/* Side panel */
.side-panel {
    position: fixed;
    left: 60px; /* beside button */
    top: 245px;
    width: auto;
    max-width:270px;
  /*  height: 180px; */
    background: #fff;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    border-radius: 4px;
    overflow-y: auto;
    transform: translateX(-300px); /* fully hidden */
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 999;
    visibility: hidden;
    opacity: 0;
}

    .side-panel.open {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }

/* Panel header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #044442;
    color: white;
    border-radius: 4px 4px 0 0;
    height:23px
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: white;
    cursor: pointer;
}

/* Panel content */
.panel-content {
    padding: 10px;
    font-size: 13px;
}
.btn-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px; /* space between buttons */
    margin:6px;
}

.btn-manage {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #f8f8f8;
    border: 1px solid #ccc;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .btn-manage:hover {
        background-color: #eaeaea;
        transform: translateY(-1px);
    }

    .btn-manage i {
        font-size: 16px;
    }
.delete-feature-btn {
    background: none;
    border: none;
    color: #d9534f;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

    .delete-feature-btn:hover {
        color: #b52b27;
    }
/*#map.esri-popup__header {
            padding: 0 4px !important;
            font-size: 11px !important;
            min-height: 0 !important;*/ /* kill default min-height */
/*height: 18px !important;*/ /* shrink header */
/*line-height: 18px !important;
            display: flex !important;
            align-items: center !important;
        }
        #map.esri-popup__header-title {
            font-size: 10px !important;
            font-weight: bold;
            margin: 0 !important;
            padding: 0 !important;
        }
        #map.esri-popup__footer {
            padding: 2px 6px !important;
            font-size: 11px !important;
            min-height: 22px !important;
        }*/

