/* thelounge-plugin-emotes — Emote styles */

/* Inline emote images */
.tl-emote {
	display: inline;
	vertical-align: middle;
	max-height: 128px;
	max-width: 128px;
	margin: 0 2px;
	cursor: default;
}

/* Emote-only messages — the .emote-only class is added by client.js.
   Currently same as base rule; override here to customize emote-only sizing. */

/* Hover tooltip */
.tl-emote-tooltip {
	position: fixed;
	z-index: 10000;
	padding: 4px 8px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.85);
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
	transform: translate(-50%, -100%);
	transition: opacity 0.1s;
}

/* Emote picker button */
#emote-picker-tooltip {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

#emote-picker-btn {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	opacity: 0.6;
	transition: opacity 0.15s;
	color: inherit;
	flex-shrink: 0;
	line-height: 1;
}

#emote-picker-btn:hover {
	opacity: 1;
}

/* Emote picker panel */
#emote-picker-panel {
	position: fixed;
	z-index: 10001;
	width: 340px;
	height: 380px;
	background: var(--body-bg-color, #1e1e2e);
	border: 1px solid var(--border-color, #444);
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
	flex-direction: column;
	overflow: hidden;
}

#emote-picker-search {
	width: 100%;
	padding: 8px 10px;
	border: none;
	border-bottom: 1px solid var(--border-color, #444);
	background: transparent;
	color: inherit;
	font-size: 13px;
	outline: none;
	box-sizing: border-box;
}

#emote-picker-search::placeholder {
	opacity: 0.5;
}

/* Provider tabs */
.emote-picker-tabs {
	display: flex;
	border-bottom: 1px solid var(--border-color, #444);
	flex-shrink: 0;
}

.emote-picker-tab {
	flex: 1;
	padding: 5px 0;
	border: none;
	background: transparent;
	color: inherit;
	font-size: 11px;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.15s;
}

.emote-picker-tab:hover {
	opacity: 0.8;
}

.emote-picker-tab.active {
	opacity: 1;
	border-bottom: 2px solid var(--link-color, #7289da);
}

/* Emote grid */
#emote-picker-grid {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	padding: 6px;
	gap: 2px;
}

.emote-picker-cell {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	border-radius: 4px;
	cursor: pointer;
	padding: 2px;
	transition: background 0.1s;
}

.emote-picker-cell:hover {
	background: rgba(255, 255, 255, 0.1);
}

.emote-picker-cell img {
	max-width: 30px;
	max-height: 30px;
	object-fit: contain;
}

.emote-picker-empty {
	width: 100%;
	text-align: center;
	padding: 20px;
	opacity: 0.5;
	font-size: 13px;
}

/* Emote picker header */
.emote-picker-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	border-bottom: 1px solid var(--border-color, #444);
	flex-shrink: 0;
}

.emote-picker-title {
	font-size: 13px;
	font-weight: 600;
}

.emote-picker-gear {
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	opacity: 0.5;
	color: inherit;
	padding: 2px 4px;
	transition: opacity 0.15s;
}

.emote-picker-gear:hover {
	opacity: 1;
}

/* Settings view */
#emote-picker-settings {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
}

.emote-settings-section {
	margin-bottom: 16px;
}

.emote-settings-section h3 {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 4px 0;
}

.emote-settings-desc {
	font-size: 11px;
	opacity: 0.6;
	margin: 0 0 8px 0;
}

.emote-settings-channel-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 0;
	font-size: 12px;
}

.emote-settings-channel-name {
	font-weight: 600;
	min-width: 80px;
}

.emote-settings-channel-info {
	flex: 1;
	opacity: 0.6;
}

.emote-settings-remove {
	background: none;
	border: none;
	color: #e55;
	font-size: 16px;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}

.emote-settings-add {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 8px;
}

.emote-settings-input {
	width: 100%;
	padding: 5px 8px;
	border: 1px solid var(--border-color, #444);
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font-size: 12px;
	box-sizing: border-box;
}

.emote-settings-input::placeholder {
	opacity: 0.4;
}

.emote-settings-btn {
	padding: 5px 12px;
	border: 1px solid var(--border-color, #444);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.05);
	color: inherit;
	font-size: 12px;
	cursor: pointer;
	margin-top: 4px;
	transition: background 0.15s;
}

.emote-settings-btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.emote-settings-auth-row {
	margin-bottom: 6px;
}

.emote-settings-label {
	display: block;
	font-size: 12px;
	margin-bottom: 2px;
	opacity: 0.8;
}

.emote-settings-status {
	font-size: 11px;
	color: #7c7;
	margin-top: 8px;
	min-height: 16px;
}
