/**
 * Exploration Map Styles
 * Karten-Modal für Gegenden-Auswahl
 */

/* ===== MODAL CONTAINER ===== */
.region-map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.region-map-modal.visible {
    display: flex;
    justify-content: center;
    align-items: center;
}

.region-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.region-map-content {
    position: relative;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 20px;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

/* ===== HEADER ===== */
.region-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.region-map-header h2 {
    margin: 0;
    color: #e0e0e0;
    font-size: 1.4rem;
}

.region-map-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.region-map-close:hover {
    color: #fff;
}

/* ===== MAP CONTAINER ===== */
.region-map-svg-container {
    flex: 1;
    min-height: 250px;
    background: #0d0d1a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.region-map-svg-container svg {
    width: 100%;
    height: 100%;
}

/* ===== EDGES (Verbindungslinien) ===== */
.region-edge {
    stroke: #444;
    stroke-width: 2;
    fill: none;
}

.region-edge.discovered {
    stroke: #6b8e6b;
    stroke-width: 2;
}

.region-edge.unknown {
    stroke: #333;
    stroke-width: 1;
    stroke-dasharray: 5, 5;
}

/* ===== NODES (Gegenden) ===== */
.region-node {
    cursor: pointer;
}

.region-node:hover .region-node-bg {
    filter: brightness(1.3);
}

.region-node.selected .region-node-bg {
    stroke: #8bc34a;
    stroke-width: 3;
}

.region-node-bg {
    fill: #2d3a2d;
    stroke: #4a6741;
    stroke-width: 2;
    rx: 8;
    ry: 8;
    transition: fill 0.2s, stroke 0.2s;
}

/* Region Status: Discovered (grau - nur entdeckt, nicht erforscht) */
.region-node.region-discovered .region-node-bg {
    fill: #3a3a4a;
    stroke: #555;
}

/* Region Status: Explored (grün - erforscht, sammelbar) */
.region-node.region-explored .region-node-bg {
    fill: #3d5c3d;
    stroke: #4a9d5f;
}

/* Region Status: Start (Lager) */
.region-node.region-start .region-node-bg {
    fill: #4a4a6b;
    stroke: #6b6b9b;
}

.region-node:hover .region-node-bg {
    fill: #3a4a3a;
}

.region-node.unknown .region-node-bg {
    fill: #252530;
    stroke: #444;
}

.region-node.unknown {
    cursor: default;
}

.region-node-icon {
    font-size: 18px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.region-node-label {
    fill: #e0e0e0;
    font-size: 10px;
    text-anchor: middle;
    dominant-baseline: hanging;
}

.region-node.unknown .region-node-label {
    fill: #666;
}

/* ===== SELECTED REGION INFO ===== */
.region-info-panel {
    margin-top: 8px;
    padding: 10px 12px;
    background: #252530;
    border-radius: 6px;
    border: 1px solid #333;
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 70px;
}

.region-info-content {
    flex: 1;
}

.region-info-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.region-info-panel h3 {
    margin: 0;
    color: #8bc34a;
    font-size: 1rem;
}

.region-info-resources {
    color: #888;
    font-size: 0.8rem;
}

.region-info-description {
    color: #aaa;
    font-size: 0.8rem;
    margin: 6px 0 0 0;
}

.region-info-placeholder {
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

/* ===== ACTION BUTTONS ===== */
.region-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.region-action-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.region-action-btn.primary {
    background: #4a6741;
    color: #fff;
}

.region-action-btn.primary:hover {
    background: #5a7a51;
}

.region-action-btn.primary.expedition-mode {
    background: #d97d2d;
}

.region-action-btn.primary.expedition-mode:hover {
    background: #e89449;
}

.region-action-btn.secondary {
    background: #333;
    color: #aaa;
}

.region-action-btn.secondary:hover {
    background: #444;
    color: #fff;
}

/* ===== EMPTY STATE ===== */
.region-map-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.region-map-empty p {
    margin: 10px 0;
}

/* ===== LEGEND ===== */
.region-map-legend {
    display: none;
}

/* ===== ANIMATIONS ===== */
@keyframes region-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.75;
    }
}

.region-node.new-discovery .region-node-bg {
    animation: region-pulse 1.5s ease-in-out 4;
    stroke: #d4a040;
    stroke-width: 2.5;
    opacity: 0.7;
}

.region-node.new-discovery .region-node-icon {
    animation: region-pulse 1.5s ease-in-out 4;
}

/* Manual selection overrides auto-discovery styling */
.region-node.selected.new-discovery .region-node-bg {
    stroke: #8bc34a;
    stroke-width: 3;
    opacity: 1;
    animation: none;
}

