/**
 * Nathakra Interactive Map - Styles
 * Dark Fantasy Theme
 *
 * All classes prefixed with 'nkm-' (Nathakra Map) for WordPress compatibility
 */

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0d0d14;
    color: #e8e8e8;
}

/* Main Container */
.nkm-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #0d0d14;
}

.nkm-container.nkm-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

/* Header Bar */
.nkm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 2px solid #d4af37;
    z-index: 1000;
}

.nkm-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #d4af37;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.nkm-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search Box */
.nkm-search-wrapper {
    position: relative;
}

.nkm-search {
    width: 250px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #e8e8e8;
    background-color: #1a1a2e;
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.nkm-search:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.nkm-search::placeholder {
    color: #6b6b8d;
}

/* Search Results Dropdown */
.nkm-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background-color: #1a1a2e;
    border: 1px solid #3d3d5c;
    border-top: none;
    border-radius: 0 0 4px 4px;
    display: none;
    z-index: 1001;
}

.nkm-search-results.nkm-active {
    display: block;
}

.nkm-search-result {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #2a2a4a;
    transition: background-color 0.15s;
}

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

.nkm-search-result:hover,
.nkm-search-result.nkm-highlighted {
    background-color: #2a2a4a;
}

.nkm-search-result-name {
    font-weight: 500;
    color: #e8e8e8;
}

.nkm-search-result-category {
    font-size: 0.75rem;
    color: #d4af37;
    margin-top: 2px;
}

.nkm-search-no-results {
    padding: 10px 12px;
    color: #6b6b8d;
    font-style: italic;
}

/* Buttons */
.nkm-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background-color: #1a1a2e;
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    color: #d4af37;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.nkm-btn:hover {
    background-color: #2a2a4a;
    border-color: #d4af37;
}

.nkm-icon {
    width: 20px;
    height: 20px;
}

/* Map Container */
.nkm-map {
    flex: 1;
    width: 100%;
    background-color: #0a0a12;
}

/* Coordinate Display */
.nkm-coords {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    background-color: rgba(26, 26, 46, 0.9);
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #a0a0b8;
    z-index: 1000;
    font-family: 'Consolas', 'Monaco', monospace;
}

.nkm-coords.nkm-copied {
    border-color: #d4af37;
    color: #d4af37;
}

/* Info Panel (side panel for location details) */
.nkm-info {
    position: absolute;
    top: 60px;
    right: -350px;
    width: 320px;
    max-height: calc(100vh - 80px);
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-left: 2px solid #d4af37;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.nkm-info.nkm-active {
    right: 0;
}

.nkm-info-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: 1px solid #3d3d5c;
    border-radius: 4px;
    color: #a0a0b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.nkm-info-close:hover {
    color: #d4af37;
    border-color: #d4af37;
}

.nkm-info-title {
    margin: 0 0 12px 0;
    padding-right: 30px;
    font-size: 1.3rem;
    color: #d4af37;
    border-bottom: 1px solid #3d3d5c;
    padding-bottom: 10px;
}

.nkm-info-desc {
    margin: 0 0 16px 0;
    line-height: 1.6;
    color: #c8c8d8;
}

.nkm-info-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #d4af37 0%, #b8962e 100%);
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nkm-info-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Leaflet Customizations */
.nkm-map .leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #d4af37;
    border-radius: 6px;
    color: #e8e8e8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nkm-map .leaflet-popup-tip {
    background: #1a1a2e;
    border: 1px solid #d4af37;
    border-top: none;
    border-left: none;
}

.nkm-map .leaflet-popup-close-button {
    color: #a0a0b8;
}

.nkm-map .leaflet-popup-close-button:hover {
    color: #d4af37;
}

/* Custom Popup Content */
.nkm-popup {
    min-width: 150px;
}

.nkm-popup-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #d4af37;
}

.nkm-popup-category {
    margin: 0 0 8px 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8888aa;
}

.nkm-popup-desc {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #c8c8d8;
}

.nkm-popup-link {
    display: inline-block;
    padding: 6px 12px;
    background: #d4af37;
    color: #1a1a2e;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.nkm-popup-link:hover {
    background: #f4c430;
}

/* Leaflet Controls Styling */
.nkm-map .leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nkm-map .leaflet-control-zoom a {
    background-color: #1a1a2e;
    color: #d4af37;
    border: 1px solid #3d3d5c;
}

.nkm-map .leaflet-control-zoom a:hover {
    background-color: #2a2a4a;
    color: #f4c430;
}

.nkm-map .leaflet-control-zoom-in {
    border-radius: 4px 4px 0 0;
}

.nkm-map .leaflet-control-zoom-out {
    border-radius: 0 0 4px 4px;
}

/* Attribution */
.nkm-map .leaflet-control-attribution {
    background: rgba(26, 26, 46, 0.8);
    color: #6b6b8d;
    font-size: 0.7rem;
}

.nkm-map .leaflet-control-attribution a {
    color: #d4af37;
}

/* Custom Marker Icons */
.nkm-marker-icon {
    background: none;
    border: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nkm-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
    }

    .nkm-title {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
    }

    .nkm-controls {
        width: 100%;
        justify-content: center;
    }

    .nkm-search {
        width: 200px;
    }

    .nkm-info {
        width: 100%;
        right: -100%;
        top: auto;
        bottom: 0;
        max-height: 50vh;
        border-left: none;
        border-top: 2px solid #d4af37;
    }

    .nkm-info.nkm-active {
        right: 0;
    }
}

/* Scrollbar Styling */
.nkm-search-results::-webkit-scrollbar,
.nkm-info::-webkit-scrollbar {
    width: 8px;
}

.nkm-search-results::-webkit-scrollbar-track,
.nkm-info::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.nkm-search-results::-webkit-scrollbar-thumb,
.nkm-info::-webkit-scrollbar-thumb {
    background: #3d3d5c;
    border-radius: 4px;
}

.nkm-search-results::-webkit-scrollbar-thumb:hover,
.nkm-info::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}
