.yemen-map-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #fafaf9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.yemen-map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #78350f;
}

.yemen-map-loading .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #fef3c7;
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.yemen-map-wrapper {
    display: flex;
    height: 100%;
    position: relative;
}

/* Sidebar Styles */
.yemen-sidebar {
    width: 320px;
    background: linear-gradient(to bottom, #fffbeb, #fafaf9);
    border-right: 4px solid #f59e0b;
    overflow-y: auto;
    transition: all 0.3s;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.yemen-sidebar:not(.open) {
    width: 0;
    overflow: hidden;
}

.yemen-sidebar-header {
    padding: 24px;
    border-bottom: 2px solid #fbbf24;
    background: linear-gradient(to right, #fef3c7, #fafaf9);
}

.yemen-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.yemen-logo h1 {
    font-size: 20px;
    font-weight: bold;
    color: #78350f;
    margin: 0;
}

.yemen-subtitle {
    font-size: 13px;
    color: #57534e;
    margin: 8px 0 0 0;
}

.yemen-sidebar-content {
    padding: 16px;
}

.yemen-layers-section,
.yemen-regions-section {
    margin-bottom: 24px;
}

.yemen-layers-section h3,
.yemen-regions-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: #57534e;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.yemen-layer-btn,
.yemen-region-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.yemen-layer-btn:hover,
.yemen-region-btn:hover {
    background: #fafaf9;
    border-color: #fbbf24;
}

.yemen-layer-btn.active {
    background: #fffbeb;
    border-color: #fbbf24;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.layer-icon {
    font-size: 24px;
}

.layer-info {
    flex: 1;
}

.layer-name {
    font-size: 14px;
    font-weight: 500;
    color: #1c1917;
}

.layer-name-ar,
.region-ar {
    font-size: 11px;
    color: #78716c;
}

.layer-toggle {
    width: 40px;
    height: 20px;
    background: #d6d3d1;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s;
}

.yemen-layer-btn.active .layer-toggle {
    background: #f59e0b;
}

.layer-toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.yemen-layer-btn.active .layer-toggle::after {
    left: 22px;
}

.yemen-region-btn {
    justify-content: space-between;
}

.yemen-region-btn.active {
    background: #fef3c7;
    color: #78350f;
    font-weight: 600;
}

.yemen-info-box {
    background: linear-gradient(135deg, #fef3c7, #fafaf9);
    padding: 16px;
    border-radius: 8px;
    border: 2px solid #fbbf24;
    display: flex;
    gap: 12px;
}

.info-icon {
    width: 24px;
    height: 24px;
    background: #f59e0b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

.yemen-info-box h4 {
    font-size: 13px;
    font-weight: 600;
    color: #78350f;
    margin: 0 0 4px 0;
}

.yemen-info-box p {
    font-size: 11px;
    color: #57534e;
    margin: 0;
    line-height: 1.5;
}

/* Main Map Area */
.yemen-map-main {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.yemen-topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e7e5e4;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.yemen-menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.yemen-menu-toggle:hover {
    background: #fafaf9;
}

.yemen-topbar h2 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #1c1917;
    margin: 0;
}

.yemen-controls {
    display: flex;
    gap: 8px;
}

.yemen-controls button {
    padding: 8px 12px;
    background: white;
    border: 1px solid #e7e5e4;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.yemen-zoom-in,
.yemen-zoom-out,
.yemen-reset {
    width: 36px;
    font-size: 18px;
    font-weight: bold;
}

.yemen-controls button:hover {
    background: #fafaf9;
    border-color: #d6d3d1;
}

.yemen-export {
    background: #f59e0b !important;
    color: white;
    border: none !important;
    font-weight: 500;
}

.yemen-export:hover {
    background: #d97706 !important;
}

#yemen-map-canvas {
    flex: 1;
    width: 100%;
    cursor: grab;
}

#yemen-map-canvas:active {
    cursor: grabbing;
}

/* Legend */
.yemen-legend {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e7e5e4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    max-width: 280px;
    z-index: 10;
}

.yemen-legend h4 {
    font-size: 13px;
    font-weight: 600;
    color: #1c1917;
    margin: 0 0 12px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #57534e;
    margin-bottom: 8px;
}

.legend-marker {
    width: 16px;
    height: 16px;
    background: #f59e0b;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* Attribution */
.yemen-attribution {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e7e5e4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    font-size: 11px;
    color: #57534e;
    z-index: 10;
}

.yemen-attribution a {
    color: #f59e0b;
    text-decoration: none;
}

.yemen-attribution a:hover {
    text-decoration: underline;
}

/* Region Panel */
.yemen-region-panel {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 700px;
    width: calc(100% - 48px);
    background: white;
    border-radius: 12px;
    border: 2px solid #fbbf24;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 10;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.region-panel-header {
    background: linear-gradient(to right, #f59e0b, #d97706);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.region-panel-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin: 0 0 4px 0;
}

.region-panel-header .region-ar {
    color: #fef3c7;
}

.region-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.2s;
}

.region-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.region-panel-content {
    padding: 20px;
}

.region-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.metric {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    background: #fafaf9;
}

.metric span {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.metric strong {
    display: block;
    font-size: 20px;
    color: #1c1917;
    margin-bottom: 2px;
}

.metric small {
    font-size: 11px;
    color: #78716c;
}

.region-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.region-stats div {
    background: #fafaf9;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #57534e;
}

.region-stats strong {
    color: #1c1917;
}

.region-description {
    background: linear-gradient(to right, #fffbeb, #fafaf9);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fbbf24;
    font-size: 13px;
    color: #57534e;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .yemen-sidebar {
        width: 280px;
    }
    
    .yemen-topbar h2 {
        display: none;
    }
    
    .region-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .yemen-region-panel {
        width: calc(100% - 24px);
        bottom: 12px;
    }
}
