﻿
/* Tiptap adds the .tiptap class to the editor content area */
.tiptap {
    border: 1px solid #ccc;
    padding: 10px;
    min-height: 100px; /* Essential: gives the editor a shape when empty */
    outline: solid;
    flex-grow: 1;
}
.tiptap p,
.tiptap ul {
    margin-bottom : 0px;
}
/* Ensure the ProseMirror container itself is styled if needed */
.ProseMirror {
    min-height: 100px;
}

.toolbar {
    background: #f3f3f3;
    padding: 5px;
    border: 1px solid #ccc;
    border-bottom: none;
}

    .toolbar-button {
        padding: 5px 10px;
        margin-right: 2px;
        cursor: pointer;
        background: white;
        border: 1px solid #ddd;
    }

    .too1bar-padding {
        margin-top: 4px;
        padding-top:12px;
    }
.scroll-container button {
    margin: 2px;
}
.tiptap span[style*="background-color"] {
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

.tiptap strong {
    font-weight: bold !important;
}

.tiptap em {
    font-style: italic !important;
}

.tiptap h1 {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.tiptap h2 {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

/* Target the task list items */
li[data-type="taskItem"] {
    display: flex; /* Aligns checkbox and content horizontally */
    align-items: flex-start; /* Keeps checkbox at the top for multi-line text */
    margin-bottom: 0.5rem;
}

    /* Style the checkbox container */
    li[data-type="taskItem"] > label {
        flex: 0 0 auto; /* Prevents checkbox from shrinking */
        margin-right: 0.5rem;
        user-select: none;
    }

    /* Style the text content */
    li[data-type="taskItem"] > div {
        flex: 1 1 auto; /* Allows text to fill remaining space */
    }

    /* Optional: Strikethrough for completed tasks */
    li[data-type="taskItem"][data-checked="true"] > div {
        text-decoration: line-through;
        color: #adb5bd;
    }

.tiptap ul[data-type=taskList] li {
    align-items: center;
    display: flex;
}

[data-type=taskList] li {
    display: flex;
    align-items: flex-start;
    gap: .25rem;
}
/* Ensure the checkbox looks checked based on the data attribute */
li[data-type="taskItem"][data-checked="true"] > label > input[type="checkbox"] {
    background-color: #007bff; /* Example: blue when checked */
}

/* Style links inside the editor */
.tiptap a {
    color: var(--mud-palette-primary); /* Uses MudBlazor's primary color */
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.2s;
}

    .tiptap a:hover {
        opacity: 0.7;
        color: var(--mud-palette-secondary);
    }

    /* Optional: Add a small icon after external links */
    .tiptap a[target="_blank"]::after {
        content: " ↗";
        font-size: 0.8em;
        opacity: 0.6;
    }
