/**
 * POI-Modul - Styles
 */

/* ============================================
   PANEL CONTAINER
   ============================================ */
#poi-panel {
    display: none;
    flex-direction: column;
    height: 100%;
}

#poi-panel.visible {
    display: flex;
}

/* ============================================
   SUCHFORMULAR
   ============================================ */
.poi-search-form {
    padding: 12px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-light, #f8f9fa);
}

.poi-search-form.compact {
    padding: 10px;
}

.poi-form-group {
    margin-bottom: 10px;
}

.poi-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #555);
    margin-bottom: 4px;
}

.poi-form-group input,
.poi-form-group select {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.poi-form-group input:focus,
.poi-form-group select:focus {
    outline: none;
    border-color: var(--primary-color, #8B0000);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

/* Such-Zeile mit Button */
.poi-search-row {
    display: flex;
    gap: 6px;
}

.poi-search-row input {
    flex: 1;
}

.poi-search-row .poi-btn {
    flex: 0 0 auto;
    padding: 6px 10px;
}

/* Kurz-Erläuterung "Orte von Interesse" */
.poi-subtitle {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 8px;
    font-size: 11px;
    color: #888;
    cursor: help;
}
.poi-subtitle i {
    color: #aaa;
}

/* Theme-Filter */
.poi-theme-filter {
    margin-top: 8px;
}

.poi-theme-select {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background: #fff;
}

/* Custom-Dropdown mit Symbolen (natives Select bleibt versteckt als State-Quelle) */
.poi-theme-select-hidden { display: none !important; }

.poi-theme-dd {
    position: relative;
    width: 100%;
}
.poi-theme-dd-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    text-align: left;
}
.poi-theme-dd-current {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.poi-theme-dd-caret {
    color: #888;
    font-size: 11px;
    flex-shrink: 0;
}
.poi-theme-dd-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1200;
    margin: 3px 0 0;
    padding: 4px 0;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.poi-theme-dd-search-wrap {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding: 4px 6px 6px;
    border-bottom: 1px solid #eee;
    list-style: none;
}
.poi-theme-dd-search {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.poi-theme-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}
.poi-theme-dd-item:hover {
    background: #eef4fb;
}
.poi-theme-dd-check {
    width: 14px;
    flex-shrink: 0;
    text-align: center;
    color: var(--primary-color, #008080);
    font-size: 11px;
}
.poi-theme-dd-item.selected {
    background: #e6f3f3;
    font-weight: 600;
}
.poi-theme-dd-item.selected:hover {
    background: #dcefef;
}
.poi-theme-dd-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
}
.poi-theme-dd-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* BBox-Filter Checkbox */
.poi-bbox-filter {
    margin-top: 6px;
    margin-bottom: 0 !important;
}

/* Umkreissuche */
.poi-radius-search {
    margin-top: 6px;
}
#poi-radius-controls {
    margin-top: 6px;
    padding: 8px;
    background: var(--bg-light, #f6f8fa);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 5px;
}
.poi-radius-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.poi-radius-row + .poi-radius-row {
    margin-top: 8px;
}
.poi-radius-km-row label {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}
#poi-radius-km {
    width: 80px;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 4px;
}
#poi-radius-pick-btn.active {
    background: var(--primary-color, #008080);
    color: #fff;
    border-color: var(--primary-color, #008080);
}
.poi-radius-center {
    font-size: 11px;
    color: #2e8b57;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poi-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 400 !important;
    color: var(--text-secondary, #555);
    cursor: pointer;
    user-select: none;
    margin-bottom: 0 !important;
    padding: 0;
}

.poi-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color, #8B0000);
}

/* ============================================
   BUTTONS
   ============================================ */
.poi-button-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}


.poi-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.poi-btn-primary {
    flex: 1;
    background: var(--primary-color, #8B0000);
    color: #fff;
}

.poi-btn-primary:hover {
    background: var(--primary-hover, #a00);
}

.poi-btn-secondary {
    flex: 0 0 auto;
    padding: 8px 12px;
    background: var(--bg-light, #e9ecef);
    color: var(--text-primary, #333);
}

.poi-btn-secondary:hover {
    background: var(--border-color, #ddd);
}

.poi-btn-ghost {
    flex: 0 0 auto;
    padding: 8px 10px;
    background: transparent;
    color: var(--text-muted, #999);
    border: 1px solid transparent;
}

.poi-btn-ghost:hover {
    color: var(--text-secondary, #555);
    background: var(--bg-hover, #f0f0f0);
}

.poi-btn-ghost.active {
    color: var(--primary-color, #8B0000);
    background: rgba(139, 0, 0, 0.08);
    border-color: var(--primary-color, #8B0000);
}

.poi-btn:active {
    transform: scale(0.98);
}

/* ============================================
   LOADING
   ============================================ */
#poi-loading {
    display: none;
    padding: 20px;
    text-align: center;
    color: var(--text-muted, #888);
}

#poi-loading.visible {
    display: block;
}

#poi-loading .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color, #ddd);
    border-top-color: var(--primary-color, #8B0000);
    border-radius: 50%;
    animation: poi-spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes poi-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   MESSAGE
   ============================================ */
.poi-message {
    display: none;
    padding: 10px 12px;
    margin: 0 12px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.poi-message.visible {
    display: block;
}

.poi-message.info {
    background: #e7f3ff;
    color: #0066cc;
}

.poi-message.warning {
    background: #fff3e0;
    color: #e65100;
}

.poi-message.error {
    background: #ffebee;
    color: #c62828;
}

/* ============================================
   ERGEBNISSE
   ============================================ */
#poi-results {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

#poi-results.visible {
    display: flex;
}

.poi-results-header {
    padding: 10px 12px;
    background: var(--bg-light, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poi-results-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.poi-results-header h4 {
    margin-right: auto;
}

#poi-results-count {
    font-size: 11px;
    color: var(--text-muted, #888);
    margin-left: 8px;
}

/* Excel-Export-Button im Ergebnis-Header */
.poi-export-btn {
    padding: 3px 8px !important;
    margin-left: 8px;
    font-size: 13px;
    line-height: 1;
}
.poi-export-btn i {
    color: #1d6f42;
}

#poi-results-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0 0 60px 0;
}

/* Ergebnis-Item */
.poi-result-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color, #eee);
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.poi-result-item:hover {
    background-color: var(--bg-hover, #f5f5f5);
}

.poi-result-item.active {
    background-color: var(--primary-light, rgba(var(--primary-color-rgb), 0.08));
    border-left: 3px solid var(--primary-color, #8B0000);
    padding-left: 9px;
}

.poi-result-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    object-fit: contain;
    margin-top: 2px;
}

svg.poi-result-shape {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-top: 4px;
}

.poi-result-info {
    flex: 1;
    min-width: 0;
}

.poi-result-item .poi-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary, #333);
    margin-bottom: 2px;
}

.poi-theme-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--bg-light, #e9ecef);
    color: var(--text-secondary, #666);
    margin-top: 3px;
}

.poi-result-item .poi-detail {
    display: block;
    font-size: 11px;
    color: var(--text-muted, #888);
    line-height: 1.5;
}

.poi-result-item .poi-detail i {
    width: 12px;
    text-align: center;
    font-size: 10px;
    color: var(--text-muted, #aaa);
    margin-right: 3px;
}

.poi-result-item .poi-detail-contact {
    color: var(--text-secondary, #666);
}

/* Keine Ergebnisse */
.poi-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted, #888);
    font-size: 13px;
}

/* ============================================
   DETAIL-POPUP / MODAL
   ============================================ */
.poi-detail-content {
    padding: 0;
}

/* Toolbar mit Zoom-Button */
.poi-detail-toolbar {
    display: flex;
    justify-content: flex-start;
    padding: 6px 0 8px;
}

.poi-detail-zoom-btn,
.poi-detail-route-btn,
.poi-detail-gmaps-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background: var(--bg-light, #f8f9fa);
    color: var(--text-secondary, #555);
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.poi-detail-zoom-btn:hover,
.poi-detail-route-btn:hover,
.poi-detail-gmaps-btn:hover {
    background: var(--primary-color, #8B0000);
    color: #fff;
    border-color: var(--primary-color, #8B0000);
}

.poi-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.poi-detail-header img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.poi-detail-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.poi-detail-body {
    padding: 12px 16px;
}

.poi-detail-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.poi-detail-field {
    margin-bottom: 8px;
    display: flex;
    gap: 8px;
}

.poi-detail-field .poi-field-icon {
    flex: 0 0 20px;
    text-align: center;
    color: var(--text-muted, #888);
    font-size: 13px;
    padding-top: 1px;
}

.poi-detail-field .poi-field-value {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary, #333);
    word-break: break-word;
}

.poi-detail-field .poi-field-value a {
    color: var(--primary-color, #8B0000);
    text-decoration: none;
}

.poi-detail-field .poi-field-value a:hover {
    text-decoration: underline;
}

.poi-detail-description {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e0e0e0);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary, #333);
}

.poi-detail-description img {
    max-width: 100%;
    height: auto;
}

.poi-detail-themes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.poi-detail-themes .poi-theme-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--bg-light, #e9ecef);
    color: var(--text-secondary, #555);
}

.poi-detail-themes .poi-theme-tag img {
    width: 14px;
    height: 14px;
}

/* Extra-Attribute */
.poi-extra-attributes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.poi-extra-attr {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
}

.poi-extra-attr-label {
    color: var(--text-secondary, #555);
}

.poi-extra-attr-value {
    color: var(--text-primary, #333);
    font-weight: 500;
}

/* ============================================
   POI EDITOR
   ============================================ */

/* Detail-Toolbar: Edit-/Delete-Buttons */
.poi-detail-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.poi-detail-toolbar .poi-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background: var(--bg-light, #f8f9fa);
    color: var(--text-secondary, #555);
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.15s, color 0.15s;
}

.poi-detail-toolbar .poi-edit-btn:hover {
    background: var(--primary-color, #8B0000);
    color: #fff;
    border-color: var(--primary-color, #8B0000);
}

.poi-detail-toolbar .poi-delete-btn:hover {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}

/* Edit-Formular */
.poi-edit-form {
    padding: 4px 0;
}

.poi-edit-field {
    margin-bottom: 6px;
}

.poi-edit-field > label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary, #555);
    margin-bottom: 2px;
}

.poi-edit-field input[type="text"],
.poi-edit-field input[type="email"],
.poi-edit-field input[type="url"],
.poi-edit-field input[type="number"],
.poi-edit-field input[type="date"],
.poi-edit-field textarea,
.poi-edit-field select {
    width: 100%;
    padding: 4px 6px;
    font-size: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
}

.poi-edit-field input:focus,
.poi-edit-field textarea:focus,
.poi-edit-field select:focus {
    border-color: var(--primary-color, #8B0000);
    outline: none;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

.poi-edit-field textarea {
    min-height: 40px;
    resize: vertical;
}

.poi-edit-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-weight: normal !important;
    cursor: pointer;
}

.poi-edit-checkbox-label input[type="checkbox"] {
    width: auto;
}

/* Theme-Checkboxen */
.poi-edit-themes .theme-checkbox-list {
    max-height: 120px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #eee);
    border-radius: 3px;
    padding: 4px;
}

.theme-checkbox-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    font-size: 11px;
    cursor: pointer;
}

.theme-checkbox-item:hover {
    background: var(--bg-hover, #f5f5f5);
}

.theme-checkbox-item img,
.theme-checkbox-item svg.theme-checkbox-shape {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.theme-checkbox-item i.theme-checkbox-shape {
    width: 16px;
    flex-shrink: 0;
    text-align: center;
}

.theme-checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* "Neues Thema anlegen"-Link */
.poi-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--primary-color, #8B0000);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
}

.poi-btn-link:hover {
    text-decoration: underline;
}

/* Thema-Anlegen-Formular (Modal) */
.poi-create-theme-form {
    padding: 2px 0;
}

.poi-create-theme-form .poi-edit-field {
    margin-bottom: 6px;
}

/* Icon-Grid */
.poi-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #eee);
    border-radius: 3px;
    padding: 4px;
    background: #fff;
}

.poi-icon-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 2px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
}

.poi-icon-grid-item:hover {
    background: var(--bg-hover, #f0f0f0);
}

.poi-icon-grid-item.selected {
    border-color: var(--primary-color, #8B0000);
    background: rgba(139, 0, 0, 0.06);
}

.poi-icon-grid-item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.poi-icon-grid-item i {
    font-size: 20px;
    color: var(--text-muted, #aaa);
    height: 28px;
    line-height: 28px;
}

.poi-icon-grid-item span {
    font-size: 8px;
    color: var(--text-muted, #888);
    max-width: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Icon-Upload: Drag & Drop Zone */
.poi-icon-dropzone {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px dashed var(--border-color, #ccc);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
}

.poi-icon-dropzone:hover {
    border-color: var(--primary-color, #8B0000);
    background: rgba(139, 0, 0, 0.03);
}

.poi-icon-dropzone.dragover {
    border-color: var(--primary-color, #8B0000);
    background: rgba(139, 0, 0, 0.08);
}

.poi-icon-dropzone i {
    font-size: 16px;
    color: var(--text-muted, #aaa);
}

.poi-icon-dropzone span {
    font-size: 11px;
    color: var(--text-muted, #888);
}

.poi-icon-dropzone input[type="file"] {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

#poi-icon-upload-status {
    font-size: 11px;
    color: var(--text-muted, #888);
    margin-top: 4px;
}

/* Shape-Selector / Farb-Picker entfernt — POIs werden nur per Pixel-Symbol definiert */

/* Platzhalter, wenn ein Thema (noch) kein Symbol hat */
.poi-theme-preview-placeholder {
    font-size: 20px;
    color: #999;
}

/* Theme-Vorschau */
.poi-theme-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--border-color, #eee);
    border-radius: 4px;
    background: var(--bg-light, #f8f9fa);
}

.poi-theme-preview-badge {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.poi-theme-preview-badge img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.poi-theme-preview-badge i {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

#poi-theme-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.poi-btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

/* Position-Anzeige */
.poi-edit-position-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.poi-edit-position-display .coord-text {
    font-size: 11px;
    color: var(--text-muted, #888);
    font-family: monospace;
    flex: 1;
}

.poi-edit-position-display .coord-text i {
    margin-right: 4px;
    color: var(--primary-color, #8B0000);
}

/* Hinweis-Text neben Labels */
.poi-edit-hint {
    font-weight: normal;
    color: var(--text-muted, #999);
    font-size: 11px;
}

/* Extra-Attribute Abschnitt */
.poi-edit-section-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.poi-edit-extra-field {
    margin-bottom: 4px;
}

.poi-edit-extra-field label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary, #555);
    margin-bottom: 1px;
}

.poi-edit-extra-field label small {
    color: var(--text-muted, #999);
}

.poi-edit-extra-field input,
.poi-edit-extra-field textarea {
    width: 100%;
    padding: 5px 7px;
    font-size: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
}

/* Aktions-Buttons */
.poi-edit-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

/* Danger-Button */
.poi-btn-danger {
    background: #c62828;
    color: #fff;
    border: 1px solid #c62828;
}

.poi-btn-danger:hover {
    background: #a51f1f;
    border-color: #a51f1f;
}

/* Position-Pick-Modus: Crosshair */
.poi-pick-mode {
    cursor: crosshair !important;
}

/* Benachrichtigung (Toast) */
.poi-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 10000;
    transition: opacity 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    text-align: center;
}

.poi-notification.success {
    background: #4caf50;
    color: #fff;
}

.poi-notification.error {
    background: #c62828;
    color: #fff;
}

.poi-notification.info {
    background: #1976d2;
    color: #fff;
}

/* Bestaetigungsdialog */
.poi-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poi-confirm-dialog {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.poi-confirm-dialog .confirm-message {
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text-primary, #333);
    line-height: 1.5;
}

.poi-confirm-dialog .confirm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ============================================
   SYMBOLGROESSE-SLIDER
   ============================================ */

.poi-size-slider {
    display: flex;
    align-items: center;
    gap: 8px;
}

.poi-size-slider input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color, #ddd);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.poi-size-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color, #8B0000);
    cursor: pointer;
}

.poi-size-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color, #8B0000);
    border: none;
    cursor: pointer;
}

.poi-size-slider span {
    font-size: 11px;
    color: var(--text-muted, #888);
    font-family: monospace;
    min-width: 36px;
    text-align: right;
}

/* ============================================
   ATTRIBUTE-SCHEMA EDITOR
   ============================================ */

.poi-attr-schema-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poi-attr-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.poi-attr-row input,
.poi-attr-row select {
    padding: 4px 6px;
    font-size: 11px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
}

.poi-attr-row .poi-attr-key {
    flex: 1 1 80px;
    min-width: 0;
}

.poi-attr-row .poi-attr-label {
    flex: 1.5 1 100px;
    min-width: 0;
}

.poi-attr-row .poi-attr-type {
    flex: 0 0 70px;
}

.poi-attr-row .poi-attr-suffix {
    flex: 0 0 55px;
}

.poi-attr-remove-btn {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    color: var(--text-muted, #999);
    transition: background 0.15s, color 0.15s;
}

.poi-attr-remove-btn:hover {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}

/* Sichtbare Felder Checkboxen */
.poi-visible-fields-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 6px 0;
}

.poi-visible-field-label {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 400 !important;
    color: var(--text-primary, #333);
    cursor: pointer;
    user-select: none;
    padding: 3px 0;
}

.poi-visible-field-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color, #8B0000);
}

/* ============================================
   THEMENVERWALTUNG (Modal)
   ============================================ */

.poi-theme-manager {
    padding: 4px 0;
}

/* Toolbar */
.poi-tm-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}

/* Themen-Liste */
.poi-tm-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
}

.poi-tm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color, #eee);
    transition: background 0.15s;
}

.poi-tm-item:last-child {
    border-bottom: none;
}

.poi-tm-item:hover {
    background: var(--bg-hover, #f5f5f5);
}

.poi-tm-item-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poi-tm-item-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.poi-tm-item-icon svg.theme-checkbox-shape,
.poi-tm-item-icon i.theme-checkbox-shape {
    width: 22px;
    height: 22px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poi-tm-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.poi-tm-item-alias {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poi-tm-item-name {
    font-size: 10px;
    color: var(--text-muted, #999);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poi-tm-item-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
}

.poi-tm-item-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted, #999);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.poi-tm-edit-btn:hover {
    background: var(--primary-color, #8B0000) !important;
    color: #fff !important;
    border-color: var(--primary-color, #8B0000) !important;
}

.poi-tm-delete-btn:hover {
    background: #c62828 !important;
    color: #fff !important;
    border-color: #c62828 !important;
}

.poi-tm-empty {
    padding: 30px 20px;
    text-align: center;
    color: var(--text-muted, #999);
    font-size: 13px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .poi-search-form {
        padding: 10px;
    }

    .poi-form-group input,
    .poi-form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .poi-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ============================================
   3D POI OVERLAYS
   ============================================ */
.poi-3d-overlay > div {
    transition: transform 0.15s ease;
}

.poi-3d-overlay.poi-3d-hover > div,
.poi-3d-overlay.poi-3d-selected > div {
    transform: scale(1.3);
    z-index: 10;
}

/* ============================================
   WYSIWYG-Editor (Beschreibungsfeld)
   ============================================ */
.poi-wysiwyg {
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.poi-wysiwyg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    background: var(--bg-light, #f5f5f5);
    border-bottom: 1px solid var(--border-color, #d5d5d5);
}
.poi-wz-btn {
    width: 28px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 3px;
    color: #444;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.poi-wz-btn:hover {
    background: #e6e6e6;
}
.poi-wz-btn.active {
    background: #dbe8ff;
    border-color: #9bbcf0;
}
.poi-wz-sep {
    width: 1px;
    align-self: stretch;
    background: var(--border-color, #ddd);
    margin: 2px 3px;
}
.poi-wysiwyg-editor {
    min-height: 90px;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px;
    /* Wie in der späteren Anzeige (Detail/Feature-Info) – etwas kleiner */
    font-size: 11.5px;
    line-height: 1.45;
    color: var(--text-primary, #333);
    outline: none;
}
.poi-wysiwyg-editor:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
}
.poi-wysiwyg-editor a { color: var(--primary-color, #0866B0); }
/* Eingefügte Bilder responsiv halten */
.poi-wysiwyg-editor img {
    max-width: 100%;
    height: auto;
}
.poi-wysiwyg-source {
    width: 100%;
    border: none;
    border-top: 1px solid var(--border-color, #eee);
    padding: 8px;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}


/* --- Nicht öffentliche POIs (is_online = false) ---------------------------
   Sichtbar nur für Bearbeiter des Themas. Abgedimmt statt versteckt: Wer den
   Haken „Online / Sichtbar" entfernt, muss den POI weiter ändern und löschen
   können. Die Schrift bleibt lesbar (kein reines opacity auf die ganze Zeile),
   damit der Eintrag bedienbar bleibt. */
.poi-result-item.is-offline .poi-result-icon { opacity: .45; }
.poi-result-item.is-offline .poi-name,
.poi-result-item.is-offline .poi-detail { color: #6b7280; }
.poi-offline-badge {
    display: inline-flex; align-items: center; gap: 4px;
    margin-left: 6px; padding: 1px 6px; border-radius: 10px;
    background: #eef1f5; color: #5f6b7a; font-size: 11px; font-weight: 500;
    white-space: nowrap; vertical-align: middle;
}
