/* ============================================================
   app.css  –  Travel Planner
   Referenced via <link data-trunk rel="css" href="static/app.css">
   Trunk copies this file to dist/ with a content-hash filename
   and rewrites the <link> in index.html automatically.
   ============================================================ */

/* ── Reset / base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body, #app {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 300px;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0, 0, 0, .12);
    z-index: 2000;
    overflow-y: auto;
    transition: transform .3s ease-in-out;
}
.sidebar.closed { transform: translateX(-100%); }
.sidebar-content { padding: 60px 20px 20px; }

/* ── Burger button ────────────────────────────────────────── */
.burger-btn {
    position: absolute;
    top: 15px; left: 15px;
    z-index: 2100;
    background: #fff;
    border: none;
    border-radius: 50%;
    width: 45px; height: 45px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background .2s;
}
.burger-btn:hover { background: #f0f0f0; }

/* ── Search bar ───────────────────────────────────────────── */
.search-wrapper {
    position: absolute;
    top: 15px; right: 15px;
    z-index: 1000;
    width: 280px;
}
.search-container {
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 44px;
    gap: 8px;
}
.search-icon {
    color: #bbb;
    font-size: .9em;
    flex-shrink: 0;
}
.search-container input {
    border: none;
    flex: 1;
    outline: none;
    font-size: .95em;
    background: transparent;
    min-width: 0;
}
.search-dropdown {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    list-style: none;
    padding: 4px 0;
    margin: 6px 0 0 0;
    overflow: hidden;
}
.search-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    transition: background .12s;
    font-size: .88em;
}
.search-suggestion:hover { background: #f5f7fa; }
.sug-icon {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #007bff;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: .78em;
}
.sug-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}
.sug-pin-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 4px 7px;
    border-radius: 6px;
    font-size: .85em;
    flex-shrink: 0;
    transition: color .12s, background .12s;
    line-height: 1;
}
.sug-pin-btn:hover {
    color: #007bff;
    background: rgba(0, 123, 255, .09);
}

/* ── Generic form helpers ─────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: .85em;
    color: #555;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: .95em;
}
.form-group textarea { resize: vertical; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background .2s;
}
.btn-primary:hover { background: #0056b3; }

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
}
.btn-secondary:hover { background: #5a6268; }

.btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s;
}
.btn-danger:hover { background: #c82333; }

.btn-sm { padding: 5px 10px !important; font-size: .85em; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
button:active { transform: translateY(1px); }

/* ── Modal overlay ────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}
.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 440px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}
.coords-hint { font-size: .8em; color: #999; margin: -8px 0 14px; }

/* ── Leaflet popup ────────────────────────────────────────── */
.leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, .3);
}
.leaflet-popup-content { margin: 0; width: 620px !important; }

