/* ===== Rich editor – docs-style, skeuomorphic ===== */

.rich-editor-wrap {
    border-radius: 8px;
    overflow: hidden;
    background: repeating-linear-gradient(90deg, transparent 0, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px),
        repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(0,0,0,0.02) 3px, rgba(0,0,0,0.02) 6px),
        linear-gradient(160deg, #e8e0d4 0%, #f0ebe2 30%, #f5f1ea 60%, #e8e0d4 100%);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(0,0,0,0.06);
    border: 2px solid #b8a88a;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #8b7355 0%, #6b5344 50%, #5c4033 100%);
    border-bottom: 2px solid #4a3728;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.12), 0 2px 4px rgba(0,0,0,0.2);
}

.rich-editor-btn {
    padding: 6px 12px;
    border: 1px solid #4a3728;
    border-radius: 6px;
    background: linear-gradient(180deg, #c9b896 0%, #a89068 50%, #8b7355 100%);
    color: #2d2520;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
    transition: transform 0.1s, box-shadow 0.1s;
}

.rich-editor-btn:hover {
    background: linear-gradient(180deg, #d8c8a8 0%, #b8a078 50%, #9a8258 100%);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.4);
}

.rich-editor-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), inset 0 2px 4px rgba(0,0,0,0.2);
}

.rich-editor-select {
    padding: 5px 8px;
    border: 1px solid #4a3728;
    border-radius: 6px;
    background: linear-gradient(180deg, #e8e0d4 0%, #d4c8b8 100%);
    color: #2d2520;
    font-size: 13px;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.rich-editor-font-select {
    min-width: 140px;
}

.rich-editor-color {
    width: 32px;
    height: 28px;
    padding: 2px;
    border: 1px solid #4a3728;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.rich-editor-body {
    padding: 16px 20px;
    min-height: 280px;
    outline: none;
    font-size: 16px;
    line-height: 1.6;
    color: #2d2520;
}

.rich-editor-body:empty::before {
    content: attr(data-placeholder);
    color: #8b7355;
}

.rich-editor-body:focus {
    outline: none;
}

/* Mention chip in editor and in view */
.rich-editor-body .mention,
.article-content .mention {
    background: rgba(100, 150, 255, 0.2);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.article-content .mention {
    text-decoration: none;
    color: inherit;
}

.article-content a.mention {
    color: #2d2520;
}

/* Project embed – card style */
.project-embed {
    display: inline-block;
    margin: 8px 0;
    border: 2px solid #8b7355;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, #f5f1ea 0%, #e8e0d4 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.5);
    max-width: 320px;
}

.project-embed-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #2d2520;
}

.project-embed-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #b8a88a;
}

.project-embed-title {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Mention dropdown */
.rich-editor-mention-dropdown {
    background: linear-gradient(180deg, #f5f1ea 0%, #e8e0d4 100%);
    border: 2px solid #8b7355;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    padding: 6px 0;
    max-height: 220px;
    overflow-y: auto;
}

.rich-editor-mention-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
}

.rich-editor-mention-item:hover {
    background: rgba(139, 115, 85, 0.2);
}
