/* Dark Mode Trix Editor Theme */

.dark-editor {
    background-color: #18181b;
    /* zinc-950 */
    border: 1px solid #27272a;
    /* zinc-800 */
}

/* Toolbar Styling */
trix-toolbar .trix-button-group {
    background-color: #27272a;
    /* zinc-800 */
    border: 1px solid #3f3f46;
    /* zinc-700 */
    border-radius: 6px;
    margin-bottom: 12px;
}

trix-toolbar .trix-button {
    border-bottom: none !important;
    border-left: 1px solid #3f3f46 !important;
    /* zinc-700 */
    background-color: transparent;
    width: 36px;
    /* consistent width */
    height: 36px;
}

trix-toolbar .trix-button:first-child {
    border-left: none !important;
}

trix-toolbar .trix-button.trix-active {
    background-color: #3b82f6;
    /* blue-500 */
}

trix-toolbar .trix-button--icon::before {
    filter: invert(1);
    /* Make icons white */
    opacity: 0.7;
}

trix-toolbar .trix-button.trix-active::before {
    opacity: 1;
    filter: invert(0);
    /* Active state icons (on blue bg) should be black or dark */
}

trix-toolbar .trix-button:hover::before {
    opacity: 1;
}

trix-toolbar .trix-button:disabled::before {
    opacity: 0.2;
}

/* Editor Input Area */
trix-editor {
    border: none !important;
    padding: 1rem !important;
    color: #f4f4f5;
    /* zinc-100 */
    min-height: 400px !important;
    font-size: 1.1rem;
    /* slightly larger for readability */
    line-height: 1.75;
}

trix-editor:empty:not(:focus)::before {
    color: #71717a;
    /* zinc-500 placeholder */
}

trix-editor a {
    color: #60a5fa;
    /* blue-400 */
    text-decoration: underline;
}

trix-editor h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

trix-editor blockquote {
    border-left: 4px solid #3f3f46;
    /* zinc-700 */
    padding-left: 1rem;
    margin-left: 0;
    color: #a1a1aa;
    /* zinc-400 */
    font-style: italic;
}

trix-editor code,
trix-editor pre {
    background-color: #27272a;
    /* zinc-800 */
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #e4e4e7;
    /* zinc-200 */
}

trix-editor pre {
    padding: 1rem;
    overflow-x: auto;
}

trix-editor .attachment {
    position: relative;
    width: 100%;
    margin: 0;
}

/* Hide the caption editor input inside the editor to keep it clean, 
   or style it to be visible but dark. Let's style it dark. */
trix-editor .attachment__caption-editor {
    color: #a1a1aa;
    /* zinc-400 */
    background: transparent;
}