/* Popup Lokasi Styling */
.modal-lokasi-popup {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.modal-lokasi-popup .card {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: none;
    animation: slideInDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Search Input Styling */
#searchLokasiPopup {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    font-size: 0.95rem;
}

#searchLokasiPopup:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    outline: none;
    transform: translateY(-1px);
}

#searchLokasiPopup:focus + button {
    border-color: #dc3545;
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
}

.input-group button {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    border-left: none;
}

.input-group button:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Grid Layout untuk Lokasi */
.lokasi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: #dc3545 #f1f1f1;
}

.lokasi-grid::-webkit-scrollbar {
    width: 6px;
}

.lokasi-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.lokasi-grid::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 3px;
}

/* Item Lokasi dengan Animasi Hover */
.lokasi-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    position: relative;
    overflow: hidden;
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lokasi-item:hover {
    border-color: #dc3545;
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 50%, #ff6b7a 100%);
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
    z-index: 10;
}

.lokasi-item:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    transition: all 0.1s ease;
}

/* Shimmer effect */
.lokasi-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.lokasi-item:hover::before {
    left: 100%;
}

/* Text animation */
.lokasi-item span {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.lokasi-item:hover span {
    transform: translateY(-1px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* Fade in animation untuk items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lokasi-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered animation */
.lokasi-item:nth-child(1) { animation-delay: 0.1s; }
.lokasi-item:nth-child(2) { animation-delay: 0.15s; }
.lokasi-item:nth-child(3) { animation-delay: 0.2s; }
.lokasi-item:nth-child(4) { animation-delay: 0.25s; }
.lokasi-item:nth-child(5) { animation-delay: 0.3s; }
.lokasi-item:nth-child(6) { animation-delay: 0.35s; }
.lokasi-item:nth-child(7) { animation-delay: 0.4s; }
.lokasi-item:nth-child(8) { animation-delay: 0.45s; }

/* Modal animations */
@keyframes slideInDown {
    from { 
        transform: translate(-50%, -60%) scale(0.9); 
        opacity: 0; 
    }
    to { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
}

/* No results message */
.no-results {
    grid-column: 1 / -1;
    padding: 3rem 1rem;
    text-align: center;
    color: #6c757d;
    animation: fadeInUp 0.5s ease;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-lokasi-container .card {
        width: 95vw !important;
        max-height: 70vh !important;
        margin: 1rem !important;
    }
    
    .lokasi-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
        gap: 0.5rem !important;
    }
    
    .lokasi-item {
        padding: 0.6rem !important;
        font-size: 0.85rem !important;
        min-height: 45px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 1rem !important;
    }
    
    .card-header h6 {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .lokasi-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
        gap: 0.4rem !important;
    }
    
    .lokasi-item {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
        min-height: 40px !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    #searchLokasiPopup {
        font-size: 0.9rem !important;
        padding: 0.6rem 0.8rem !important;
    }
}