/* ============================================
   EDHT-B — Welcome Screen Styles
   Battlefield Scenario Generator overlay
   ============================================ */

/* --- Overlay Container --- */

#welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--bg-primary, #0a0e14);
    display: flex;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#welcome-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Header --- */

.welcome-header {
    text-align: center;
    padding: 18px 20px 10px;
    border-bottom: 1px solid var(--border-color, #1e2a3a);
    flex-shrink: 0;
}

.welcome-header .welcome-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--accent-primary, #5d8a68);
}

.welcome-header .welcome-subtitle {
    font-size: 12px;
    color: var(--text-muted, #546e7a);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* --- Main Content Layout --- */

.welcome-content {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
}

/* --- Map Area --- */

.welcome-map-area {
    flex: 1;
    position: relative;
    min-width: 0;
}

#welcome-map {
    width: 100%;
    height: 100%;
    background: var(--bg-primary, #0a0e14);
}

.welcome-map-instructions {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 14, 20, 0.85);
    border: 1px solid var(--border-color, #1e2a3a);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary, #8899a6);
    z-index: 1000;
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* --- Sidebar Panel --- */

.welcome-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-left: 1px solid var(--border-color, #1e2a3a);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-secondary, #0d1117);
}

.welcome-section {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color, #1e2a3a);
}

.welcome-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted, #546e7a);
    margin-bottom: 10px;
}

/* --- Selected Regions List --- */

.welcome-region-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.welcome-region-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
    color: var(--text-primary, #cdd9e5);
    cursor: pointer;
}

.welcome-region-list li:hover {
    color: var(--accent-primary, #5d8a68);
}

.welcome-region-list li .region-remove {
    margin-left: auto;
    color: var(--text-muted, #546e7a);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.welcome-region-list li .region-remove:hover {
    color: var(--hostile-color, #ef5350);
}

.welcome-region-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary, #5d8a68);
    flex-shrink: 0;
}

.welcome-region-empty {
    font-size: 11px;
    color: var(--text-muted, #546e7a);
    font-style: italic;
}

/* --- Config Controls --- */

.welcome-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.welcome-config-label {
    font-size: 11px;
    color: var(--text-secondary, #8899a6);
    letter-spacing: 0.5px;
}

.welcome-config-select {
    background: var(--bg-primary, #0a0e14);
    color: var(--text-primary, #cdd9e5);
    border: 1px solid var(--border-color, #1e2a3a);
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    border-radius: 3px;
    min-width: 120px;
    cursor: pointer;
}

.welcome-config-select:focus {
    outline: none;
    border-color: var(--accent-primary, #5d8a68);
}

/* --- Operation Name --- */

.welcome-opname {
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-opname-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-primary, #5d8a68);
    letter-spacing: 1px;
    flex: 1;
}

.welcome-opname-regen {
    background: none;
    border: 1px solid var(--border-color, #1e2a3a);
    color: var(--text-muted, #546e7a);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 3px;
    line-height: 1;
}

.welcome-opname-regen:hover {
    color: var(--accent-primary, #5d8a68);
    border-color: var(--accent-primary, #5d8a68);
}

/* --- Buttons --- */

.welcome-launch-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-primary, #5d8a68);
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}

.welcome-launch-btn:hover {
    background: #4a7454;
}

.welcome-launch-btn:active {
    transform: scale(0.98);
}

.welcome-launch-btn:disabled {
    background: var(--border-color, #1e2a3a);
    color: var(--text-muted, #546e7a);
    cursor: not-allowed;
}

.welcome-continue-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-cyan, #80cbc4);
    color: #0c0c0c;
    border: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: inherit;
    transition: background 0.2s, transform 0.1s;
}

.welcome-continue-btn:hover {
    background: #9ad5cf;
}

.welcome-continue-btn:active {
    transform: scale(0.98);
}

.welcome-clear-btn {
    background: none;
    border: 1px solid rgba(239, 83, 80, 0.3);
    color: var(--accent-red, #ef5350);
    font-size: 14px;
    cursor: pointer;
    padding: 0 10px;
    border-radius: 4px;
    font-family: var(--font-icon);
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.welcome-clear-btn:hover {
    background: rgba(239, 83, 80, 0.15);
    border-color: var(--accent-red, #ef5350);
}

.welcome-skip-btn {
    width: 100%;
    padding: 8px;
    background: none;
    color: var(--text-muted, #546e7a);
    border: 1px solid var(--border-color, #1e2a3a);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 8px;
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s;
}

.welcome-skip-btn:hover {
    color: var(--text-secondary, #8899a6);
    border-color: var(--text-muted, #546e7a);
}

.welcome-new-scenario-btn {
    background: none;
    border: 1px solid var(--border-color, #1e2a3a);
    color: var(--text-muted, #546e7a);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 3px;
    font-family: inherit;
    margin-top: 6px;
    transition: color 0.2s, border-color 0.2s;
}

.welcome-new-scenario-btn:hover {
    color: var(--accent-primary, #5d8a68);
    border-color: var(--accent-primary, #5d8a68);
}

/* --- Region overlay on map --- */

.region-overlay-selected {
    stroke: var(--accent-primary, #5d8a68) !important;
    stroke-width: 2 !important;
    fill: var(--accent-primary, #5d8a68) !important;
    fill-opacity: 0.15 !important;
}

.region-overlay-hover {
    fill-opacity: 0.1 !important;
}

/* --- Responsive --- */

@media (max-width: 900px) {
    .welcome-content {
        flex-direction: column;
    }
    .welcome-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color, #1e2a3a);
        max-height: 45vh;
    }
    .welcome-map-area {
        min-height: 40vh;
    }
}

/* --- Region info tooltip on map --- */

.region-tooltip {
    background: rgba(10, 14, 20, 0.9) !important;
    border: 1px solid var(--border-color, #1e2a3a) !important;
    color: var(--text-primary, #cdd9e5) !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    font-family: inherit !important;
    letter-spacing: 0.5px !important;
}

.region-tooltip::before {
    display: none !important;
}

/* --- Faction preview under selected regions --- */

.welcome-faction-preview {
    font-size: 10px;
    color: var(--text-muted, #546e7a);
    padding: 2px 0 2px 16px;
    line-height: 1.4;
}

.welcome-faction-preview .faction-friendly {
    color: var(--friendly-color, #42a5f5);
}

.welcome-faction-preview .faction-hostile {
    color: var(--hostile-color, #ef5350);
}

.welcome-faction-preview .faction-neutral {
    color: var(--neutral-color, #66bb6a);
}

/* --- Loading animation --- */

.welcome-generating {
    text-align: center;
    padding: 20px;
    color: var(--accent-primary, #5d8a68);
    font-size: 12px;
    letter-spacing: 1px;
}

.welcome-generating::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent-primary, #5d8a68);
    border-top-color: transparent;
    border-radius: 50%;
    animation: welcome-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes welcome-spin {
    to { transform: rotate(360deg); }
}
