/**
 * Yoshi Club — base styles for the Elementor widgets.
 *
 * Deliberately light: sensible defaults that inherit the theme's fonts and colors.
 * Everything visual is overridable from the widgets' Style tab.
 */

.yc-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Dashboard --------------------------------------------------------------- */

.yc-dashboard {
	display: flex;
	flex-direction: column;
	gap: 1.5em;
}

.yc-dashboard__title,
.yc-dashboard__subtitle {
	margin: 0;
}

.yc-dashboard__subtitle {
	margin-bottom: 0.75em;
}

.yc-balance {
	padding: 1.5em;
	border-radius: 12px;
	background: #f4f6f8;
	text-align: center;
}

.yc-balance__label {
	opacity: 0.8;
}

.yc-balance__number {
	font-size: 3em;
	font-weight: 700;
	line-height: 1.1;
}

.yc-expiring {
	padding: 0.75em 1em;
	border-radius: 8px;
	background: #fff4e5;
	color: #8a4b00;
}

.yc-history {
	width: 100%;
	border-collapse: collapse;
}

.yc-history th,
.yc-history td {
	padding: 0.6em 0.75em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	text-align: start;
	vertical-align: top;
}

.yc-history th {
	font-weight: 600;
}

.yc-history__note {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
}

.yc-points {
	font-weight: 600;
	white-space: nowrap;
}

.yc-points--plus {
	color: #1a7f37;
}

.yc-points--minus {
	color: #b42318;
}

.yc-products__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1em;
}

.yc-product {
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	padding: 1em;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
}

.yc-product:not(.yc-product--affordable) {
	opacity: 0.6;
}

.yc-product__image img {
	display: block;
	width: 100%;
	height: auto;
}

.yc-product__points {
	font-weight: 600;
}

.yc-message {
	padding: 1em;
	border-radius: 8px;
	background: #f4f6f8;
}

/* Small screens: the history table becomes stacked cards. */
@media (max-width: 600px) {
	.yc-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.yc-history thead {
		display: none;
	}

	.yc-history,
	.yc-history tbody,
	.yc-history tr,
	.yc-history td {
		display: block;
		width: 100%;
	}

	.yc-history tr {
		padding: 0.5em 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}

	.yc-history td {
		display: flex;
		justify-content: space-between;
		gap: 1em;
		padding: 0.25em 0;
		border: 0;
	}

	.yc-history td::before {
		content: attr(data-label);
		font-weight: 600;
	}
}

/* Club check --------------------------------------------------------------- */

.yc-check {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	max-width: 480px;
}

.yc-check__title,
.yc-check__description {
	margin: 0;
}

.yc-check__row {
	display: flex;
	gap: 0.5em;
}

.yc-check--stacked .yc-check__row {
	flex-direction: column;
}

.yc-check__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.65em 0.9em;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	font-size: 1em;
	letter-spacing: 0.05em;
	text-align: center;
}

.yc-check__button {
	flex: 0 0 auto;
	padding: 0.65em 1.4em;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
}

.yc-check__button:disabled {
	opacity: 0.6;
	cursor: wait;
}

.yc-check__result {
	padding: 0.9em 1em;
	border-radius: 8px;
}

.yc-check__result[hidden] {
	display: none;
}

.yc-check__result--member {
	background: #e7f6ec;
	color: #14532d;
}

.yc-check__result--not-member {
	background: #f4f6f8;
	color: #333;
}

.yc-check__result--error {
	background: #fdecea;
	color: #8a1c12;
}

.yc-check__points {
	font-size: 1.15em;
}

/* Club price ----------------------------------------------------------------
 * Colours, size and weight come from the Design tab (CSS custom properties set
 * inline after this file); the values here are only fallbacks. */

.yc-club-price {
	display: block;
	margin-top: 0.15em;
	font-size: var(--yc-price-size, 85%);
	font-weight: var(--yc-price-weight, 600);
	color: var(--yc-price-color, #4646c0);
}

.yc-club-price .woocommerce-Price-amount {
	font-weight: 700;
}

.yc-club-price--badge {
	display: inline-block;
	margin-top: 0.35em;
	padding: 0.2em 0.75em;
	border-radius: 999px;
	background: var(--yc-price-bg, #eef0ff);
}

.yc-club-price--member {
	opacity: 0.85;
}

/* Savings banner (non-members, cart & checkout) ----------------------------- */

.yc-savings-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em 1em;
	margin: 0 0 1.5em;
	padding: 0.9em 1.2em;
	border-radius: var(--yc-banner-radius, 12px);
	background: linear-gradient(135deg, var(--yc-banner-start, #eef0ff), var(--yc-banner-end, #e3f8f5));
	color: var(--yc-banner-text, #1c2033);
}

.yc-savings-banner__icon {
	color: var(--yc-banner-button, #5b5bd6);
	font-size: 1.2em;
}

.yc-savings-banner__text {
	flex: 1 1 260px;
}

.yc-savings-banner__link {
	padding: 0.45em 1.1em;
	border-radius: 999px;
	background: var(--yc-banner-button, #5b5bd6);
	color: var(--yc-banner-button-text, #fff) !important;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
}

.yc-savings-banner__link:hover,
.yc-savings-banner__link:focus-visible {
	filter: brightness(0.9);
}

.yc-member-savings th,
.yc-member-savings td,
.yc-member-savings {
	color: var(--yc-savings-color, #138a4b);
}

/* Redeem box (cart & checkout) ---------------------------------------------- */

.yc-redeem {
	margin: 0 0 1.5em;
	padding: 1em 1.2em;
	border: 1px solid var(--yc-redeem-border, #d6d6f5);
	border-radius: var(--yc-redeem-radius, 12px);
	background: var(--yc-redeem-bg, #f7f8fc);
}

.yc-redeem.is-busy {
	opacity: 0.6;
}

.yc-redeem__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.4em 1em;
	margin-bottom: 0.7em;
}

.yc-redeem__form,
.yc-redeem__applied {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
}

.yc-redeem__applied {
	justify-content: space-between;
}

.yc-redeem__input {
	width: 8em !important;
	text-align: center;
}

.yc-redeem__hint {
	margin: 0.5em 0 0 !important;
	font-size: 0.85em;
	opacity: 0.75;
}

.yc-redeem__error {
	margin: 0.5em 0 0 !important;
	color: #b42318;
}

.yc-redeem__error[hidden] {
	display: none;
}

/* Birthday benefit in the dashboard widget ---------------------------------- */

.yc-birthday {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1em;
	padding: 1em 1.2em;
	border-radius: 12px;
	background: #fff4f8;
	color: #8a1c4a;
}

.yc-birthday__code {
	padding: 0.2em 0.7em;
	border: 1px dashed currentColor;
	border-radius: 8px;
	font-weight: 700;
	letter-spacing: 0.05em;
	direction: ltr;
}
