/**
 * Food Suggestions - front-end styles.
 * All classes are prefixed with .fs- to avoid theme conflicts.
 */

.fs-wrap {
	--fs-accent: #D32F2F;
	--fs-accent-dark: #B71C1C;
	--fs-text: #1f2328;
	--fs-muted: #6b7280;
	--fs-border: #e6e8eb;
	--fs-radius: 14px;
	box-sizing: border-box;
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	color: var(--fs-text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.fs-wrap *,
.fs-wrap *::before,
.fs-wrap *::after {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Form                                                                */
/* ------------------------------------------------------------------ */

.fs-form-card {
	background: #fff;
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	padding: 26px;
	box-shadow: 0 2px 10px rgba(17, 24, 39, .06);
	margin: 0 0 28px;
}

.fs-form__title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	line-height: 1.3;
	font-weight: 700;
	color: var(--fs-text);
}

.fs-form__subtitle {
	margin: 0 0 18px;
	color: var(--fs-muted);
	font-size: .92rem;
}

.fs-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.fs-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.fs-field--full {
	grid-column: 1 / -1;
}

.fs-label {
	font-size: .88rem;
	font-weight: 600;
	color: var(--fs-text);
}

.fs-req {
	color: var(--fs-accent);
}

.fs-optional {
	color: var(--fs-muted);
	font-size: .78rem;
	font-weight: 400;
}

.fs-input,
.fs-textarea,
.fs-select {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--fs-border);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1.5;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.fs-select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 38px;
	background-image: linear-gradient(45deg, transparent 50%, var(--fs-muted) 50%), linear-gradient(135deg, var(--fs-muted) 50%, transparent 50%);
	background-position: calc(100% - 19px) calc(1em + 3px), calc(100% - 14px) calc(1em + 3px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	cursor: pointer;
}

.fs-input::placeholder,
.fs-textarea::placeholder {
	color: #9aa1ab;
}

.fs-input:focus,
.fs-textarea:focus,
.fs-select:focus {
	outline: none;
	border-color: var(--fs-accent);
	box-shadow: 0 0 0 3px rgba(211, 47, 47, .13);
}

.fs-textarea {
	min-height: 120px;
	resize: vertical;
}

.fs-input.is-error,
.fs-textarea.is-error,
.fs-select.is-error {
	border-color: var(--fs-accent);
	background: #fff6f6;
}

.fs-error {
	display: none;
	color: var(--fs-accent);
	font-size: .8rem;
}

.fs-error.is-visible {
	display: block;
}

.fs-form__actions {
	margin-top: 18px;
}

.fs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 26px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--fs-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background .16s ease, transform .1s ease, opacity .16s ease;
}

.fs-btn:hover,
.fs-btn:focus {
	background: var(--fs-accent-dark);
	color: #fff;
}

.fs-btn:active {
	transform: translateY(1px);
}

.fs-btn[disabled] {
	opacity: .65;
	cursor: not-allowed;
	transform: none;
}

.fs-btn--ghost {
	background: transparent;
	color: var(--fs-accent);
	border-color: var(--fs-accent);
}

.fs-btn--ghost:hover,
.fs-btn--ghost:focus {
	background: rgba(211, 47, 47, .07);
	color: var(--fs-accent-dark);
}

.fs-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.fs-alert {
	display: none;
	margin: 0 0 16px;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: .9rem;
}

.fs-alert.is-visible {
	display: block;
}

.fs-alert--success {
	background: #edf7ed;
	border: 1px solid #c6e6c7;
	color: #1b5e20;
}

.fs-alert--error {
	background: #fdecea;
	border: 1px solid #f5c6c6;
	color: #b71c1c;
}

/* ------------------------------------------------------------------ */
/* List                                                                */
/* ------------------------------------------------------------------ */

.fs-list-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	margin: 0 0 14px;
	flex-wrap: wrap;
}

.fs-list-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--fs-text);
}

.fs-count {
	color: var(--fs-muted);
	font-size: .85rem;
}

.fs-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.fs-card {
	background: #fff;
	border: 1px solid var(--fs-border);
	border-radius: var(--fs-radius);
	padding: 18px 20px;
	box-shadow: 0 2px 8px rgba(17, 24, 39, .05);
	animation: fs-fade-in .35s ease both;
}

@keyframes fs-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.fs-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.fs-avatar {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--fs-accent);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
	font-weight: 700;
	text-transform: uppercase;
	user-select: none;
}

.fs-card__meta {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
	min-width: 0;
	flex: 1 1 auto;
}

.fs-card__name {
	font-size: .98rem;
	font-weight: 700;
	word-break: break-word;
}

.fs-card__date {
	color: var(--fs-muted);
	font-size: .8rem;
}

.fs-badge {
	flex: 0 0 auto;
	padding: 4px 11px;
	border: 1px solid var(--fs-border);
	border-radius: 999px;
	background: #f7f8fa;
	color: var(--fs-accent);
	font-size: .74rem;
	font-weight: 600;
	white-space: nowrap;
}

.fs-card__subject {
	margin: 2px 0 8px;
	font-size: 1.03rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--fs-text);
	overflow-wrap: anywhere;
}

.fs-card__body {
	font-size: .96rem;
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.fs-card__body p {
	margin: 0 0 10px;
}

.fs-card__body p:last-child {
	margin-bottom: 0;
}

.fs-card__contact {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--fs-border);
	font-size: .85rem;
}

.fs-card__contact a {
	color: var(--fs-accent);
	text-decoration: none;
}

.fs-card__contact a:hover {
	text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Admin reply inside the card                                         */
/* ------------------------------------------------------------------ */

.fs-reply {
	margin-top: 14px;
	padding: 13px 16px;
	border-left: 3px solid var(--fs-accent);
	border-radius: 0 10px 10px 0;
	background: #fafafa;
}

.fs-reply__head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}

.fs-reply__label {
	color: var(--fs-muted);
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.fs-reply__author {
	color: var(--fs-accent);
	font-size: .88rem;
	font-weight: 700;
}

.fs-reply__date {
	margin-left: auto;
	color: var(--fs-muted);
	font-size: .75rem;
}

.fs-reply__body {
	font-size: .93rem;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.fs-reply__body p {
	margin: 0 0 8px;
}

.fs-reply__body p:last-child {
	margin-bottom: 0;
}

.fs-empty {
	background: #fff;
	border: 1px dashed var(--fs-border);
	border-radius: var(--fs-radius);
	padding: 34px 22px;
	text-align: center;
	color: var(--fs-muted);
}

.fs-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

.fs-spinner {
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: fs-spin .7s linear infinite;
}

.fs-btn--ghost .fs-spinner {
	border-color: rgba(211, 47, 47, .35);
	border-top-color: var(--fs-accent);
}

@keyframes fs-spin {
	to {
		transform: rotate(360deg);
	}
}

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

@media (max-width: 600px) {

	.fs-grid {
		grid-template-columns: 1fr;
	}

	.fs-form-card {
		padding: 20px 16px;
	}

	.fs-card {
		padding: 16px;
	}

	.fs-btn {
		width: 100%;
	}

	.fs-badge {
		margin-left: 56px;
	}
}
