﻿/* =====================================
   Summernote im MudBlazor-Stil
   (mit !important und hoher Spezifität)
   ===================================== */

/* ==== Grundstruktur ==== */
.note-editor.note-frame {
    font-family: var(--mud-typography-default-family, Roboto, sans-serif) !important;
    font-size: 0.875rem !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: var(--mud-default-borderradius) !important;
    box-shadow: none !important;
    background-color: var(--mud-palette-surface, #fff) !important;
}

/* ==== Toolbar ==== */
.note-editor.note-frame .note-toolbar {
    background-color: var(--mud-palette-surface, #f9f9f9) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--mud-default-borderradius) !important;
}

/* ==== Buttons ==== */
.note-editor.note-frame .note-toolbar .note-btn {
    background-color: var(--mud-palette-gray-lighter) !important;
    color: var(--mud-palette-on-primary) !important;
    border: none !important;
    border-radius: var(--mud-default-borderradius) !important;
    padding: 4px 10px !important;
    font-size: 0.75rem !important;
    margin: 2px !important;
    transition: background-color 0.2s ease !important;
}

.note-editor.note-frame .note-toolbar .note-btn:hover,
.note-editor.note-frame .note-toolbar .note-btn:focus {
    background-color: var(--mud-palette-primary-darken, #1565c0) !important;
    color: var(--mud-palette-on-primary) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ==== Dropdown-Menüs ==== */
.note-editor.note-frame .note-dropdown-menu {
    background-color: var(--mud-palette-surface) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: var(--mud-default-borderradius) !important;
    font-size: 0.75rem !important;
    padding: 0.5rem !important;
}

/* ==== Editor-Inhaltsbereich ==== */
.note-editor.note-frame .note-editable {
    background-color: var(--mud-palette-background-default, #fff) !important;
    padding: 1rem !important;
    border-radius: var(--mud-default-borderradius) !important;
    color: var(--mud-palette-text-primary, #212121) !important;
    min-height: 250px !important;
}

/* ==== Placeholder ==== */
.note-editor.note-frame .note-placeholder {
    color: rgba(0, 0, 0, 0.38) !important;
    font-style: italic !important;
}

/* ==== Statusbar unten ==== */
.note-editor.note-frame .note-statusbar {
    display: none !important;
}

/* ==== Modale Fenster ==== */
.note-editor.note-frame .note-modal-content {
    background-color: var(--mud-palette-surface) !important;
    border-radius: var(--mud-default-borderradius) !important;
    padding: 1rem !important;
    color: var(--mud-palette-text-primary) !important;
}

.note-editor.note-frame .note-modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    margin-bottom: 0.5rem !important;
}

.note-editor.note-frame .note-modal-title {
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.note-editor.note-frame .note-modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.12) !important;
    padding-top: 0.75rem !important;
    text-align: right !important;
}

/* ==== Formulare in Modalen ==== */
.note-editor.note-frame .note-form-control,
.note-editor.note-frame .note-input {
    font-size: 0.875rem !important;
    padding: 0.5rem !important;
    border-radius: var(--mud-default-borderradius) !important;
    border: 1px solid rgba(0, 0, 0, 0.23) !important;
    background-color: var(--mud-palette-background-default) !important;
    color: var(--mud-palette-text-primary) !important;
}

/* ==== Modal-Buttons ==== */
.note-editor.note-frame .note-btn-primary {
    background-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-on-primary) !important;
    border-radius: var(--mud-default-borderradius) !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
}

.note-editor.note-frame .note-btn-primary:disabled {
    background-color: rgba(0, 0, 0, 0.26) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ==== Dark Mode ==== */
body.dark-mode .note-editor.note-frame,
body.dark-mode .note-editor.note-frame .note-editable {
    background-color: var(--mud-palette-surface-dark, #1e1e1e) !important;
    color: var(--mud-palette-text-primary, #eee) !important;
}

body.dark-mode .note-editor.note-frame .note-toolbar {
    background-color: #2c2c2c !important;
}

body.dark-mode .note-editor.note-frame .note-toolbar .note-btn {
    background-color: var(--mud-palette-primary) !important;
    color: var(--mud-palette-on-primary) !important;
}

body.dark-mode .note-editor.note-frame .note-toolbar .note-btn:hover {
    background-color: var(--mud-palette-primary-darken) !important;
}

/* ==== CodeView ==== */
.note-editor.note-frame .note-codable {
    background-color: #f5f5f5 !important;
    font-family: monospace !important;
    padding: 1rem !important;
    color: #333 !important;
}
