/* İki modlu HTML editörü (wwwroot/js/html-editor.js) */

.rte {
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    overflow: hidden;
    background: var(--bs-body-bg);
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
    padding: .5rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}

.rte-block-select {
    width: auto;
    min-width: 8.5rem;
    margin-right: .25rem;
}

.rte-btn {
    --bs-btn-padding-x: .55rem;
    --bs-btn-padding-y: .3rem;
    border: 1px solid transparent;
    line-height: 1.2;
}

.rte-btn:hover {
    border-color: var(--bs-border-color);
    background: var(--bs-secondary-bg);
}

.rte-separator {
    width: 1px;
    align-self: stretch;
    margin: .125rem .375rem;
    background: var(--bs-border-color);
}

.rte-content {
    min-height: 460px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 1.15rem;
    outline: none;
    font-size: 1rem;
    line-height: 1.65;
    word-break: break-word;
}

.rte-content:focus {
    box-shadow: inset 0 0 0 2px rgba(102, 126, 234, .25);
}

/* Editör içindeki içeriğin makul görünmesi için temel tipografi.
   Kaydedilen HTML'i etkilemez, yalnızca düzenleme görünümüdür. */
.rte-content > :first-child {
    margin-top: 0;
}

.rte-content h1 { font-size: 1.75rem; font-weight: 700; margin: 1.25rem 0 .75rem; }
.rte-content h2 { font-size: 1.4rem; font-weight: 700; margin: 1.15rem 0 .65rem; }
.rte-content h3 { font-size: 1.15rem; font-weight: 600; margin: 1rem 0 .5rem; }
.rte-content p { margin: 0 0 .85rem; }
.rte-content ul,
.rte-content ol { margin: 0 0 .85rem; padding-left: 1.5rem; }
.rte-content li { margin-bottom: .3rem; }

.rte-content blockquote {
    margin: 0 0 .85rem;
    padding: .5rem 0 .5rem 1rem;
    border-left: 3px solid var(--bs-primary-border-subtle, #adb5bd);
    color: var(--bs-secondary-color);
}

.rte-content pre {
    margin: 0 0 .85rem;
    padding: .75rem 1rem;
    border-radius: .375rem;
    background: var(--bs-secondary-bg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .875rem;
    white-space: pre-wrap;
}

.rte-content img {
    max-width: 100%;
    height: auto;
    border-radius: .375rem;
}

.rte-content table {
    width: 100%;
    margin-bottom: .85rem;
    border-collapse: collapse;
}

.rte-content th,
.rte-content td {
    padding: .45rem .6rem;
    border: 1px solid var(--bs-border-color);
}

.rte-content a {
    color: var(--bs-link-color);
    text-decoration: underline;
}

/* Kaynak (HTML) modu */
.rte-source {
    min-height: 460px;
    max-height: 60vh;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .8125rem;
    line-height: 1.6;
    tab-size: 2;
}

.rte-preview {
    width: 100%;
    min-height: 460px;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: #fff;
}
