/**
 * Fantasy Settlement Generator - Map Specific Styles
 */

/* SVG Map */
.fsg-map {
    display: block;
    width: 100%;
    height: auto;
    background: #f4e4bc;
    border: 2px solid #8b7355;
    border-radius: 4px;
}

/* Districts */
.fsg-district {
    cursor: pointer;
    transition: opacity 0.2s;
}

.fsg-district:hover {
    opacity: 0.9;
}

.fsg-district[data-revealed="false"] {
    cursor: pointer;
}

.fsg-district[data-revealed="false"]:hover path {
    fill-opacity: 0.8;
}

.fsg-district-label {
    pointer-events: none;
    user-select: none;
}

/* Landmarks */
.fsg-landmark {
    pointer-events: none;
}

/* Roads */
.fsg-map-roads path {
    pointer-events: none;
}

/* Animations */
@keyframes fsg-reveal {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fsg-district.fsg-revealing {
    animation: fsg-reveal 0.5s ease-out;
}

/* Fog Pattern */
.fsg-fog-overlay {
    fill: url(#fsg-fog-pattern);
    pointer-events: none;
}

/* Tooltip */
.fsg-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -10px;
}

.fsg-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
}

.fsg-tooltip-name {
    font-weight: 600;
}

.fsg-tooltip-type {
    font-size: 10px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Map Themes */
.fsg-map-theme-parchment {
    background: #e8d5b0;
    border-color: #6d5a44;
}

.fsg-map-theme-modern {
    background: #ecf0f1;
    border-color: #bdc3c7;
}

/* Interactive States */
.fsg-district.fsg-selected path {
    stroke-width: 2;
    stroke: #ffd700;
}

.fsg-district.fsg-highlighted path {
    filter: brightness(1.1);
}

/* Water Animations */
@keyframes fsg-wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.5px);
    }
}

.fsg-map-background .fsg-water-wave {
    animation: fsg-wave 3s ease-in-out infinite;
}

/* Compass Rose (optional) */
.fsg-compass {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    opacity: 0.6;
}

.fsg-compass-n {
    font-size: 10px;
    fill: #3d2914;
    font-family: serif;
}

/* Scale Bar (optional) */
.fsg-scale-bar {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #666;
}

.fsg-scale-line {
    width: 50px;
    height: 4px;
    background: linear-gradient(to right, #333 50%, transparent 50%);
    background-size: 10px 4px;
    border: 1px solid #333;
}

/* District Type Colors (for reference/debugging) */
.fsg-district[data-type="residential"] path { --district-color: #c4a574; }
.fsg-district[data-type="market"] path { --district-color: #d4a84b; }
.fsg-district[data-type="artisan"] path { --district-color: #b87333; }
.fsg-district[data-type="temple"] path { --district-color: #e8d5b7; }
.fsg-district[data-type="noble"] path { --district-color: #9b59b6; }
.fsg-district[data-type="slums"] path { --district-color: #7f8c8d; }
.fsg-district[data-type="docks"] path { --district-color: #3498db; }
.fsg-district[data-type="garrison"] path { --district-color: #c0392b; }
.fsg-district[data-type="farmland"] path { --district-color: #27ae60; }
.fsg-district[data-type="academic"] path { --district-color: #2c3e50; }
.fsg-district[data-type="foreign"] path { --district-color: #e67e22; }
.fsg-district[data-type="entertainment"] path { --district-color: #e91e63; }

/* Print Styles */
@media print {
    .fsg-map {
        border: 1px solid #000;
    }

    .fsg-district[data-revealed="false"] path {
        fill: #ddd !important;
    }

    .fsg-district-label {
        font-size: 8pt;
    }
}