.popup-container {
    display: flex;
    min-height: 340px;
    width: 100%;
    overflow: hidden;
}
.popup-info {
    flex: 0 0 55%;
    padding: 18px;
    border-right: 1px solid #eee;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}
.popup-media {
    flex: 0 0 45%;
    padding: 18px;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: 500px;
    overflow: hidden;
    min-width: 0;
}
.popup-form .form-group { margin-bottom: 10px; }
.popup-form label {
    font-size: .7em;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #aaa;
    margin-bottom: 2px;
}
.field-value {
    font-size: .95em;
    color: #333;
    word-break: break-word;
    min-height: 1.2em;
}
.popup-actions {
    margin-top: 18px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.popup-actions button {
    padding: 5px 11px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: .85em;
    transition: background .15s;
}
.popup-actions button:hover { background: #f5f5f5; }
.popup-actions .btn-primary  { background: #007bff; color: #fff; border-color: #007bff; }
.popup-actions .btn-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }

/* slideshow */
.slide-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.slideshow-img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.slide-nav {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.nav-btn {
    background: #eee;
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.nav-btn:hover { background: #ddd; }

/* attachments */
.attach-list {
    max-height: 100px;
    overflow-y: auto;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #eee;
}
.attach-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: .88em;
}
.attach-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

/* ── Color picker circle ──────────────────────────────────── */
.color-picker-circle {
    -webkit-appearance: none;
    appearance: none;
    width: 32px !important;
    height: 32px !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    border-radius: 50%;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    background: transparent;
}
.color-picker-circle::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker-circle::-webkit-color-swatch { border: 2px solid #ddd; border-radius: 50%; }
.color-picker-circle::-moz-color-swatch { border: 2px solid #ddd; border-radius: 50%; }

/* ── Sidebar sections ─────────────────────────────────────── */
.section { margin-bottom: 18px; }

.section-icon { margin-right: 8px; color: #007bff; }

.your-pins-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 11px 13px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    font-weight: 600;
    transition: background .15s, border-color .15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    color: #333;
    user-select: none;
}
.your-pins-header:hover { background: #f8f9fa; }
.your-pins-header.expanded {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #f8f9fa;
    margin-bottom: 0;
    border-bottom-color: transparent;
}

.pins-list {
    list-style: none;
    margin: 0 0 4px;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #fff;
}
.your-pin-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 14px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background .15s;
}
.your-pin-item:last-child { border-bottom: none; }
.your-pin-item:hover { background: #f0f7ff; }

.your-pin-icon-circle {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}
.your-pin-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .92em;
    color: #333;
}
.pin-meta { font-size: .82em; color: #aaa; }

.user-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    background: #fdfdfd;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    font-size: .9em;
    color: #444;
    user-select: none;
}
.user-group-header:hover { background: #f0f7ff; }

/* ── Filter section ───────────────────────────────────────── */
.filter-section {
    padding: 14px;
    border: 1px solid #eee;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #fff;
}
.filter-group { margin-bottom: 14px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group-title {
    font-size: .72em;
    text-transform: uppercase;
    color: #aaa;
    margin: 0 0 8px;
    letter-spacing: .8px;
    font-weight: 700;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 4px;
}
.filter-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 0;
    font-size: .88em;
    cursor: pointer;
    color: #555;
    user-select: none;
}
.filter-item:hover { color: #007bff; }
.filter-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }

/* ── Auth / user boxes ────────────────────────────────────── */
.auth-box,
.user-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 18px;
}
.auth-box h3,
.user-box h3 { margin-top: 0; }

.feedback {
    padding: 9px 12px;
    border-radius: 6px;
    font-size: .88em;
    margin-bottom: 12px;
    border: 1px solid;
}
.feedback.error   { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.feedback.success { background: #d4edda; color: #155724; border-color: #c3e6cb; }

/* ── Admin panel ──────────────────────────────────────────── */
.admin-panel {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 4000;
    overflow-y: auto;
    padding: 20px;
}
.admin-inner { max-width: 1200px; margin: 0 auto; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.admin-header h1 { margin: 0; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.admin-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #eee;
    font-size: .88em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.admin-table td { padding: 10px; border-bottom: 1px solid #eee; }
.action-cell { display: flex; gap: 8px; align-items: center; }

.alert {
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid;
    font-size: .92em;
}
.alert-error   { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border-color: #c3e6cb; }

/* ── Leaflet custom marker (strip default chrome) ─────────── */
.custom-marker {
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* ── Star ratings ─────────────────────────────────────────── */
.stars { display: inline-flex; gap: 3px; color: #f59e0b; }
.star-btn { cursor: pointer; transition: transform .1s; }
.star-btn:hover { transform: scale(1.2); }

/* ── Sidebar badges & role pills ──────────────────────────────────────────── */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: .72em;
    font-weight: 600;
    background: var(--badge-bg, #e8f0fe);
    color: var(--badge-text, #1a73e8);
    margin-left: 6px;
    vertical-align: middle;
}

.user-box-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.user-box-name span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.role-badge {
    display: inline-block;
    font-size: .72em;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    letter-spacing: .3px;
}
.role-admin    { background: #fee2e2; color: #991b1b; }
.role-traveler { background: #d1fae5; color: #065f46; }
.role-user     { background: #e0e7ff; color: #3730a3; }

/* ── Route Builder modal ──────────────────────────────────────────────────── */
.route-builder {
    max-width: 540px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.route-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
}
.route-meta-grid .form-group { margin-bottom: 0; }

/* stop tabs */
.stop-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
}
.stop-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: .82em;
    color: #555;
    transition: all .15s;
    white-space: nowrap;
}
.stop-tab:hover { background: #f0f7ff; border-color: #007bff; color: #007bff; }
.stop-tab.active {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
    font-weight: 600;
}
.stop-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,.12);
    font-size: .85em;
    font-weight: 700;
}
.stop-tab.active .stop-tab-num { background: rgba(255,255,255,.25); }

.stop-tab-del {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1em;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.stop-tab-del:hover { color: #dc3545; background: #fee2e2; }

/* stop editor */
.stop-editor {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
}
.stop-coords {
    font-size: .8em;
    color: #888;
    margin-bottom: 12px;
    font-family: monospace;
}

/* train fields */
.train-fields {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.price-row {
    display: flex;
    gap: 10px;
    align-items: end;
}

.route-builder-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.stop-count {
    font-size: .85em;
    color: #666;
}

/* ── Route bottom bar ────────────────────────────────────────────────────── */
.route-bottom-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e0e0e0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 2500;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .1);
}
.route-bottom-left {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: .92em;
    color: #333;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.route-bottom-count { color: #555; }
.route-bottom-hint  { color: #007bff; font-size: .85em; }

/* ── Route stop list in details overlay ─────────────────────────────────── */
.route-stops-list {
    margin-bottom: 14px;
}
.route-stop-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #eee;
    border-radius: 7px;
    margin-bottom: 5px;
    cursor: pointer;
    background: #fff;
    transition: background .15s, border-color .15s;
    user-select: none;
}
.route-stop-row:hover    { background: #f0f7ff; border-color: #b3d4ff; }
.route-stop-row.active   { background: #e8f0fe; border-color: #007bff; }
.route-stop-row[draggable="true"] { cursor: grab; }
.route-stop-num {
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.route-stop-name {
    flex: 1;
    font-size: .88em;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.route-stop-coords {
    font-size: .75em;
    color: #aaa;
    font-family: monospace;
    flex-shrink: 0;
}

/* ── "More options" toggle in PinForm ───────────────────────────────────── */
.btn-more-toggle {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 7px 12px;
    margin: 4px 0 10px;
    cursor: pointer;
    font-size: .85em;
    color: #555;
    text-align: left;
    transition: background .15s;
}
.btn-more-toggle:hover { background: #eef0f2; }

/* ── Sidebar backdrop (tap-to-close on mobile) ───────────────────────────── */
.sidebar-backdrop {
    display: none; /* hidden on desktop */
}

/* ── Responsive / Mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {

    /* 1 · Sidebar: full-screen overlay */
    .sidebar { width: 100%; }
    .sidebar-content {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    /* 2 · Backdrop: semi-transparent overlay behind open sidebar */
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        z-index: 1999; /* below sidebar (2000), above map */
    }

    /* 3 · Search bar: stays top-right, slightly narrower */
    .search-wrapper { width: 200px; }
    .search-container input { font-size: .9em; }

    /* 4 · Touch targets: minimum 44 px height for comfortable tapping */
    .your-pins-header  { min-height: 44px; }
    .your-pin-item     { min-height: 44px; padding: 10px 14px; }
    .user-group-header { min-height: 44px; }
    .filter-item       { min-height: 40px; padding: 8px 0; }
    .btn-sm            { min-height: 36px; padding: 7px 12px !important; }

    /* 5 · iOS auto-zoom fix: inputs < 16 px trigger unwanted zoom */
    .form-group input,
    .form-group textarea,
    .form-group select { font-size: 16px; }

    /* 6 · Modals: bottom sheet instead of centred dialog */
    .modal-overlay { align-items: flex-end; }
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
        padding: 20px 16px max(28px, env(safe-area-inset-bottom));
    }

    /* 7 · Route bottom bar: safe-area + allow button wrap on tiny screens */
    .route-bottom-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 16px max(12px, env(safe-area-inset-bottom));
    }
    .route-bottom-left { font-size: .85em; }

    /* 8 · Route builder: single column, scrollable stop tabs */
    .route-meta-grid { grid-template-columns: 1fr; }
    .stop-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .price-row { flex-direction: column; }

    /* 9 · Leaflet popup: stack info + media vertically */
    .leaflet-popup-content {
        width: auto !important;
        min-width: 280px !important;
        max-width: calc(100vw - 40px) !important;
    }
    .popup-container { flex-direction: column; }
    .popup-info {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        max-height: 260px;
    }
    .popup-media {
        flex: none;
        width: 100%;
        max-height: 160px;
    }

    /* 10 · Admin panel: scrollable table, stacked header */
    .admin-inner { overflow-x: auto; }
    .admin-table { font-size: .82em; min-width: 500px; }
    .admin-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Map: Vollbild (Standard) ──────────────────────────────── */
.map-fullscreen {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* ── Minimap: schwebendes Fenster unten rechts ─────────────── */
.minimap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 240px;
    min-width: 180px;
    min-height: 140px;
    max-width: 60vw;
    max-height: 55vh;
    z-index: 1900;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
    overflow: hidden;
    resize: both;
}

/* Drag-Handle-Balken (wird per JS in den #map-Container injiziert) */
#minimap-drag-handle {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 26px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    padding: 0 8px;
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid #ddd;
}
#minimap-drag-handle:active { cursor: grabbing; }

/* Handle nur im Minimap-Modus einblenden */
.minimap #minimap-drag-handle { display: flex; }

/* Reset-Button im Drag-Handle */
#minimap-reset-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .75em;
    color: #888;
    padding: 2px 5px;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color .15s, background .15s;
}
#minimap-reset-btn:hover { color: #333; background: rgba(0,0,0,.06); }

#minimap-grip-label { display: flex; align-items: center; flex: 1; }

/* ── Planner-Seite ─────────────────────────────────────────── */
.planner-page {
    position: absolute;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.planner-topbar {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 54px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
    z-index: 1;
    flex-shrink: 0;
}

.planner-title {
    font-size: 1.05em;
    font-weight: 600;
    color: #333;
    flex: 1;
}

.planner-title i { color: #3b82f6; margin-right: 6px; }

.planner-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #888;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.planner-close-btn:hover { background: #f0f0f0; color: #333; }

.planner-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

/* ── Sidebar: Planner-Navigationsbutton ────────────────────── */
.planner-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 8px 0 4px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .9em;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}
.planner-nav-btn:hover { opacity: .9; }
.planner-nav-btn:active { transform: scale(.98); }
