/**
 * Ayat Event Questions — frontend styles.
 * Scoped under .aeq-wrap so they don't leak into the theme.
 * Override --aeq-accent to match your event branding.
 */
.aeq-wrap {
	--aeq-accent: #0f766e;        /* teal */
	--aeq-accent-dark: #0b5851;
	--aeq-text: #1f2937;
	--aeq-muted: #6b7280;
	--aeq-border: #e5e7eb;
	--aeq-bg: #ffffff;
	--aeq-bg-soft: #f9fafb;
	--aeq-like: #e11d48;
	--aeq-radius: 10px;

	max-width: 1100px;
	margin: 0 auto;
	color: var(--aeq-text);
	font-size: 15px;
	line-height: 1.55;
	box-sizing: border-box;
}
.aeq-wrap *,
.aeq-wrap *::before,
.aeq-wrap *::after {
	box-sizing: border-box;
}

/* Layout */
.aeq-layout {
	display: block;
}
.aeq-main {
	min-width: 0;
}

/* Ask card */
.aeq-ask-card {
	background: var(--aeq-bg);
	border: 1px solid var(--aeq-border);
	border-radius: var(--aeq-radius);
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.aeq-ask-title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 700;
}
.aeq-field {
	margin-bottom: 14px;
}
.aeq-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 13px;
	color: var(--aeq-text);
}
.aeq-optional {
	font-weight: 400;
	color: var(--aeq-muted);
}
.aeq-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--aeq-border);
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	color: var(--aeq-text);
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.aeq-input:focus {
	outline: none;
	border-color: var(--aeq-accent);
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.aeq-textarea {
	resize: vertical;
	min-height: 90px;
}
.aeq-charcount {
	text-align: right;
	font-size: 12px;
	color: var(--aeq-muted);
	margin-top: 4px;
}

/* Honeypot — keep visually and semantically hidden */
.aeq-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 0;
	width: 0;
	overflow: hidden;
}

.aeq-form-footer {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

/* Buttons */
.aeq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	background: var(--aeq-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s, transform 0.05s;
}
.aeq-btn:hover {
	background: var(--aeq-accent-dark);
}
.aeq-btn:active {
	transform: translateY(1px);
}
.aeq-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Form message */
.aeq-form-message {
	font-size: 14px;
	font-weight: 500;
}
.aeq-form-message.is-success {
	color: var(--aeq-accent);
}
.aeq-form-message.is-error {
	color: #b91c1c;
}

/* Toolbar */
.aeq-toolbar {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 16px;
}
.aeq-search-box {
	flex: 1 1 260px;
}
.aeq-search {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--aeq-border);
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	background: #fff;
}
.aeq-search:focus {
	outline: none;
	border-color: var(--aeq-accent);
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.aeq-sort-box {
	display: flex;
	align-items: center;
	gap: 8px;
}
.aeq-sort-label {
	font-size: 13px;
	color: var(--aeq-muted);
	white-space: nowrap;
}
.aeq-sort {
	padding: 10px 12px;
	border: 1px solid var(--aeq-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	cursor: pointer;
}

/* List */
.aeq-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.aeq-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	background: var(--aeq-bg);
	border: 1px solid var(--aeq-border);
	border-radius: var(--aeq-radius);
	padding: 16px 18px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	transition: box-shadow 0.15s;
}
.aeq-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.aeq-item-body {
	min-width: 0;
	flex: 1;
}
.aeq-item-question {
	margin: 0 0 8px;
	font-size: 15.5px;
	font-weight: 600;
	color: var(--aeq-text);
	word-wrap: break-word;
	overflow-wrap: break-word;
}
.aeq-item-meta {
	font-size: 13px;
	color: var(--aeq-muted);
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.aeq-item-author {
	font-weight: 600;
	color: var(--aeq-accent);
}
.aeq-dot {
	opacity: 0.5;
}

/* Like button */
.aeq-item-actions {
	flex-shrink: 0;
}
.aeq-like-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border: 1px solid var(--aeq-border);
	border-radius: 999px;
	background: #fff;
	color: var(--aeq-muted);
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.15s;
	min-width: 62px;
	justify-content: center;
}
.aeq-like-btn:hover {
	border-color: var(--aeq-like);
	color: var(--aeq-like);
}
.aeq-like-btn.is-liked {
	background: rgba(225, 29, 72, 0.08);
	border-color: var(--aeq-like);
	color: var(--aeq-like);
}
.aeq-like-btn.is-liked .aeq-like-icon svg path {
	fill: var(--aeq-like);
	stroke: var(--aeq-like);
}
.aeq-like-icon {
	display: inline-flex;
	line-height: 0;
}
.aeq-like-btn.aeq-pop .aeq-like-icon {
	animation: aeq-pop 0.3s ease;
}
@keyframes aeq-pop {
	0%   { transform: scale(1); }
	40%  { transform: scale(1.35); }
	100% { transform: scale(1); }
}

/* Newly arrived (live-polled) question highlight */
.aeq-item.aeq-new {
	animation: aeq-new-in 2.5s ease;
}
@keyframes aeq-new-in {
	0%   { background: rgba(15, 118, 110, 0.14); box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.35); }
	100% { background: var(--aeq-bg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); }
}

/* Empty + loading states */
.aeq-empty {
	text-align: center;
	padding: 40px 20px;
	color: var(--aeq-muted);
	background: var(--aeq-bg-soft);
	border: 1px dashed var(--aeq-border);
	border-radius: var(--aeq-radius);
}
.aeq-more-wrap {
	text-align: center;
	margin-top: 18px;
}
.aeq-list-loading {
	text-align: center;
	padding: 14px;
	color: var(--aeq-muted);
}

/* Responsive */
@media (max-width: 560px) {
	.aeq-item {
		flex-direction: column;
	}
	.aeq-item-actions {
		align-self: flex-start;
	}
	.aeq-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
	.aeq-sort-box {
		justify-content: space-between;
	}
}
