/* Koordinaten-Panel */
#coord-panel {
    position: absolute;
    top: 60px;
    right: 8px; /* Standardmäßig rechts, kann verschoben werden */
    width: 320px;
    max-height: calc(100vh - 80px);
    background: rgba(22, 33, 62, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
}

#coord-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    cursor: move;
}

#coord-panel-header button {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 12px;
}

#coord-panel-header button:hover {
    color: #fff;
}

#coord-list-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#coord-origin-display {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(127, 17, 224, 0.1);
}

#coord-list {
    overflow-y: auto;
    padding: 6px;
    flex: 1;
    max-height: 400px;
}

.coord-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    margin: 4px 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    cursor: pointer;
    gap: 4px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.coord-item:hover {
    background: rgba(83, 52, 131, 0.25);
    border-color: rgba(123, 82, 171, 0.3);
}

.coord-item .c-top {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.coord-item .c-icon {
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.coord-item .c-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coord-item .c-actions {
    display: flex;
    gap: 4px;
}

.coord-item .c-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.coord-item .c-btn:hover {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
}

.coord-item .c-vals {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 11px;
    color: #888;
    padding-left: 28px;
    line-height: 1.4;
}

.coord-item.local .c-vals {
    color: #00ccff;
}

/* Nullpunkt-Dialog */
#origin-axis-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 25, 0.85);
    backdrop-filter: blur(8px);
    z-index: 5000;
    justify-content: center;
    align-items: center;
}

.dialog-box {
    background: #16213e;
    padding: 30px;
    border-radius: 16px;
    width: 380px;
    color: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.dialog-box h3 {
    margin-top: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dialog-box p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.dialog-btn-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dialog-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#btn-origin-standard {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}
#btn-origin-standard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

#btn-origin-custom {
    background: linear-gradient(135deg, #7b52ab, #633f91);
    color: #fff;
}
#btn-origin-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 82, 171, 0.4);
}

#btn-origin-cancel {
    background: rgba(255,255,255,0.05);
    color: #ccc;
    margin-top: 10px;
}
#btn-origin-cancel:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-desc {
    color: #666;
    font-size: 11px;
    margin-top: -8px;
    margin-bottom: 5px;
    padding-left: 5px;
}
