/**
 * Food Tips - front-end styles.
 * Every class is prefixed with .ft- so themes stay untouched.
 */

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

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

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

.ft-form-card {
	position: relative;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--ft-border);
	border-radius: var(--ft-radius);
	box-shadow: 0 10px 30px rgba(17, 24, 39, .08);
	margin: 0 0 30px;
}

.ft-form-card__top {
	height: 6px;
	background: linear-gradient(90deg, var(--ft-accent) 0%, var(--ft-accent-dark) 55%, var(--ft-accent) 100%);
}

.ft-form-card__inner {
	padding: 28px;
}

.ft-form__title {
	margin: 0 0 6px;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 800;
	letter-spacing: -.01em;
}

.ft-form__subtitle {
	margin: 0 0 20px;
	color: var(--ft-muted);
	font-size: .93rem;
}

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

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

.ft-label {
	font-size: .87rem;
	font-weight: 600;
}

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

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

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

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

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

.ft-textarea {
	min-height: 86px;
	resize: vertical;
}

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

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

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

/* ---------------------------------------------------------------- */
/* Amount - one free input, no fixed buttons                         */
/* ---------------------------------------------------------------- */

.ft-amount-block {
	margin: 0 0 18px;
}

.ft-amount {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	padding: 8px 16px;
	border: 2px solid var(--ft-border);
	border-radius: 14px;
	background: var(--ft-soft);
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.ft-amount:focus-within {
	border-color: var(--ft-accent);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(211, 47, 47, .1);
}

.ft-amount__symbol {
	flex: 0 0 auto;
	color: var(--ft-accent);
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1;
}

.ft-amount__input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	padding: 10px 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.1;
}

.ft-amount__input:focus {
	outline: none;
}

.ft-amount__currency {
	flex: 0 0 auto;
	color: var(--ft-muted);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .06em;
}

.ft-amount__hint {
	margin: 8px 0 0;
	color: var(--ft-muted);
	font-size: .84rem;
}

/* ---------------------------------------------------------------- */
/* Payment method cards                                              */
/* ---------------------------------------------------------------- */

.ft-methods {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 10px;
	margin-top: 8px;
}

.ft-method {
	display: block;
	cursor: pointer;
}

.ft-method input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ft-method__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	height: 100%;
	padding: 13px 15px;
	border: 1.5px solid var(--ft-border);
	border-radius: 12px;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.ft-method:hover .ft-method__body {
	border-color: #cfd3d8;
}

.ft-method input:checked + .ft-method__body {
	border-color: var(--ft-accent);
	background: rgba(211, 47, 47, .04);
	box-shadow: 0 0 0 3px rgba(211, 47, 47, .1);
}

.ft-method input:focus-visible + .ft-method__body {
	outline: 2px solid var(--ft-accent);
	outline-offset: 2px;
}

.ft-method__name {
	font-size: .95rem;
	font-weight: 700;
}

.ft-method__hint {
	color: var(--ft-muted);
	font-size: .8rem;
}

/* ---------------------------------------------------------------- */
/* Button + note                                                    */
/* ---------------------------------------------------------------- */

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

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

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

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

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

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

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

.ft-form__note {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin: 14px 0 0;
	color: var(--ft-muted);
	font-size: .78rem;
	line-height: 1.5;
}

.ft-lock {
	flex: 0 0 auto;
}

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

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

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

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

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

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

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

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

/* ---------------------------------------------------------------- */
/* Status panels                                                     */
/* ---------------------------------------------------------------- */

.ft-panel {
	margin: 0 0 22px;
	padding: 22px 24px;
	border-radius: var(--ft-radius);
	border: 1px solid var(--ft-border);
	background: #fff;
	box-shadow: 0 6px 20px rgba(17, 24, 39, .06);
	text-align: center;
}

.ft-panel__icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #1b5e20;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ft-panel__title {
	margin: 0 0 6px;
	font-size: 1.25rem;
	font-weight: 800;
}

.ft-panel__body {
	margin: 0;
	color: var(--ft-muted);
	font-size: .93rem;
}

.ft-panel__amount {
	display: inline-block;
	margin-top: 14px;
	padding: 8px 18px;
	border-radius: 999px;
	background: rgba(211, 47, 47, .08);
	color: var(--ft-accent);
	font-size: 1.35rem;
	font-weight: 800;
}

.ft-panel--notice {
	background: #fffdf5;
	border-color: #f0e3bd;
}

.ft-panel--cancel {
	background: #fbfbfc;
}

.ft-panel--cancel .ft-panel__title {
	color: var(--ft-muted);
}

/* ---------------------------------------------------------------- */
/* Tips wall                                                         */
/* ---------------------------------------------------------------- */

.ft-stat {
	margin: 0 0 22px;
	padding: 24px;
	border-radius: var(--ft-radius);
	background: linear-gradient(135deg, var(--ft-accent) 0%, var(--ft-accent-dark) 100%);
	color: #fff;
	text-align: center;
	box-shadow: 0 10px 26px rgba(17, 24, 39, .16);
}

.ft-stat--inline {
	padding: 18px 22px;
}

.ft-stat__value {
	font-size: 2.1rem;
	font-weight: 800;
	letter-spacing: -.02em;
	line-height: 1.1;
}

.ft-stat--inline .ft-stat__value {
	font-size: 1.6rem;
}

.ft-stat__label {
	margin-top: 4px;
	font-size: .85rem;
	opacity: .92;
	letter-spacing: .03em;
	text-transform: uppercase;
}

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

.ft-list-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 800;
}

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

.ft-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ft-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px;
	border: 1px solid var(--ft-border);
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(17, 24, 39, .05);
	animation: ft-fade-in .35s ease both;
}

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

.ft-card__avatar {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--ft-accent) 0%, var(--ft-accent-dark) 100%);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05rem;
	font-weight: 800;
	text-transform: uppercase;
	user-select: none;
}

.ft-card__main {
	flex: 1 1 auto;
	min-width: 0;
}

.ft-card__top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.ft-card__name {
	font-size: .97rem;
	font-weight: 700;
	word-break: break-word;
}

.ft-card__amount {
	flex: 0 0 auto;
	padding: 3px 11px;
	border-radius: 999px;
	background: rgba(211, 47, 47, .08);
	color: var(--ft-accent);
	font-size: .88rem;
	font-weight: 800;
	white-space: nowrap;
}

.ft-card__message {
	margin: 6px 0 4px;
	font-size: .93rem;
	line-height: 1.6;
	color: #374151;
	overflow-wrap: anywhere;
}

.ft-card__date {
	color: var(--ft-muted);
	font-size: .77rem;
}

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

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

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

@media (max-width: 600px) {

	.ft-form-card__inner {
		padding: 20px 16px;
	}

	.ft-amount {
		padding: 6px 12px;
	}

	.ft-amount__input {
		font-size: 1.45rem;
	}

	.ft-btn {
		width: 100%;
	}

	.ft-methods {
		grid-template-columns: 1fr;
	}

	.ft-card {
		padding: 14px;
	}

	.ft-card__avatar {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
		font-size: .95rem;
	}
}

@media (prefers-reduced-motion: reduce) {

	.ft-card,
	.ft-spinner {
		animation: none;
	}
}
