/* Creator articles: shared prose styles for the public page (/article/{slug}), the editor's
   real preview, and the block editor's own chrome (/creator/write). Global (not Blazor-scoped)
   because ArticleBody injects sanitized HTML and the editor builds its DOM in JS — neither
   gets scoped-CSS attributes. */

/* ---------------- prose ---------------- */

.prose-preview h1 { font-size: 1.6rem; font-weight: 700; margin: 1.4rem 0 0.5rem; color: #EAEAEA; }
.prose-preview h2 { font-size: 1.3rem; font-weight: 700; margin: 1.2rem 0 0.45rem; color: #EAEAEA; }
.prose-preview h3 { font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.35rem; color: #EAEAEA; }
.prose-preview p { margin: 0.55rem 0; line-height: 1.7; }
.prose-preview ul, .prose-preview ol { margin: 0.55rem 0 0.55rem 1.4rem; list-style: revert; line-height: 1.65; }
.prose-preview a { color: #5BC0BE; text-decoration: underline; }
.prose-preview strong { color: #EAEAEA; }
.prose-preview table { border-collapse: collapse; margin: 0.75rem 0; width: 100%; font-size: 0.9rem; }
.prose-preview th, .prose-preview td { border: 1px solid rgba(255, 255, 255, 0.12); padding: 0.35rem 0.55rem; text-align: left; }
.prose-preview th { background: rgba(255, 255, 255, 0.05); color: #EAEAEA; }
.prose-preview blockquote { border-left: 3px solid rgba(91, 192, 190, 0.5); padding-left: 0.85rem; margin: 0.75rem 0; color: #9CA3AF; font-style: italic; }
.prose-preview code { background: rgba(255, 255, 255, 0.08); padding: 0.1rem 0.35rem; border-radius: 0.25rem; font-size: 0.88em; }
.prose-preview pre { background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0.5rem; padding: 0.75rem 1rem; overflow-x: auto; margin: 0.75rem 0; }
.prose-preview hr { border: none; border-top: 1px solid rgba(255, 255, 255, 0.1); margin: 1.5rem 0; }
.prose-preview img { max-width: 100%; border-radius: 0.75rem; margin: 0.9rem auto; display: block; }

/* Inline [[Card Name]] mention — hover shows the card via card-hover-preview.js */
.prose-preview a.mm-card-link {
    color: #d4af37;
    text-decoration: none;
    border-bottom: 1px dotted rgba(212, 175, 55, 0.6);
    font-weight: 600;
    cursor: pointer;
}
.prose-preview a.mm-card-link:hover { border-bottom-style: solid; }

/* Single-card showcase widget */
.mm-card-widget { margin: 1.2rem auto; text-align: center; }
.mm-card-widget img {
    width: 260px;
    max-width: 80%;
    border-radius: 4.75%/3.5%;
    margin: 0 auto;
    display: block;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease;
}
.mm-card-widget a:hover img { transform: scale(1.03); }
.mm-card-widget figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: #9CA3AF; }
.mm-card-widget figcaption a { color: #d4af37; text-decoration: none; font-weight: 600; }
.mm-card-widget figcaption a:hover { text-decoration: underline; }

/* ---------------- block editor (/creator/write) — DOM built by article-editor.js ---------------- */

.ae-canvas { display: flex; flex-direction: column; }

.ae-block {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.15s;
}
.ae-block:hover { border-color: rgba(91, 192, 190, 0.35); }
.ae-block.ae-dragging { opacity: 0.45; }
.ae-block.ae-drop-hint { border-color: #5BC0BE; box-shadow: 0 0 0 1px #5BC0BE; }

.ae-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #6B7280;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    user-select: none;
}
.ae-handle { cursor: grab; font-size: 0.95rem; color: #4B5563; padding: 0 0.15rem; }
.ae-handle:hover { color: #9CA3AF; }
.ae-handle:active { cursor: grabbing; }
.ae-kind { flex: 1; }
.ae-actions { display: flex; gap: 0.2rem; opacity: 0; transition: opacity 0.12s; }
.ae-block:hover .ae-actions { opacity: 1; }
.ae-act {
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
}
.ae-act:hover { background: rgba(255, 255, 255, 0.08); color: #EAEAEA; }
.ae-act.ae-del:hover { background: rgba(224, 92, 92, 0.15); color: #e05c5c; }

.ae-body { padding: 0.6rem 0.75rem; }

/* add-block divider */
.ae-add { display: flex; justify-content: center; padding: 0.15rem 0; position: relative; }
.ae-add-btn {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #6B7280;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.35;
    transition: all 0.12s;
}
.ae-add:hover .ae-add-btn, .ae-add-btn:focus { opacity: 1; border-color: #5BC0BE; color: #5BC0BE; transform: scale(1.1); }

.ae-menu {
    position: absolute;
    top: 30px;
    z-index: 40;
    width: 320px;
    max-height: 340px;
    overflow-y: auto;
    background: #12151A;
    border: 1px solid #252A33;
    border-radius: 0.75rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    padding: 0.3rem;
}
.ae-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.45rem 0.6rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-align: left;
}
.ae-menu-item:hover { background: rgba(91, 192, 190, 0.1); }
.ae-menu-icon { font-size: 1.05rem; width: 1.6rem; text-align: center; }
.ae-menu-text { display: flex; flex-direction: column; }
.ae-menu-label { color: #EAEAEA; font-size: 0.85rem; font-weight: 600; }
.ae-menu-hint { color: #6B7280; font-size: 0.72rem; }

/* text block */
.ae-md-toolbar { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-bottom: 0.4rem; }
.ae-md-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 0.35rem;
    color: #9CA3AF;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}
.ae-md-btn:hover { background: rgba(91, 192, 190, 0.15); color: #5BC0BE; }
.ae-text {
    width: 100%;
    min-height: 72px;
    resize: none;
    overflow: hidden;
    background: transparent;
    border: none;
    outline: none;
    color: #D1D5DB;
    font-size: 0.95rem;
    line-height: 1.65;
    font-family: inherit;
}
.ae-premium { border-left: 3px solid #d4af37; border-radius: 0 0.5rem 0.5rem 0; background: rgba(212, 175, 55, 0.04); }
.ae-premium-note { color: #d4af37; font-size: 0.75rem; margin-bottom: 0.4rem; }

/* image block */
.ae-img-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 0.6rem;
    text-align: center;
    position: relative;
    transition: border-color 0.15s;
}
.ae-img-zone.ae-img-empty { padding: 2rem 1rem; cursor: pointer; }
.ae-img-zone.ae-drop-hint { border-color: #5BC0BE; background: rgba(91, 192, 190, 0.06); }
.ae-img-cta { color: #6B7280; font-size: 0.9rem; }
.ae-img-error { color: #e05c5c; font-size: 0.8rem; margin-top: 0.4rem; }
.ae-img-preview { max-width: 100%; max-height: 380px; border-radius: 0.5rem; margin: 0 auto; display: block; }
.ae-img-change, .ae-img-cover {
    position: absolute;
    bottom: 0.5rem;
    background: rgba(10, 14, 19, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #EAEAEA;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.12s;
}
.ae-img-zone:hover .ae-img-change, .ae-img-zone:hover .ae-img-cover { opacity: 1; }
.ae-img-change { right: 0.5rem; }
.ae-img-cover { left: 0.5rem; }
.ae-img-cover:hover { border-color: #d4af37; color: #d4af37; }
.ae-img-alt {
    width: 100%;
    margin-top: 0.4rem;
    background: transparent;
    border: none;
    outline: none;
    color: #9CA3AF;
    font-size: 0.8rem;
    text-align: center;
}

/* card block */
.ae-card-body { display: flex; gap: 0.9rem; align-items: flex-start; }
.ae-card-left { flex: 1; position: relative; }
.ae-card-input, .ae-widget-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #EAEAEA;
    font-size: 0.9rem;
    padding: 0.45rem 0.65rem;
    outline: none;
}
.ae-card-input:focus, .ae-widget-input:focus { border-color: rgba(91, 192, 190, 0.6); }
.ae-card-thumb { width: 120px; border-radius: 4.75%/3.5%; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }

.ae-suggest:empty { display: none; }
.ae-suggest {
    position: absolute;
    left: 0; right: 0;
    z-index: 30;
    background: #12151A;
    border: 1px solid #252A33;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
}
.ae-suggest-item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.65rem;
    background: none;
    border: none;
    color: #EAEAEA;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
}
.ae-suggest-item:hover { background: rgba(91, 192, 190, 0.12); }

/* widget block */
.ae-widget-hint { color: #8b8fa3; font-size: 0.78rem; margin-bottom: 0.5rem; }
.ae-widget-fields { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.ae-field { flex: 1; min-width: 180px; position: relative; }
.ae-field-label {
    display: block;
    color: #6B7280;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

/* editor status pill */
#ae-status[data-state="dirty"] { color: #f7a24f; }
#ae-status[data-state="saved"] { color: #34d399; }
