/**
 * AnteEnti Telugu Q&A UI - AnsPress Question Cards
 *
 * Purpose:
 * - Style AnsPress question list area
 * - Style AnsPress search/filter toolbar
 * - Convert default question rows into modern Telugu-first cards
 * - Improve mobile cards so they look larger, cleaner, and closer to the reference UI
 *
 * Important:
 * - Scoped only to our Q&A UI pages.
 * - Does not touch Neve menu/header.
 * - Does not edit AnsPress core.
 */


/* ---------------------------------------------------------
   1. AnsPress Main Container Reset
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress,
body.anteenti-qa-ui .anspress {
	font-family: var(--anteenti-font-main);
	color: var(--anteenti-color-text);
}

body.anteenti-qa-ui #anspress {
	background: transparent;
}

body.anteenti-qa-ui #anspress * {
	box-sizing: border-box;
}


/* ---------------------------------------------------------
   2. AnsPress Question List Toolbar
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .ap-list-head {
	margin-bottom: var(--anteenti-space-md);
	padding: var(--anteenti-space-md);
	background: var(--anteenti-color-surface);
	border: 1px solid var(--anteenti-color-border);
	border-radius: var(--anteenti-radius-lg);
	box-shadow: var(--anteenti-shadow-xs);
}

body.anteenti-qa-ui #anspress .ap-list-head .ap-btn,
body.anteenti-qa-ui #anspress .ap-list-head button,
body.anteenti-qa-ui #anspress .ap-list-head input[type="submit"] {
	min-height: 38px;
	padding: 8px 14px;
	border: 1px solid transparent;
	border-radius: var(--anteenti-radius-pill);
	background: var(--anteenti-color-action);
	color: #ffffff;
	font-family: var(--anteenti-font-main);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition:
		background-color var(--anteenti-transition-fast),
		box-shadow var(--anteenti-transition-fast),
		transform var(--anteenti-transition-fast);
}

body.anteenti-qa-ui #anspress .ap-list-head .ap-btn:hover,
body.anteenti-qa-ui #anspress .ap-list-head button:hover,
body.anteenti-qa-ui #anspress .ap-list-head input[type="submit"]:hover {
	background: var(--anteenti-color-action-dark);
	color: #ffffff;
	box-shadow: var(--anteenti-shadow-xs);
	transform: translateY(-1px);
}

body.anteenti-qa-ui #anspress .ap-list-head input[type="search"],
body.anteenti-qa-ui #anspress .ap-list-head input[type="text"] {
	min-height: 40px;
	padding: 9px 12px;
	border: 1px solid var(--anteenti-color-border-strong);
	border-radius: var(--anteenti-radius-md);
	background: #ffffff;
	color: var(--anteenti-color-text);
	font-family: var(--anteenti-font-main);
	font-size: 0.95rem;
}

body.anteenti-qa-ui #anspress .ap-list-head input[type="search"]:focus,
body.anteenti-qa-ui #anspress .ap-list-head input[type="text"]:focus {
	outline: none;
	border-color: var(--anteenti-color-primary);
	box-shadow: 0 0 0 3px rgba(122, 31, 43, 0.12);
}

body.anteenti-qa-ui #anspress .ap-list-head a {
	color: var(--anteenti-color-primary);
	font-family: var(--anteenti-font-main);
	font-weight: 700;
	text-decoration: none;
}

body.anteenti-qa-ui #anspress .ap-list-head a:hover {
	color: var(--anteenti-color-primary-dark);
	text-decoration: none;
}


/* ---------------------------------------------------------
   3. AnsPress Filter Links
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .ap-filters {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: var(--anteenti-space-sm);
	color: var(--anteenti-color-muted);
	font-size: 0.9rem;
}

body.anteenti-qa-ui #anspress .ap-filters a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 5px 10px;
	background: var(--anteenti-color-bg-soft);
	border: 1px solid var(--anteenti-color-border);
	border-radius: var(--anteenti-radius-pill);
	color: var(--anteenti-color-primary);
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
}

body.anteenti-qa-ui #anspress .ap-filters a:hover,
body.anteenti-qa-ui #anspress .ap-filters a.active {
	background: var(--anteenti-color-primary-soft);
	border-color: rgba(122, 31, 43, 0.18);
	color: var(--anteenti-color-primary-dark);
}


/* ---------------------------------------------------------
   4. Question List Wrapper
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .ap-questions,
body.anteenti-qa-ui #anspress .ap-questions-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
}

/* ---------------------------------------------------------
   13. Empty State
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .ap-no-questions,
body.anteenti-qa-ui #anspress .ap-notice,
body.anteenti-qa-ui #anspress .ap-notice-red,
body.anteenti-qa-ui #anspress .ap-notice-yellow,
body.anteenti-qa-ui #anspress .ap-notice-blue,
body.anteenti-qa-ui #anspress .ap-notice-gray {
	margin: 0;
	padding: var(--anteenti-space-lg);
	background: var(--anteenti-color-surface);
	border: 1px solid var(--anteenti-color-border);
	border-radius: var(--anteenti-radius-lg);
	box-shadow: var(--anteenti-shadow-xs);
	color: var(--anteenti-color-muted);
	font-family: var(--anteenti-font-main);
	font-size: 0.95rem;
	line-height: 1.7;
	text-align: center;
}


/* ---------------------------------------------------------
   14. Pagination
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .ap-pagination,
body.anteenti-qa-ui #anspress .pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: var(--anteenti-space-lg);
}

body.anteenti-qa-ui #anspress .ap-pagination a,
body.anteenti-qa-ui #anspress .ap-pagination span,
body.anteenti-qa-ui #anspress .pagination a,
body.anteenti-qa-ui #anspress .pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	background: var(--anteenti-color-surface);
	border: 1px solid var(--anteenti-color-border);
	border-radius: var(--anteenti-radius-pill);
	color: var(--anteenti-color-primary);
	font-family: var(--anteenti-font-main);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}

body.anteenti-qa-ui #anspress .ap-pagination .current,
body.anteenti-qa-ui #anspress .pagination .current,
body.anteenti-qa-ui #anspress .ap-pagination a:hover,
body.anteenti-qa-ui #anspress .pagination a:hover {
	background: var(--anteenti-color-primary);
	border-color: var(--anteenti-color-primary);
	color: #ffffff;
}


/* ---------------------------------------------------------
   15. Home Feed Minor Spacing
--------------------------------------------------------- */

