/* text-editor.css */
.text-editor-container {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--panel-bg);
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    width: 500px;
    z-index: 1000;
    color: var(--text-primary);
    font-family: Arial, sans-serif;
    animation: textEditorFadeIn 0.2s ease-in-out;
}

@keyframes textEditorFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-editor-container.minimized {
    transform: translateY(calc(100% - 40px));
    height: 40px;
    overflow: hidden;
}

.text-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    padding: 0 0 10px 0;
    border-bottom: 1px solid var(--border-color);
    user-select: none;
}

.text-editor-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.text-editor-minimize-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.text-editor-minimize-button:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.text-editor-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.text-editor-input {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

.text-editor-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(124, 124, 124, 0.2);
}

.text-editor-emoji-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    padding: 12px;
    background: var(--bg-main);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.text-editor-emoji-button {
    padding: 8px;
    border: none;
    background: var(--panel-bg);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-editor-emoji-button:hover {
    background: var(--player-bg);
    transform: scale(1.1);
}

.text-editor-controls {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.text-editor-button {
    padding: 10px 20px;
    background: var(--accent);
    color: var(--panel-bg);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.text-editor-button:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.text-editor-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.text-editor-button.secondary {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.text-editor-button.secondary:hover {
    background: var(--player-bg);
}

.text-editor-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.text-editor-style-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--panel-bg);
}

.text-editor-style-item:hover {
    background: var(--player-bg);
    transform: scale(1.02);
}

.text-editor-style-item.selected {
    border-color: var(--accent);
    background: rgba(124, 124, 124, 0.1);
}
