/* Base styles */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* Map container */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter controls */
.filter-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
    max-width: 300px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.filter-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.collapse-button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    color: #666;
}

.filter-content {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

.filter-content.collapsed {
    max-height: 0;
}

.filter-content:not(.collapsed) {
    max-height: 500px;
}

#searchInput {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.filter-tag {
    padding: 5px 10px;
    background: #f0f0f0;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-tag:hover {
    background: #e0e0e0;
}

.filter-tag.active {
    background: #3498db;
    color: white;
}

/* Marker styles */
.marker {
    width: 20px;
    height: 20px;
    background-color: #3498db;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.marker-visible {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.marker-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #3498db;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: 0;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    70% {
        transform: scale(2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Popup styles */
.maplibregl-popup {
    max-width: 250px !important;
}

.maplibregl-popup-content {
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.popup-content {
    min-width: 200px;
}

.popup-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.popup-title {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.popup-subtitle {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.popup-body {
    margin: 10px 0;
}

.location-info {
    display: flex;
    align-items: center;
    margin: 0;
    color: #555;
    font-size: 14px;
}

.location-icon {
    margin-right: 8px;
    font-size: 16px;
}

.skills-section, .interests-section, .availability-section, .contact-section {
    margin-bottom: 15px;
}

.skills-section h4, .interests-section h4, .availability-section h4, .contact-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.skills-list, .interests-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.skill-tag, .interest-tag {
    padding: 3px 8px;
    background: #e3f2fd;
    border-radius: 12px;
    font-size: 12px;
    color: #1976d2;
}

.interest-tag {
    background: #f3e5f5;
    color: #7b1fa2;
}

.popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: white;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.action-button:active {
    transform: translateY(1px);
}

.connect-button {
    background: #2ecc71;
}

.connect-button:hover {
    background: #27ae60;
}

.message-button {
    background: #9b59b6;
}

.message-button:hover {
    background: #8e44ad;
}

.icon {
    font-size: 16px;
}

/* Map controls */
.maplibregl-ctrl-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.maplibregl-ctrl-group button {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    color: #333;
    transition: all 0.2s ease;
}

.maplibregl-ctrl-group button:hover {
    background: #f5f5f5;
}

/* Navigation control */
.maplibregl-ctrl-group {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.maplibregl-ctrl-group button {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Popup Styles */
.maplibregl-popup-close-button {
    font-size: 18px;
    color: #6B7280;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    background: #F9FAFB;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.maplibregl-popup-close-button:hover {
    background: #F3F4F6;
    color: #374151;
}

.maplibregl-popup-tip {
    border-top-color: white;
}

/* Marker Styles */
.custom-marker {
    cursor: pointer;
}

.user-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    padding: 8px;
    transition: transform 0.3s ease;
}

.user-icon:hover {
    transform: scale(1.1);
}

.user-icon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 15px;
    height: 15px;
    background: inherit;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: -1;
}

.user-icon svg {
    width: 100%;
    height: 100%;
}

/* Animation for user location dot from maplibre */
.maplibregl-user-location-dot {
    background-color: #1e88e5;
    box-shadow: 0 0 0 4px white;
}

.maplibregl-user-location-accuracy-circle {
    background-color: rgba(30, 136, 229, 0.15);
}

/* Search Box */
.search-box {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 300px;
}

#search-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 8px;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-result {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result:hover {
    background: #f9fafb;
}

/* Layer Controls */
.layer-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 220px;
}

.layer-controls h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #4f46e5;
    font-weight: 600;
    text-align: center;
}

.layer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.layer-item:hover {
    background-color: #f5f7fa;
}

.layer-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
}

.layer-item input[type="radio"]:checked {
    border-color: #4f46e5;
}

.layer-item input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #4f46e5;
    border-radius: 50%;
}

.layer-item span {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

/* Filter Panel */
.filter-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 220px;
}

.filter-panel h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #4f46e5;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.filter-options label:hover {
    background: #f9fafb;
}

.popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
    color: white;
}

.action-btn.directions {
    background: #4f46e5;
}

.action-btn.directions:hover {
    background: #4338ca;
}

.action-btn.share {
    background: #10b981;
}

.action-btn.share:hover {
    background: #059669;
}

/* Map Controls */
.maplibregl-ctrl-group {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.maplibregl-ctrl-group button {
    width: 32px;
    height: 32px;
    background-color: white;
}

.maplibregl-ctrl-group button:hover {
    background-color: #f5f5f5;
}

.maplibregl-ctrl-scale {
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 12px;
    color: #4B5563;
    font-weight: 500;
}

/* Layer Switcher */
.layer-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 220px;
}

.layer-switcher h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #4f46e5;
    font-weight: 600;
}

.layer-switcher select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.layer-switcher select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.layer-switcher button {
    width: 100%;
    padding: 10px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.layer-switcher button:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

/* Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
} 