body.anteenti-qa-page-home .anteenti-home-feed #anspress {
	margin-top: var(--anteenti-space-sm);
}


/* ---------------------------------------------------------
   16. Strong Mobile Toolbar Refinement
--------------------------------------------------------- */

@media (max-width: 768px) {
	body.anteenti-qa-ui #anspress .ap-list-head {
		padding: 12px;
		border-radius: var(--anteenti-radius-lg);
	}

	body.anteenti-qa-ui #anspress .ap-list-head form {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	body.anteenti-qa-ui #anspress .ap-list-head input[type="search"],
	body.anteenti-qa-ui #anspress .ap-list-head input[type="text"] {
		width: 100%;
		min-height: 42px;
		order: 1;
	}

	body.anteenti-qa-ui #anspress .ap-list-head input[type="submit"],
	body.anteenti-qa-ui #anspress .ap-list-head button {
		width: 100%;
		min-height: 40px;
		order: 2;
	}

	body.anteenti-qa-ui #anspress .ap-list-head .ap-btn {
		width: 100%;
		min-height: 40px;
		order: 3;
	}

	body.anteenti-qa-ui #anspress .ap-filters {
		order: 4;
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 8px;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		margin-top: 2px;
		padding: 4px 0 6px;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	body.anteenti-qa-ui #anspress .ap-filters::-webkit-scrollbar {
		display: none;
	}

	body.anteenti-qa-ui #anspress .ap-filters > * {
		flex: 0 0 auto !important;
		width: auto !important;
		max-width: none !important;
		white-space: nowrap !important;
	}

	body.anteenti-qa-ui #anspress .ap-filters a,
	body.anteenti-qa-ui #anspress .ap-filters span {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		min-height: 30px;
		padding: 5px 10px;
		border-radius: var(--anteenti-radius-pill);
		font-size: 0.8rem;
		line-height: 1.2;
	}

	body.anteenti-qa-ui #anspress .ap-filters br {
		display: none !important;
	}
}


/* =========================================================
   AnteEnti Custom Mobile-First Question Cards
   Replaces default AnsPress list-item visual structure
========================================================= */

body.anteenti-qa-ui #anspress .ap-questions {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
}

body.anteenti-qa-ui #anspress .anteenti-question-card {
	position: relative;
	width: 100%;
	margin: 0;
	padding: 14px;
	background: var(--anteenti-color-surface);
	border: 1px solid var(--anteenti-color-border);
	border-radius: 16px;
	box-shadow: 0 6px 16px rgba(31, 24, 18, 0.08);
	overflow: hidden;
}

body.anteenti-qa-ui #anspress .anteenti-question-card::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(circle at top left, rgba(255,255,255,0.7), transparent 45%),
		linear-gradient(135deg, rgba(255,255,255,0.4), transparent 60%);
	opacity: 0.75;
}

body.anteenti-qa-ui #anspress .anteenti-question-card > * {
	position: relative;
	z-index: 1;
}

/* Top user row */
body.anteenti-qa-ui #anspress .anteenti-question-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__author {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	color: var(--anteenti-color-text);
	font-family: var(--anteenti-font-main);
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__avatar,
body.anteenti-qa-ui #anspress .anteenti-question-card__avatar img {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	flex: 0 0 auto;
	object-fit: cover;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__author-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Verified badge */
body.anteenti-qa-ui #anspress .anteenti-question-card__verified {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
	max-width: 48%;
	padding: 3px 7px;
	background: rgba(20, 132, 72, 0.1);
	border: 1px solid rgba(20, 132, 72, 0.18);
	border-radius: 999px;
	color: #13723f;
	font-family: var(--anteenti-font-main);
	font-size: 0.66rem;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__verified-dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #148448;
	color: #ffffff;
	font-size: 0.58rem;
	line-height: 1;
}

