/**
 * YAWC Core CSS
 *
 * Core frontend styles for:
 * - post footer
 * - author card
 * - badges
 * - badge lists
 * - organization links
 */

/* =========================================================
   Base
========================================================= */

.yawc-post-footer,
.yawc-author-card,
.yawc-badge,
.yawc-badge-list,
.yawc-organization {
	box-sizing: border-box;
}

.yawc-post-footer *,
.yawc-author-card *,
.yawc-badge-list *,
.yawc-organization * {
	box-sizing: border-box;
}

/* =========================================================
   Post Footer
========================================================= */

.yawc-post-footer {
	margin-top: 40px;
	padding: 24px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #ffffff;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.yawc-post-footer__section {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.yawc-post-footer__label {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #6b7280;
}

.yawc-post-footer__org-link,
.yawc-post-footer__org-name {
	font-size: 14px;
	line-height: 1.7;
	color: #374151;
	text-decoration: none;
}

.yawc-post-footer__org-link:hover {
	text-decoration: underline;
}

.yawc-post-footer__badge {
	display: inline-flex;
}

/* =========================================================
   Author Card
========================================================= */

.yawc-author-card {
	display: block;
	width: 100%;
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #ffffff;
}

.yawc-author-card__body {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.yawc-author-card__avatar {
	flex: 0 0 auto;
	line-height: 0;
}

.yawc-author-card__avatar-image {
	display: block;
	width: auto;
	height: auto;
	border-radius: 999px;
}

.yawc-author-card__meta {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.yawc-author-card__name {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	color: #111827;
}

.yawc-author-card__name-link {
	color: inherit;
	text-decoration: none;
}

.yawc-author-card__name-link:hover {
	text-decoration: underline;
}

.yawc-author-card__org {
	font-size: 14px;
	line-height: 1.7;
	color: #4b5563;
}

.yawc-author-card__org-link {
	color: inherit;
	text-decoration: none;
}

.yawc-author-card__org-link:hover {
	text-decoration: underline;
}

.yawc-author-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yawc-author-card__description {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: #4b5563;
}

/* =========================================================
   Badge
========================================================= */

.yawc-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 32px;
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	background: #f9fafb;
	color: #1f2937;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	vertical-align: middle;
	text-decoration: none;
}

.yawc-badge__group {
	font-size: 12px;
	font-weight: 700;
	color: #6b7280;
}

.yawc-badge__label {
	font-size: 13px;
	font-weight: 600;
	color: inherit;
}

.yawc-badge__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: inherit;
	text-decoration: none;
}

.yawc-badge__link:hover {
	text-decoration: none;
}

/* style variants */
.yawc-badge--rounded {
	border-radius: 999px;
}

.yawc-badge--square {
	border-radius: 8px;
}

.yawc-badge--soft {
	border-radius: 10px;
	background: #f3f4f6;
}

.yawc-badge--outline {
	border-radius: 999px;
	background: transparent;
}

/* linked badge */
.yawc-badge--linked {
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.yawc-badge--linked:hover {
	background: #f3f4f6;
	border-color: #c7cdd6;
	transform: translateY(-1px);
}

/* organization badge */
.yawc-organization-badge {
	display: inline-flex;
	align-items: center;
}

.yawc-organization-badge__link {
	color: inherit;
	text-decoration: none;
}

.yawc-organization-badge__link:hover {
	text-decoration: underline;
}

/* =========================================================
   Badge Lists
========================================================= */

.yawc-badge-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.yawc-badge-list__item {
	display: inline-flex;
	align-items: center;
}

.yawc-badge-list--grouped {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
}

.yawc-badge-group-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.yawc-badge-group-list__title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #6b7280;
}

.yawc-badge-group-list__items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* =========================================================
   Organization
========================================================= */

.yawc-organization {
	display: block;
}

.yawc-organization__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	color: #111827;
}

.yawc-organization__link {
	color: inherit;
	text-decoration: none;
}

.yawc-organization__link:hover {
	text-decoration: underline;
}

.yawc-organization__description {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.8;
	color: #4b5563;
}

.yawc-organization-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.yawc-organization-list__item {
	margin: 0;
	padding: 0;
}

/* =========================================================
   Generic Card Utility
========================================================= */

.yawc-card {
	padding: 20px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #ffffff;
}

.yawc-section {
	display: block;
}

/* =========================================================
   Skin Hooks
========================================================= */

.yawc-has-skin {
	position: relative;
}

/* main / accent can be injected later by skin system */
.yawc-skin--default {
}

/* =========================================================
   Debug
========================================================= */

.yawc-debug,
.yawc-context-debug {
	margin-top: 16px;
	padding: 14px;
	border-radius: 10px;
	background: #111827;
	color: #f9fafb;
	font-size: 12px;
	line-height: 1.6;
	overflow: auto;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 640px) {
	.yawc-post-footer {
		padding: 18px;
		border-radius: 14px;
	}

	.yawc-author-card {
		padding: 16px;
		border-radius: 14px;
	}

	.yawc-author-card__body {
		gap: 12px;
	}

	.yawc-author-card__name {
		font-size: 18px;
	}

	.yawc-badge {
		min-height: 30px;
		padding: 5px 10px;
		font-size: 12px;
	}

	.yawc-badge__label {
		font-size: 12px;
	}

	.yawc-badge__group {
		font-size: 11px;
	}
}

@media (max-width: 480px) {
	.yawc-author-card__body {
		flex-direction: column;
		align-items: flex-start;
	}

	.yawc-author-card__avatar {
		margin-bottom: 2px;
	}

	.yawc-post-footer {
		gap: 14px;
	}
}