/* Paineel-specific styles */

.back-link {
    color: #ffd700;
    text-decoration: none;
    margin-bottom: 10px;
    display: inline-block;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: #ffed4e;
}

.location-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px;
    background: #2a2a2a;
    border-radius: 4px;
    border: 1px solid #444;
    font-size: 0.9em;
}

.location-nav a {
    color: #ffd700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.location-nav a:hover {
    color: #ffed4e;
}

.location-nav .separator {
    color: #666;
}

.location-nav .current {
    color: #aaa;
}

.adjacent-zones {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.adjacent-button {
    padding: 10px 16px;
    background-color: #2a2a2a;
    border: 1px solid #ffd700;
    color: #ffd700;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.adjacent-button:hover {
    background-color: #ffd700;
    color: #1e1e1e;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.map-viewer {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    height: calc(100vh - 300px);
    min-height: 600px;
}

.map-image-wrapper {
    position: relative;
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Maintain EXACT 4:3 aspect ratio (1200:900) always */
    aspect-ratio: 4 / 3;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-info {
    background: #252525;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.map-info h2 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.locations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    padding: 10px;
    background: #2a2a2a;
    border-left: 3px solid #ffd700;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-item:hover {
    background: #333;
    padding-left: 15px;
}

.location-item-number {
    color: #ffd700;
    font-weight: bold;
    margin-right: 8px;
    min-width: 20px;
    display: inline-block;
}

.location-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-item-name {
    color: #e0e0e0;
    font-size: 14px;
}

.location-item-description {
    color: #999;
    font-size: 12px;
    line-height: 1.3;
}

/* Scrollbar styling */
.map-info::-webkit-scrollbar {
    width: 8px;
}

.map-info::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.map-info::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.map-info::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive design - maintain exact aspect ratio on all screens */
@media (max-width: 1024px) {
    .map-viewer {
        grid-template-columns: 1fr;
        height: auto;
        gap: 15px;
    }

    .map-image-wrapper {
        /* Keep exact 4:3 aspect ratio, just scale smaller */
        aspect-ratio: 4 / 3;
        width: 100%;
        height: auto;
    }

    .map-info {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .map-image-wrapper {
        /* Still maintain exact 4:3 ratio, even smaller */
        aspect-ratio: 4 / 3;
        width: 100%;
        height: auto;
    }

    .map-info {
        max-height: 300px;
    }

    .location-nav {
        flex-wrap: wrap;
    }

    .adjacent-zones {
        justify-content: center;
    }
}

/* Vertical/Portrait screens - keep same aspect ratio */
@media (orientation: portrait) {
    .map-viewer {
        grid-template-columns: 1fr;
        height: auto;
        gap: 15px;
    }

    .map-image-wrapper {
        /* Exact 4:3 ratio maintained on vertical screens */
        aspect-ratio: 4 / 3;
        width: 100%;
        height: auto;
    }

    .map-info {
        max-height: 35vh;
    }
}

/* Very tall screens (vertical monitors) - scale up while keeping ratio */
@media (min-height: 1200px) {
    .map-viewer {
        height: auto;
        max-height: 85vh;
    }

    .map-image-wrapper {
        /* Scale larger but keep exact 4:3 ratio */
        aspect-ratio: 4 / 3;
        width: 100%;
        height: auto;
        max-height: 70vh;
    }

    .map-info {
        max-height: 70vh;
    }
}