/* Title */
body.anteenti-qa-ui #anspress .anteenti-question-card__title {
	margin: 0;
	padding: 0;
	font-family: var(--anteenti-font-main);
}

body.anteenti-qa-ui #anspress .anteenti-question-card__title-link {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--anteenti-color-text);
	font-family: var(--anteenti-font-main);
	font-size: 1.02rem;
	font-weight: 850;
	line-height: 1.34;
	letter-spacing: -0.01em;
	text-decoration: none;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__title-link:hover {
	color: var(--anteenti-color-primary);
	text-decoration: none;
}

/* Excerpt */
body.anteenti-qa-ui #anspress .anteenti-question-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 6px 0 0;
	color: var(--anteenti-color-text-soft);
	font-family: var(--anteenti-font-main);
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.45;
}

/* Topic pills */
body.anteenti-qa-ui #anspress .anteenti-question-card__topics {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 6px;
	margin-top: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__topics::-webkit-scrollbar {
	display: none;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: 22px;
	padding: 3px 8px;
	background: var(--anteenti-color-bg-soft);
	border: 1px solid var(--anteenti-color-border);
	border-radius: 999px;
	color: var(--anteenti-color-muted);
	font-family: var(--anteenti-font-main);
	font-size: 0.68rem;
	font-weight: 750;
	line-height: 1.2;
	text-decoration: none;
}

/* Bottom row */
body.anteenti-qa-ui #anspress .anteenti-question-card__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 11px;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__stats {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__stats::-webkit-scrollbar {
	display: none;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__stat {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
	min-height: 26px;
	padding: 3px 7px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid var(--anteenti-color-border);
	border-radius: 999px;
	color: var(--anteenti-color-muted);
	font-family: var(--anteenti-font-main);
	font-size: 0.69rem;
	font-weight: 750;
	line-height: 1.2;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__stat-value {
	color: var(--anteenti-color-text);
	font-weight: 850;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__stat-label {
	color: var(--anteenti-color-muted);
	font-weight: 750;
}

/* CTA */
body.anteenti-qa-ui #anspress .anteenti-question-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: 30px;
	padding: 5px 11px;
	background: var(--anteenti-color-action);
	border: 1px solid var(--anteenti-color-action);
	border-radius: 999px;
	color: #ffffff;
	font-family: var(--anteenti-font-main);
	font-size: 0.72rem;
	font-weight: 850;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: 0 6px 14px rgba(37, 127, 76, 0.18);
}

body.anteenti-qa-ui #anspress .anteenti-question-card__cta:hover {
	background: var(--anteenti-color-action-dark);
	border-color: var(--anteenti-color-action-dark);
	color: #ffffff;
	text-decoration: none;
}

/* Desktop / tablet improvement */
@media (min-width: 769px) {
	body.anteenti-qa-ui #anspress .ap-questions {
		gap: 18px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card {
		padding: 20px 22px;
		border-radius: 20px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__avatar,
	body.anteenti-qa-ui #anspress .anteenti-question-card__avatar img {
		width: 30px;
		height: 30px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__author {
		font-size: 0.86rem;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__verified {
		font-size: 0.74rem;
		padding: 4px 9px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__title-link {
		font-size: 1.28rem;
		line-height: 1.38;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__excerpt {
		font-size: 0.95rem;
		line-height: 1.55;
		max-width: 760px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__pill {
		font-size: 0.76rem;
		min-height: 25px;
		padding: 4px 10px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__stat {
		font-size: 0.78rem;
		min-height: 30px;
		padding: 5px 10px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__cta {
		font-size: 0.82rem;
		min-height: 34px;
		padding: 6px 15px;
	}
}

/* Very small mobile */
@media (max-width: 380px) {
	body.anteenti-qa-ui #anspress .anteenti-question-card {
		padding: 12px;
		border-radius: 15px;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__title-link {
		font-size: 0.96rem;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__excerpt {
		font-size: 0.78rem;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__cta {
		padding-left: 9px;
		padding-right: 9px;
		font-size: 0.68rem;
	}

	body.anteenti-qa-ui #anspress .anteenti-question-card__verified {
		max-width: 45%;
		font-size: 0.62rem;
	}
}
/* Question type label */
body.anteenti-qa-ui #anspress .anteenti-question-card__type {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	width: fit-content;
	margin: 2px 0 6px;
	padding: 3px 8px;
	background: var(--anteenti-color-primary-soft);
	border: 1px solid rgba(122, 31, 43, 0.14);
	border-radius: 999px;
	color: var(--anteenti-color-primary-dark);
	font-family: var(--anteenti-font-main);
	font-size: 0.68rem;
	font-weight: 850;
	line-height: 1.2;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__type-icon {
	font-size: 0.72rem;
	line-height: 1;
}

body.anteenti-qa-ui #anspress .anteenti-question-card__type-text {
	line-height: 1;
}

/* Desktop slightly bigger */
@media (min-width: 769px) {
	body.anteenti-qa-ui #anspress .anteenti-question-card__type {
		margin-bottom: 8px;
		padding: 4px 10px;
		font-size: 0.76rem;
	}
}