/* public_html/assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --dark: #0f172a;
    --light: #f8fafc;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --border: #e2e8f0;
    --radius: 16px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    height: 100vh;
    overflow: hidden;
    background: #e0e7ff;
}

/* --- LAYOUT --- */
#app-container { position: relative; width: 100%; height: 100%; display: flex; }
#map { flex: 1; z-index: 1; background: #94a3b8; }

/* --- FLOATING PANELS --- */
.panel {
    position: absolute;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid white;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar (Left) */
#sidebar {
    top: 20px; left: 20px; bottom: 20px;
    width: 320px;
    padding: 0;
    overflow: hidden;
}

/* Details Panel (Slide out from Right) */
#details-panel {
    top: 20px; bottom: 20px; width: 350px;
    right: -400px; /* Hidden */
}
#details-panel.active { right: 20px; }

/* --- UI ELEMENTS --- */
.p-head {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.5);
}
.p-body { flex: 1; overflow-y: auto; padding: 20px; }
.p-foot { padding: 15px 20px; border-top: 1px solid var(--border); background: white; }

.btn-primary-custom {
    background: var(--primary); color: white; border: none;
    padding: 10px 16px; border-radius: 10px; font-weight: 500;
    transition: 0.2s;
}
.btn-primary-custom:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* Drawing Controls (Floating Bottom Center) */
#draw-controls {
    position: absolute;
    bottom: 40px; left: 50%; transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 2000;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    transform: translate(-50%, 20px);
}
#draw-controls.visible {
    opacity: 1; pointer-events: auto; transform: translate(-50%, 0);
}

/* Stats Badges */
.stat-badge {
    padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}
.bg-avail { background: #dcfce7; color: #166534; }
.bg-sold { background: #fee2e2; color: #991b1b; }
.bg-zone { background: #e0e7ff; color: #3730a3; }

/* Loader */
#loader {
    position: fixed; 
    inset: 0; 
    z-index: 9999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    
    /* Flexbox centering logic here instead of HTML classes */
    display: none; /* Hidden by default in CSS, JS will toggle flex */
    flex-direction: column;
    align-items: center; 
    justify-content: center;
}

.btn-mode {
    background: white;
    color: var(--dark);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.btn-mode:hover {
    background-color: #f1f5f9;
}

.btn-mode.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}





#detailsForm.view-mode input,
#detailsForm.view-mode select,
#detailsForm.view-mode textarea {
    background-color: transparent;
    border: none;
    padding: 0;
    font-weight: 600;
    color: var(--dark);
    pointer-events: none; /* Disables clicking */
    -webkit-appearance: none; /* Removes Dropdown Arrow */
    resize: none;
}

/* Hide specific elements based on mode */
#detailsForm.view-mode .edit-only { display: none !important; }
#detailsForm:not(.view-mode) .view-only { display: none !important; }

/* File List Styling */
.file-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px; background: white; border: 1px solid var(--border);
    border-radius: 8px; margin-bottom: 8px; transition: 0.2s;
}
.file-item:hover { transform: translateX(2px); border-color: var(--primary); }
.file-icon {
    width: 36px; height: 36px; background: #f1f5f9; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--dark); margin-right: 12px;
}





/* UI POLISH */
.stat-label { font-size: 0.75rem; text-transform: uppercase; color: #64748b; font-weight: 700; display: block; margin-bottom: 4px; }
.stat-value { font-size: 0.95rem; font-weight: 600; color: #1e293b; display: flex; align-items: center; gap: 8px; }

/* Status Badges */
.badge-status { padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 0.8rem; display: inline-block; }
.st-avail { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.st-sold { 
    background: #fffbeb; 
    color: #b45309; 
    border: 1px solid #fcd34d; 
}.st-res { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }

/* Price Tag */
.price-tag { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px; color: #0f172a; }

#file-list {
    display: block !important;
    min-height: 50px;
}

/* STATS GRID */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 15px; }
.stat-card { background: white; padding: 10px; border-radius: 8px; border: 1px solid var(--border); text-align: center; }
.stat-card small { display: block; font-size: 0.65rem; text-transform: uppercase; color: #64748b; font-weight: 700; }
.stat-card strong { display: block; font-size: 1.2rem; color: var(--dark); line-height: 1.2; }

/* TABS IN SIDEBAR */
.sidebar-tabs .nav-link { 
    border: none; border-bottom: 2px solid transparent; 
    color: #64748b; font-size: 0.85rem; padding: 8px 0;
}
.sidebar-tabs .nav-link.active { 
    color: var(--primary); border-bottom-color: var(--primary); background: transparent; font-weight: 600; 
}

/* LIST ITEMS */
.list-item { 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 10px; border-bottom: 1px solid #f1f5f9; background: white; transition: 0.2s; 
}
.list-item:hover { background: #f8fafc; }
.list-content { flex: 1; cursor: pointer; }

/* --- FAB FIX (Click Logic) --- */
.fab-container { position: absolute; bottom: 30px; right: 30px; z-index: 2000; }
.fab-main { 
    width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: white; 
    border: none; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5); font-size: 1.5rem; 
    display: flex; align-items: center; justify-content: center; transition: 0.3s;
    cursor: pointer;
}
.fab-main.active { transform: rotate(45deg); background: #ef4444; }

.fab-menu { 
    position: absolute; bottom: 75px; right: 0; 
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
    opacity: 0; pointer-events: none; transform: translateY(20px); transition: 0.2s; 
}
.fab-menu.active { opacity: 1; pointer-events: auto; transform: translateY(0); }

.fab-item { 
    background: white; padding: 10px 20px; border-radius: 30px; text-decoration: none; 
    color: var(--dark); font-weight: 600; font-size: 0.9rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    display: flex; align-items: center; gap: 10px; transition: 0.2s;
}
.fab-item:hover { transform: translateX(-5px); color: var(--primary); }
/* --- COMPACT SIDEBAR LIST --- */
.sidebar-row { 
    padding: 8px 12px; border-bottom: 1px solid #f1f5f9; background: white; 
    display: flex; align-items: center; justify-content: space-between; 
    transition: 0.2s; cursor: pointer; 
}
.sidebar-row:hover { background: #f8fafc; padding-left: 15px; }
.sidebar-row i { width: 20px; text-align: center; }

/* --- BADGES / PILLS --- */
.badge-st { font-size: 0.65rem; padding: 3px 8px; border-radius: 12px; font-weight: 700; text-transform: uppercase; }
.st-avail { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.st-sold { background: #fffbeb; color: #b45309; border: 1px solid #fcd34d; }
.st-res { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* --- FAB FIX (Hover Bridge) --- */
.fab-menu { bottom: 65px; padding-bottom: 20px; /* Bridge the gap */ }

/* --- TOAST NOTIFICATION --- */
.toast-msg {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.8); color: white; padding: 10px 20px; border-radius: 30px;
    z-index: 9999; animation: fadeUp 0.3s ease-out; font-size: 0.9rem;
    display: flex; align-items: center; gap: 10px;
}
@keyframes fadeUp { from { opacity:0; transform: translate(-50%, 10px); } to { opacity:1; transform: translate(-50%, 0); } }

.leaflet-tooltip.zone-label {
  background: rgba(248, 249, 250, 0.98) !important;
  color: #212529 !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 25px !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12) !important;
  backdrop-filter: blur(20px) !important;
}