/* Main container for the side panel */
#editor-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100vh;
    background-color: #1e1e1e;
    border-left: 1px solid #444;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-sizing: border-box;
    color: #ccc;
}

#editor-side-panel.is-visible {
    transform: translateX(0);
}

#editor-side-panel h3 {
    margin-top: 0;
    color: white;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

#editor-side-panel .panel-section {
    margin-bottom: 20px;
}

#editor-side-panel label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #aaa;
}

#editor-side-panel .font-size-controls button {
    padding: 5px 10px;
    margin-right: 5px;
    background-color: #333;
    border: 1px solid #555;
    color: #ccc;
    cursor: pointer;
}

#editor-side-panel .font-size-controls button.active {
    background-color: #007acc;
    border-color: #007acc;
    color: white;
}

#editor-side-panel #side-panel-textarea {
    width: 100%;
    height: 150px;
    background-color: #2a2a2a;
    border: 1px solid #555;
    color: #ccc;
    padding: 8px;
    box-sizing: border-box;
    resize: vertical;
}

#editor-side-panel #confirm-text-changes-btn {
    width: 100%;
    padding: 10px;
    background-color: #2a8c4a;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1em;
}

#editor-side-panel #confirm-text-changes-btn:hover {
    background-color: #3aa05d;
}

/* Styling for the in-place textarea overlay */
#inplace-text-overlay {
    position: absolute;
    display: none;
    background: rgba(40, 40, 40, 0.9);
    border: 1px dashed #00a1ff;
    padding: 0;
    margin: 0;
    resize: none;
    overflow: hidden;
    white-space: pre; /* Preserve whitespace like the canvas text */
    z-index: 1001; /* Must be on top */
}