body {
    font-family: sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.page-header > div {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn, .logout-btn {
    color: #007bff;
    text-decoration: none;
    font-size: 1em;
}
.login-btn:hover, .logout-btn:hover {
    text-decoration: underline;
}

#save-plan-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
		transition: background-color 0.3s ease;
}

#save-plan-btn:hover {
    background-color: #218838;
}

#plan-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
    align-items: flex-start;
}

.week-wrapper {
    background-color: #d0d0d0;
    border-radius: 8px;
    padding: 10px;
    min-width: 300px;
    width: 300px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.week-wrapper.sortable-ghost {
    background: #b0b0b0;
    opacity: 0.5;
}

.week-wrapper > h2 {
    font-size: 1.2em;
    margin-top: 0;
    text-align: center;
    padding: 5px;
    background-color: #c0c0c0;
    border-radius: 4px;
}

.days-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.day-container {
    background-color: #e8e8e8;
    border-radius: 8px;
    padding: 10px;
}

h3 {
    font-size: 1em;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

.draggable-handle-day {
    cursor: grab;
}
.draggable-handle-day:active {
    cursor: grabbing;
}

.topics-list {
    min-height: 100px;
    padding-bottom: 10px;
}

.topic {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start; /* Align handle to the top */
    word-wrap: break-word;
}

.topic-main-area {
    flex-grow: 1;
}

.drag-handle {
    cursor: grab;
    padding: 8px 8px;
    color: #ababab;
    font-size: 1.2em;
}
.drag-handle:hover {
    color: #333;
}
.drag-handle:active {
    cursor: grabbing;
}

.topic-content {
    flex-grow: 1;
    padding: 8px;
    min-height: 24px; /* Ensure it has some height even when empty */
}

.topic-content:empty::before {
    content: 'Skriv emne...';
    color: #aaa;
    font-style: italic;
}

.topic-content:focus {
    outline: 2px solid #007bff;
    border-radius: 4px;
}

.topic-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align icons to the right */
    flex-shrink: 0;
    margin-top: 5px;
    padding: 0 4px;
    border-top: 1px solid #f0f0f0;
}

.topic.sortable-ghost {
    background: #cce5ff;
    opacity: 0.6;
}

.topic.sortable-chosen {
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.delete-topic-btn {
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 10px;
}

.delete-topic-btn:hover {
    color: #d9534f;
}

.note-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.topic:hover .note-btn {
    opacity: 0.6;
}

.note-btn:hover {
    opacity: 1;
}

.note-btn.has-note {
    opacity: 1;
}

.html-toggle-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.2em;
    padding: 0 5px;
    opacity: 0.3;
    transition: opacity 0.2s;
    font-weight: bold;
}
.topic:hover .html-toggle-btn, .topic:hover .note-btn, .topic:hover .link-btn {
    opacity: 0.6;
}
.html-toggle-btn:hover {
    opacity: 1;
}

.link-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1em;
    opacity: 0.3;
    padding: 0 5px;
    transition: opacity 0.2s;
}

.topic:hover .link-btn {
    opacity: 0.6;
}

.link-btn:hover {
    opacity: 1;
}

.topic--has-link .link-btn {
    opacity: 1;
}

/* HTML Source-code editing mode */
.topic .source-code-textarea {
    display: none;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    font-family: monospace;
}

.topic--html-mode .topic-content {
    display: none;
}

.topic--html-mode .source-code-textarea {
    display: block;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
}

#note-textarea {
    width: 100%;
    box-sizing: border-box; /* Sørger for at padding er inkluderet i bredden */
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-family: sans-serif;
    font-size: 1em;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-actions button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

#save-note-btn {
    background-color: #007bff;
    color: white;
}
#save-note-btn:hover {
    background-color: #0056b3;
}

#cancel-note-btn {
    background-color: #e0e0e0;
}
#cancel-note-btn:hover {
    background-color: #c7c7c7;
}

.add-topic-btn {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 8px;
    background-color: #d0d0d0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
    color: #555;
}

.add-topic-btn:hover {
    background-color: #c0c0c0;
}

.modal-hidden {
	display: none !important;
}

.save-btn-success {
    background-color: #218838 !important;
}

.save-btn-error {
    background-color: #d9534f !important;
}

