/* Базові скидання */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
}

/* Панель інструментів */
.controls-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    gap: 10px;
    align-items: center;
}

.controls-panel button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.controls-panel button:hover {
    background: #e9e9e9;
}

/* Вікно перегляду */
.viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.viewport:active {
    cursor: grabbing;
}

/* Нескінченна дошка з координатною сіткою */
.board {
    position: absolute;
    width: 5000px; /* Велика область для маневрів */
    height: 5000px;
    left: 0;
    top: 0;
    background-color: #fafafa;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    transform-origin: 0 0; /* Важливо для коректного Zoom */
    transform: translate(0px, 0px) scale(1);
}

/* Стиль картки (листка) */
.card {
    position: absolute;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 150px;
    min-height: 100px;
    cursor: default;
}

/* Шапка картки (зона для перетягування) */
.card-header {
    padding: 8px 12px;
    background: #f7f7f7;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.card-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
	contenteditable="true"
}

.card-delete-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
}

.card-delete-btn:hover {
    color: #cc0000;
}

/* Тіло картки */
.card-body {
    flex-grow: 1;
    padding: 5px;
}

.card-body textarea {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    color: #444;
}

/* Куточок для зміни розміру */
.card-resizer {
    width: 12px;
    height: 12px;
    background: #ccc;
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: se-resize;
    border-top-left-radius: 3px;
}


