:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --primary-color: #4a90e2;
    --hover-color: #357abd;
    --border-color: #e0e0e0;
    --sidebar-bg: #f8f9fa;
    --input-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --primary-color: #2d7dd2;
    --hover-color: #1a5c9e;
    --border-color: #404040;
    --sidebar-bg: #2d2d2d;
    --input-bg: #404040;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: row;
    background-color: var(--bg-color);
    color: var(--text-color);
}

#map {
    flex: 1;
    min-width: 0;
    height: 100vh;
    background: var(--bg-color);
}

.sidebar {
    width: 350px;
    background: var(--sidebar-bg);
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.theme-switcher {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.point-form {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.point-form h2 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.point-form input,
.point-form textarea {
    width: 94%;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-color);
    transition: all 0.3s ease;
}

.point-form input:focus,
.point-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.point-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.point-form button:hover {
    background: var(--hover-color);
}

.point-item {
    background: var(--bg-color);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.point-item h3 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.save-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.save-section button {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.save-section button:hover {
    background: var(--hover-color);
}

.theme-toggle {
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
    width: 100%;
}

.theme-toggle:hover {
    background: var(--hover-color);
    transform: translateY(-1px);
}
.point-item {
    position: relative; /* Для позиционирования крестика */
    padding-right: 30px; /* Место для крестика */
}

.delete-point {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.delete-point:hover {
    opacity: 1;
    background: #ff4444;
}

.delete-point::before {
    content: 'x';
    font-size: 18px;
    line-height: 1;
}

.language-switcher {
    top: 20px;
    right: 120px;
    z-index: 1000;
}

.language-switcher select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    appearance: none;
    padding-right: 30px;
}

.language-switcher select:hover {
    background: var(--hover-color);
}

.color-picker {
     position: relative;
     margin-bottom: 15px;
 }

.color-preview-text {
    vertical-align: bottom;
    display: inline-block;
    width: 40%;
    height: 32px;
}

.color-preview {
    display: inline-block;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.color-preview .awesome-marker {
    position: static !important;
    margin-left: -5% !important;
    margin-top: -80% !important;
}

.color-popup {
    display: none;
    position: absolute;
    z-index: 1000;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    bottom: 50px;
    left: 0;
}

.color-popup.active {
    display: block;
}

.color-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.color-option {
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: transform 0.2s;
}

.color-option .color-option-item {
    width: 30px;
    height: 45px;
    display: flex;
    align-items: center;
}

.color-option .color-option-item .awesome-marker {
    position: static !important;
    margin-left: -10% !important;
    margin-top: 0 !important;
}

.color-option .color-option-item .awesome-marker i {
    margin-left: 8% !important;
}

.color-option:hover {
    transform: scale(1.1);
}

.awesome-marker {
    margin: 0 auto;
}

/* Кнопка отмены редактирования */
#cancelEditButton {
    background: #ff4444;
    margin-top: 10px;
}

#cancelEditButton:hover {
    background: #cc0000;
}

/* Иконка редактирования */
.edit-point {
    position: absolute;
    top: 8px;
    right: 40px;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.edit-point:hover {
    opacity: 1;
    background: #4CAF50;
}

.edit-point::before {
    content: '✎';
    font-size: 10px;
    line-height: 1;
}
