Files
webgis-poverty-pontianak/assets/css/style.css
T
2026-05-06 10:05:49 +07:00

440 lines
8.2 KiB
CSS

/* Reset & Base */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body, html {
height: 100%;
font-family: 'Google Sans Flex', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
overflow: hidden;
}
/* Map Container */
#map {
width: 100vw;
height: 100vh;
z-index: 1; /* Di bawah UI element */
}
/* Custom UI Container over Map */
.ui-container {
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
width: 100%;
max-width: 400px;
display: flex;
flex-direction: column;
gap: 10px;
padding: 0 15px;
}
/* Search Bar */
.search-bar {
display: flex;
align-items: center;
background-color: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
overflow: hidden;
height: 48px;
transition: box-shadow 0.3s;
}
.search-bar:focus-within {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.search-icon {
padding: 0 15px;
color: #666;
display: flex;
align-items: center;
justify-content: center;
}
.search-input {
flex: 1;
border: none;
outline: none;
font-size: 16px;
padding: 10px 0;
color: #333;
}
.search-clear {
padding: 0 15px;
color: #999;
cursor: pointer;
background: none;
border: none;
display: flex;
align-items: center;
justify-content: center;
visibility: hidden; /* Muncul jika ada input */
}
.search-clear:hover {
color: #333;
}
/* Custom Layer Control Button */
.custom-layer-btn {
position: absolute;
top: 20px;
right: 20px;
z-index: 1000;
background-color: white;
border-radius: 8px;
width: 48px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
cursor: pointer;
border: none;
color: #333;
}
.custom-layer-btn:hover {
background-color: #f8f9fa;
}
.custom-layer-panel {
position: absolute;
top: 80px;
right: 20px;
z-index: 1000;
background-color: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: 15px;
width: 250px;
display: none; /* Default tertutup */
}
.custom-layer-panel h3 {
margin-bottom: 10px;
font-size: 16px;
border-bottom: 1px solid #eee;
padding-bottom: 5px;
}
.layer-option {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
font-size: 14px;
}
/* Popup Form */
.popup-form {
display: flex;
flex-direction: column;
gap: 10px;
width: 200px;
}
.popup-form label {
font-size: 12px;
font-weight: bold;
color: #555;
}
.popup-form input[type="text"],
.popup-form input[type="number"] {
width: 100%;
padding: 6px;
border: 1px solid #ccc;
border-radius: 4px;
}
.popup-form .radio-group {
display: flex;
gap: 10px;
}
.popup-form button {
padding: 8px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: bold;
}
.popup-form button.btn-danger {
background-color: #dc3545;
}
.popup-form button:hover {
opacity: 0.9;
}
/* Action Menu (Kiri) */
.action-menu {
position: absolute;
z-index: 1000;
background: transparent;
box-shadow: none;
padding: 0;
display: flex;
flex-direction: column;
gap: 10px;
width: 200px;
}
.action-menu button {
padding: 10px 15px;
background-color: white;
border: none;
border-radius: 25px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
cursor: pointer;
text-align: left;
font-size: 13px;
font-weight: 500;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 8px;
}
.action-menu button i {
width: 16px;
text-align: center;
}
.action-menu button:hover {
background-color: #f8f9fa;
transform: translateX(5px);
}
.action-menu button.active {
background-color: #007bff;
color: white;
box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}
/* Unified Modal */
.unified-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
z-index: 2000;
align-items: center;
justify-content: center;
}
.unified-modal.show {
display: flex;
}
.modal-content {
background-color: white;
border-radius: 8px;
width: 400px;
max-width: 90%;
box-shadow: 0 4px 20px rgba(0,0,0,0.2);
display: flex;
flex-direction: column;
}
.modal-header {
padding: 15px;
border-bottom: 1px solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
font-size: 16px;
margin: 0;
}
.modal-close {
font-size: 20px;
font-weight: bold;
cursor: pointer;
color: #888;
}
.modal-close:hover {
color: #333;
}
.modal-body {
padding: 15px;
display: flex;
flex-direction: column;
gap: 12px;
}
.modal-body label {
font-size: 13px;
font-weight: 600;
color: #444;
}
.modal-body input[type="text"],
.modal-body input[type="number"],
.modal-body select,
.modal-body textarea {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 14px;
}
.modal-footer {
padding: 15px;
border-top: 1px solid #eee;
display: flex;
justify-content: flex-end;
gap: 10px;
}
.btn-save {
background-color: #007bff;
color: white;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
}
.btn-cancel {
background-color: #f8f9fa;
border: 1px solid #ddd;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
}
.form-group {
display: flex;
flex-direction: column;
gap: 4px;
}
/* Custom Cursor Tooltip */
.custom-cursor-tooltip {
position: absolute;
display: none;
background-color: rgba(0, 0, 0, 0.75);
color: white;
padding: 6px 12px;
border-radius: 4px;
font-size: 13px;
font-weight: 500;
pointer-events: none; /* Supaya tidak menghalangi klik ke map */
z-index: 9999;
white-space: nowrap;
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
/* Sembunyikan default tooltip Leaflet Draw */
.leaflet-draw-tooltip {
display: none !important;
}
/* Sub-layer collapsible */
.layer-group-item {
margin-bottom: 6px;
}
.layer-group-item > .layer-group-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.layer-toggle-icon {
cursor: pointer;
padding: 2px 6px;
color: #666;
font-size: 11px;
border-radius: 4px;
transition: background 0.2s;
flex-shrink: 0;
}
.layer-toggle-icon:hover {
background: #f0f0f0;
color: #333;
}
.layer-toggle-icon i {
transition: transform 0.2s;
}
.layer-toggle-icon.collapsed i {
transform: rotate(-90deg);
}
.sub-layer-list {
padding-left: 18px;
margin-top: 4px;
border-left: 2px solid #eee;
overflow: hidden;
transition: max-height 0.2s ease;
}
.sub-option {
font-size: 12px !important;
color: #555;
margin-bottom: 3px !important;
}
/* ===== Emoji Marker (Pin Bubble) ===== */
.emoji-marker {
display: flex;
flex-direction: column;
align-items: center;
pointer-events: none;
}
.emoji-marker .bubble {
width: 38px;
height: 38px;
border-radius: 50% 50% 50% 0;
transform: rotate(-45deg);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 3px 10px rgba(0,0,0,0.25);
border: 2px solid rgba(255,255,255,0.8);
animation: markerPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
.emoji-marker .bubble span {
transform: rotate(45deg);
font-size: 18px;
line-height: 1;
}
@keyframes markerPop {
0% { transform: rotate(-45deg) scale(0); }
100% { transform: rotate(-45deg) scale(1); }
}
/* Warna bubble per tipe */
.emoji-marker .bubble.spbu-24 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.emoji-marker .bubble.spbu-not24 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.emoji-marker .bubble.ibadah { background: linear-gradient(135deg, #f97316, #ea580c); }
.emoji-marker .bubble.miskin-in { background: linear-gradient(135deg, #ef4444, #dc2626); }
.emoji-marker .bubble.miskin-out { background: linear-gradient(135deg, #22c55e, #16a34a); }