/* KiaraHub Universal UGC Engine — submission form + My Content dashboard */

.kh-ugc-metrics {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 16px;
	margin: 1.6em 0 2em;
}
@media (max-width: 1024px) {
	.kh-ugc-metrics { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
	.kh-ugc-metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 380px) {
	.kh-ugc-metrics { grid-template-columns: 1fr; }
}
.kh-ugc-metric {
	padding: 18px;
	text-align: center;
}
@media (max-width: 560px) {
	.kh-ugc-metric { padding: 14px 10px; }
}
.kh-ugc-metric-num {
	font-family: var(--kh-font-display);
	font-size: 1.9rem;
	color: var(--kh-ink);
}
@media (max-width: 560px) {
	.kh-ugc-metric-num { font-size: 1.5rem; }
}

/* ---- Submissions table: normal table on laptop/tablet, stacked
   cards on phones so nothing needs horizontal scrolling. ---- */
.kh-ugc-table-wrap {
	overflow-x: auto;
	margin-top: 1.4em;
	-webkit-overflow-scrolling: touch;
}
.kh-ugc-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--kh-paper-raised);
	border-radius: var(--kh-radius);
	overflow: hidden;
	box-shadow: var(--kh-shadow);
}
.kh-ugc-table th,
.kh-ugc-table td {
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid var(--kh-line);
	font-size: .88rem;
	white-space: nowrap;
}
.kh-ugc-table th {
	font-family: var(--kh-font-mono);
	font-size: .74rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--kh-ink-soft);
}
.kh-ugc-table tbody tr:last-child td { border-bottom: none; }

@media (max-width: 700px) {
	.kh-ugc-table-wrap { overflow-x: visible; }
	.kh-ugc-table thead { display: none; }
	.kh-ugc-table, .kh-ugc-table tbody, .kh-ugc-table tr, .kh-ugc-table td {
		display: block;
		width: 100%;
	}
	.kh-ugc-table tr {
		padding: 14px 16px;
		border-bottom: 8px solid var(--kh-paper);
	}
	.kh-ugc-table td {
		white-space: normal;
		border-bottom: none;
		padding: 6px 0;
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
	}
	.kh-ugc-table td::before {
		content: attr(data-label);
		font-family: var(--kh-font-mono);
		font-size: .68rem;
		text-transform: uppercase;
		letter-spacing: .04em;
		color: var(--kh-ink-soft);
		flex: 0 0 auto;
	}
	.kh-ugc-table td[data-label]:first-child {
		font-weight: 600;
		font-size: .96rem;
	}
	.kh-ugc-actions {
		justify-content: flex-start !important;
		flex-wrap: wrap;
	}
}

.kh-ugc-actions button,
.kh-ugc-actions a {
	background: none;
	border: none;
	color: var(--kh-teal);
	cursor: pointer;
	font-size: .85rem;
	margin-right: 10px;
	padding: 0;
	text-decoration: underline;
}
.kh-ugc-delete-btn { color: var(--kh-coral) !important; }

.kh-ugc-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: .74rem;
	font-weight: 600;
	white-space: nowrap;
}
.kh-ugc-badge-publish { background: var(--kh-teal-tint); color: var(--kh-teal); }
.kh-ugc-badge-pending { background: rgba(227,168,87,.18); color: var(--kh-gold-deep); }
.kh-ugc-badge-draft   { background: var(--kh-coral-tint); color: var(--kh-coral); }
.kh-ugc-badge-trash   { background: rgba(228,87,46,.14); color: var(--kh-coral); }
.kh-ugc-note {
	cursor: help;
	margin-left: 4px;
	color: var(--kh-ink-soft);
}

.kh-ugc-activity {
	list-style: none;
	margin: 1.2em 0 0;
	padding: 0;
}
.kh-ugc-activity li {
	padding: 12px 0;
	border-bottom: 1px solid var(--kh-line);
	font-size: .88rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.kh-ugc-activity li:last-child { border-bottom: none; }
.kh-ugc-activity-type { color: var(--kh-ink-soft); }
.kh-ugc-activity-changes { font-family: var(--kh-font-mono); font-size: .76rem; color: var(--kh-ink-soft); }
.kh-ugc-activity-note { color: var(--kh-ink-soft); font-style: italic; }
.kh-ugc-activity time {
	margin-left: auto;
	font-size: .76rem;
	color: var(--kh-ink-soft);
}
@media (max-width: 480px) {
	.kh-ugc-activity time { margin-left: 0; flex-basis: 100%; }
}

.kh-ugc-modal {
	position: fixed;
	inset: 0;
	background: rgba(8,14,30,.55);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.kh-ugc-modal-inner {
	position: relative;
	max-width: 560px;
	width: 100%;
	max-height: 86vh;
	overflow-y: auto;
	padding: 28px;
}
@media (max-width: 480px) {
	.kh-ugc-modal { padding: 0; align-items: flex-end; }
	.kh-ugc-modal-inner {
		max-width: 100%;
		max-height: 92vh;
		width: 100%;
		border-radius: var(--kh-radius) var(--kh-radius) 0 0;
		padding: 22px 18px;
	}
}
.kh-ugc-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: var(--kh-ink-soft);
	padding: 4px 8px;
}

/* ---- Contribute page: keep the type-picker and action row full-width
   and comfortably tappable at phone widths. ---- */
@media (max-width: 480px) {
	#kh-ugc-type { width: 100%; }
	.kh-ugc-table-wrap + * { margin-top: 1em; }
}

