
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

/* Toolbar */

.toolbar {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #e8e0d4;
    border-bottom: 1px solid #c5b9a8;

    position: relative;

    z-index: 5;
}

.toolbar h1 {
    margin: 0;
    font-size: 20px;
    
}

.toolbar-actions {
    display: flex;
    gap: 10px;
}

.toolbar button {
    padding: 8px 14px;
    border: none;
    border-radius: 5px;
    background: #444;
    color: white;
    cursor: pointer;
}

.toolbar button:hover {
    background: #666;
}

/* Board */

.board {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: visible;
    cursor: grab;
    touch-action: none;
}

.board:active {
    cursor: grabbing;
}

/* Movable world */

.board {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;

    background-image: url("./assets/pinboard.png");
    background-repeat: repeat;

    cursor: grab;
    touch-action: none;
}

.board-world {
    position: absolute;
    inset: 0;
    transform-origin: top left;
    pointer-events: none;
}

.board-object {
    position: absolute;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    cursor: grab;
}

.board-object::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -15%;
    height: 15%;
    cursor: grab;
}

.picture::before,
.todo-list::before  {
    content: "";
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background-image: url("../assets/pin.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
    pointer-events: none;
}

.sticky-note {
    width: 180px;
    min-height: 180px;
    height: auto;
    padding: 12px;
    background: #fff2a8;
    box-shadow: 2px 4px 10px #0003;
    transform: rotate(-2deg);
}

.sticky-note textarea {
    display: block;
    width: 100%;
    min-height: 156px;
    height: 156px;
    padding: 0;
    margin-top: 1vh;
    border: none;
    outline: none;
    resize: none;
    overflow: hidden;
    background: transparent;
    font: 16px "Comic Sans MS", cursive;
}

.sticky-note {
    cursor: grab;
    touch-action: none;
}

.sticky-note:active {
    cursor: grabbing;
}


/* Todo List */

.todo-list {
    width: 230px;
    min-height: 180px;
    padding: 18px;
    background: #fffdf5;
    box-shadow: 2px 4px 12px #0003;
    transform: rotate(1deg);
    font-family: Arial, sans-serif;
}

.todo-title {
    width: 100%;
    margin-bottom: 15px;
    padding: 4px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    outline: none;
    background: transparent;
    font-size: 18px;
    font-weight: bold;
}

.todo-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.todo-item input[type="checkbox"] {
    cursor: pointer;
}

.todo-item input[type="text"] {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
}

.todo-item input.completed {
    text-decoration: line-through;
    color: #999;
}

.todo-add {
    margin-top: 14px;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    background: #eee;
    cursor: pointer;
}

.todo-add:hover {
    background: #ddd;
}


/* Picture */

.picture {
    width: 220px;
    padding: 10px 10px 14px;
    background: #fffdf5;
    box-shadow: 2px 4px 12px #0003;
    transform: rotate(1deg);
    display: flex;
    flex-direction: column;
}

.picture img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.picture-upload {
    width: 100%;
    height: 100%;
    min-height: 200px;
    border: 2px dashed #bbb;
    background: #f5f2eb;
    color: #555;
    cursor: pointer;
    align-items: center;
    flex: stretch;
}

.picture-upload:hover {
    background: #ebe7dd;
}

.picture-caption {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 4px;
    border: none;
    outline: none;
    background: transparent;
    text-align: center;
    font: 14px Arial, sans-serif;
}

