/* =========================================================
   AnteEnti Telugu Q&A UI

   File:
   assets/css/components/answer-card.css

   Component:
   Answer Card Component v1

   Explanation:
   This file controls the visual styling for the reusable Answer Card
   component rendered from:

   includes/components/answer-card.php

   Current flow:

   templates/anspress/answer.php
   ↓
   Answer Card Component
   ↓
   Answer Card Connector
   ↓
   WordPress + AnsPress data

   Why this file exists:
   Earlier, Answer Card styling was mixed into single-question.css.
   That worked, but as we move into component architecture, the actual
   Answer Card design should live close to the Answer Card component.

   This file keeps Answer Card styling reusable for:

   - Single Question Page
   - Profile Answers List
   - User Activity
   - Best Answer Highlights
   - Future Answer Archive Sections

   This keeps the project moving toward:

   Pages
   ↓
   Components
   ↓
   Templates
   ↓
   Connectors
   ↓
   Data Sources
========================================================= */


/* ---------------------------------------------------------
   Answer Card Base
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card {
	position: relative;
	width: 100%;
	margin: 0 0 18px;
	padding: 0;
	background: transparent;
	border: 0;
	font-family: var(--anteenti-font-main);
}

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

body.anteenti-qa-ui #anspress .anteenti-answer-card__inner::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.72;
}

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


/* ---------------------------------------------------------
   Best / Selected Answer
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card--best .anteenti-answer-card__inner {
	border-color: rgba(20, 132, 72, 0.28);
	box-shadow: 0 8px 20px rgba(20, 132, 72, 0.12);
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__best-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: fit-content;
	margin-bottom: 12px;
	padding: 5px 10px;
	background: rgba(20, 132, 72, 0.1);
	border: 1px solid rgba(20, 132, 72, 0.2);
	border-radius: 999px;
	color: #13723f;
	font-family: var(--anteenti-font-main);
	font-size: 0.76rem;
	font-weight: 850;
	line-height: 1.2;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__best-label span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #148448;
	color: #ffffff;
	font-size: 0.66rem;
	line-height: 1;
}


/* ---------------------------------------------------------
   Top Author Row
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__author {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	color: var(--anteenti-color-text);
	font-family: var(--anteenti-font-main);
	text-decoration: none;
}

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

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

body.anteenti-qa-ui #anspress .anteenti-answer-card__author strong {
	display: block;
	max-width: 180px;
	overflow: hidden;
	color: var(--anteenti-color-text);
	font-size: 0.88rem;
	font-weight: 850;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__author small {
	display: block;
	margin-top: 2px;
	color: var(--anteenti-color-muted);
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.25;
}


/* ---------------------------------------------------------
   Answer Content
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card__content {
	margin: 0;
	color: var(--anteenti-color-text);
	font-family: var(--anteenti-font-main);
	font-size: 0.94rem;
	font-weight: 500;
	line-height: 1.75;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__content p {
	margin: 0 0 12px;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__content p:last-child {
	margin-bottom: 0;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__content a {
	color: var(--anteenti-color-primary);
	font-weight: 750;
	text-decoration: none;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__content a:hover {
	color: var(--anteenti-color-primary-dark);
	text-decoration: underline;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__content img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}


/* ---------------------------------------------------------
   Footer Actions
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--anteenti-color-border);
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__left-actions,
body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__comment,
body.anteenti-qa-ui #anspress .anteenti-answer-card__select a,
body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions a,
body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions button {
	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: 999px;
	color: var(--anteenti-color-primary);
	font-family: var(--anteenti-font-main);
	font-size: 0.76rem;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__comment:hover,
body.anteenti-qa-ui #anspress .anteenti-answer-card__select a:hover,
body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions a:hover,
body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions button:hover {
	background: var(--anteenti-color-primary-soft);
	border-color: rgba(122, 31, 43, 0.18);
	color: var(--anteenti-color-primary-dark);
	text-decoration: none;
}


/* ---------------------------------------------------------
   Vote Area Compatibility
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card__vote {
	display: inline-flex;
	align-items: center;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card__vote .ap-vote,
body.anteenti-qa-ui #anspress .anteenti-answer-card__vote .ap-vote-net,
body.anteenti-qa-ui #anspress .anteenti-answer-card__vote .ap-vote-up,
body.anteenti-qa-ui #anspress .anteenti-answer-card__vote .ap-vote-down {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}


/* ---------------------------------------------------------
   AnsPress Comments Compatibility
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card .ap-comments {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--anteenti-color-border);
}

body.anteenti-qa-ui #anspress .anteenti-answer-card .ap-comment {
	font-family: var(--anteenti-font-main);
}


/* ---------------------------------------------------------
   Controlled Variants
--------------------------------------------------------- */

body.anteenti-qa-ui #anspress .anteenti-answer-card--compact .anteenti-answer-card__inner {
	padding: 14px;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card--compact .anteenti-answer-card__content {
	font-size: 0.9rem;
	line-height: 1.65;
}

body.anteenti-qa-ui #anspress .anteenti-answer-card--profile .anteenti-answer-card__footer {
	display: none;
}


/* ---------------------------------------------------------
   Desktop / Tablet
--------------------------------------------------------- */

@media (min-width: 769px) {
	body.anteenti-qa-ui #anspress .anteenti-answer-card {
		margin-bottom: 22px;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__inner {
		padding: 22px 24px;
		border-radius: 22px;
	}

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

	body.anteenti-qa-ui #anspress .anteenti-answer-card__author strong {
		max-width: 260px;
		font-size: 0.96rem;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__author small {
		font-size: 0.78rem;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__content {
		font-size: 1rem;
		line-height: 1.8;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__comment,
	body.anteenti-qa-ui #anspress .anteenti-answer-card__select a,
	body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions a,
	body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions button {
		min-height: 32px;
		padding: 6px 12px;
		font-size: 0.8rem;
	}
}


/* ---------------------------------------------------------
   Mobile
--------------------------------------------------------- */

@media (max-width: 768px) {
	body.anteenti-qa-ui #anspress .anteenti-answer-card__footer {
		align-items: flex-start;
		flex-direction: column;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__left-actions,
	body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions {
		width: 100%;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__comment,
	body.anteenti-qa-ui #anspress .anteenti-answer-card__select a,
	body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions a,
	body.anteenti-qa-ui #anspress .anteenti-answer-card__right-actions button {
		min-height: 32px;
	}
}


/* ---------------------------------------------------------
   Very Small Mobile
--------------------------------------------------------- */

@media (max-width: 380px) {
	body.anteenti-qa-ui #anspress .anteenti-answer-card__inner {
		padding: 14px;
		border-radius: 16px;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__author strong {
		max-width: 145px;
	}

	body.anteenti-qa-ui #anspress .anteenti-answer-card__content {
		font-size: 0.88rem;
		line-height: 1.65;
	}
}