* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.title {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    direction: rtl;
}

.toolbar {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    gap: 10px;
    direction: rtl;
}

.tool-group {
    display: flex;
    gap: 5px;
    padding: 0 10px;
    border-left: 1px solid #ccc;
}

.tool-group:first-child {
    border-left: none;
}

.offline-group {
    display: flex;
    gap: 5px;
    padding: 0 10px;
    border-left: 1px solid #ccc;
    align-items: center;
}

button {
    padding: 5px 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background: #45a049;
}

button.active {
    background: #2E7D32;
}

.offline-button {
    background: #2196F3;
    white-space: nowrap;
}

.offline-button:hover {
    background: #1976D2;
}

.offline-status {
    color: #4CAF50;
    font-size: 14px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    display: none;
    white-space: nowrap;
}

.offline-status.show {
    display: inline-block;
}

#map {
    width: 100%;
    height: 100%;
}

#drawing-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* Map Menu Styles */
.map-menu {
    position: absolute;
    top: 20px;
    left: 80px;
    z-index: 2000;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.menu-toggle i {
    font-size: 20px;
    color: #333;
}

.menu-toggle:hover {
    background: #f5f5f5;
}

.menu-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 5px;
    display: none;
    min-width: 200px;
}

.menu-dropdown.show {
    display: block;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item i {
    margin-left: 8px;
    font-size: 16px;
    color: #2196F3;
}

.offline-status {
    margin-top: 5px;
    padding: 8px 12px;
    border-top: 1px solid #eee;
    color: #4CAF50;
    font-size: 14px;
    text-align: center;
}
