/**
 * MV Studio — @ mention dropdown styles
 * โทนสีเข้ม + gold/amber accent ให้เข้ากับธีมเดิมของปลั๊กอิน
 */

.iimate-mv-mention-dropdown {
    position: absolute;
    z-index: 99999;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    background: #1c1c1c;
    border: 1px solid #3a3a3a;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
}

.iimate-mv-mention-group-header {
    padding: 8px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a8a8a;
}

.iimate-mv-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.iimate-mv-mention-item:hover,
.iimate-mv-mention-item.is-active {
    background: rgba(245, 166, 35, 0.14);
}

.iimate-mv-mention-thumb {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: #555555;
}

.iimate-mv-mention-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.iimate-mv-mention-text {
    flex: 1 1 auto;
    min-width: 0;
}

.iimate-mv-mention-label {
    font-size: 14px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iimate-mv-mention-handle {
    font-size: 12px;
    color: #f5a623;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iimate-mv-mention-empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #999999;
    text-align: center;
}

/**
 * Highlight overlay — ทำให้ @mention ในกล่องพิมพ์มีสี
 * ดูคำอธิบายเทคนิคใน mv-studio.js (setupHighlightOverlay)
 */
.iimate-mv-mention-wrapper {
    position: relative;
}

.iimate-mv-mention-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
    background: transparent;
    color: #ffffff;
    z-index: 2;
}

.iimate-mv-mention-backdrop mark.iimate-mv-mention-highlight {
    color: #f5a623;
    background: transparent;
    font: inherit;
}

textarea.iimate-mv-has-highlight {
    position: relative;
    z-index: 1;
    background: transparent !important;
    color: transparent !important;
    caret-color: #ffffff;
}

/**
 * Compact toolbar ใต้กล่องพิมพ์ (สไตล์ Higgsfield)
 */
.iimate-mv-mention-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-top: 1px solid #333333;
    overflow-x: auto;
    scrollbar-width: thin;
}

.iimate-mv-toolbar-at-btn {
    flex: 0 0 auto;
    padding: 4px 12px;
    border: 1px solid #444444;
    border-radius: 999px;
    background: transparent;
    color: #f5a623;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.iimate-mv-toolbar-at-btn:hover {
    background: rgba(245, 166, 35, 0.12);
}

.iimate-mv-toolbar-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.iimate-mv-toolbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px 2px 2px;
    background: #262626;
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    flex: 0 0 auto;
}

.iimate-mv-toolbar-chip-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: #555555;
    flex: 0 0 auto;
}

.iimate-mv-toolbar-chip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.iimate-mv-toolbar-chip-label {
    font-size: 11px;
    color: #f5a623;
    white-space: nowrap;
}