/* ===============================
   GRUND
================================ */
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #eef1f5;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

h2 {
    margin: 0;
    font-weight: bold;
    color: black;
    font-size: 18px;
}

/* ===============================
   HEADER
================================ */
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 20px;
    background: #ffffff;
    border-bottom: 1px solid #ccc;
}

.header-row img {
    width: 200px;
    height: auto;
}

/* ===============================
   INFO-RAD
================================ */
.notice {
    margin: 10px 20px;
    font-size: 13px;
    color: #333;
}

/* ===============================
   TOOLBAR
================================ */
#toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #ffffff;
    border-bottom: 2px solid #d0d5dd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    z-index: 10;
}

.toolbtn {
    background: #e8ecf2;
    border: 1px solid #b7c0cd;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
    text-decoration: none;
    color: #222;
}

.toolbtn:hover {
    background: #d6dce6;
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(0,0,0,0.15);
}

.toolbtn:active {
    transform: scale(0.92);
}

/* ===============================
   AKTIVT VERKTYG
================================ */
.activeTool {
    background: #1749a5 !important;
    color: white !important;
    border-color: #123a82 !important;
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(23,73,165,0.6) !important;
}

/* ===============================
   LAYOUT
================================ */
#contentLayout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ===============================
   CANVAS
================================ */
#canvasWrapper {
    flex: 1;
    background: #ddd;
    position: relative;
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

/* ===============================
   SIDEBAR
================================ */
#sidebarWrapper {
    position: relative;
    width: 320px;
    transition: width 0.25s ease;
    background: #ffffff;
    border-left: 2px solid #d0d5dd;
    box-shadow: -2px 0 8px rgba(0,0,0,0.08);
}

#sidebarWrapper.collapsed {
    width: 0;
}

#measurementSidebar {
    padding: 15px;
    height: 100%;
    overflow-y: auto;
    transition: opacity 0.2s ease;
}

#sidebarWrapper.collapsed #measurementSidebar {
    opacity: 0;
    pointer-events: none;
}

#measurementSidebar button {
    background: #c0392b;
    padding: 8px 12px;
    color: white;
    border: none;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
}

#measurementSidebar button:hover {
    background: #a12f23;
    transform: scale(1.03);
}
#measurementList li {
    cursor: pointer;
}
#measurementList li:hover {
    background-color: #f0f0f0;
}
#measurementList li.active {
    background-color: #ffd54f;
}
canvas {
    touch-action: none;
}