/*
 * TEG-WINERY - the shortcodes, wherever a theme puts them.
 *
 * Everything is scoped under .twy-public so that a theme's own headings,
 * lists and forms are left alone, and every rule inherits the theme's font
 * on purpose: this is the winery's page, not the plugin's.
 */

.twy-public {
	--twy-wine: #7b2d43;
	--twy-wine-dark: #5d2133;
	--twy-green: #2f5d50;
	--twy-cream: #f7f3ec;
	--twy-slate: #4a5568;
	--twy-line: #e2dcd2;
	--twy-muted: #7a8494;
	color: var(--twy-slate);
}

.twy-public * { box-sizing: border-box; }

.twy-public h3.twy-h,
.twy-public .twy-h { color: var(--twy-wine-dark); margin: 1.6em 0 .5em; }
.twy-public .twy-h4 { color: var(--twy-wine-dark); margin: 1.2em 0 .4em; font-size: 1.05em; }
.twy-public .twy-hint { display: block; color: var(--twy-muted); font-size: .86em; margin-top: 3px; }
.twy-public .twy-lead { font-size: 1.05em; }
.twy-public .twy-empty,
.twy-public .twy-closed { background: var(--twy-cream); border-left: 4px solid var(--twy-wine); padding: 12px 16px; border-radius: 0 6px 6px 0; }
.twy-public .twy-bad { color: var(--twy-wine-dark); font-weight: 600; }
.twy-public .twy-flash { padding: 10px 16px; border-radius: 6px; margin: 0 0 16px; }
.twy-public .twy-flash.twy-ok { background: #e3f0ea; color: #1f5745; }
.twy-public .twy-flash.twy-bad { background: #f7e3e7; color: var(--twy-wine-dark); }
.twy-public .twy-flash.twy-info { background: var(--twy-cream); color: var(--twy-slate); }

.twy-public .twy-btn {
	display: inline-block;
	background: var(--twy-wine);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 9px 22px;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.twy-public .twy-btn:hover,
.twy-public .twy-btn:focus { background: var(--twy-wine-dark); color: #fff; }

/* ── the style filter ───────────────────────────────────────────────── */

.twy-styles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }

.twy-chip {
	display: inline-block;
	padding: 4px 14px;
	border: 1px solid var(--twy-line);
	border-radius: 999px;
	text-decoration: none;
	color: var(--twy-slate);
	background: #fff;
	font-size: .9em;
}

.twy-chip:hover { border-color: var(--twy-wine); color: var(--twy-wine-dark); }
.twy-chip-on { background: var(--twy-wine); border-color: var(--twy-wine); color: #fff; }
.twy-chip-on:hover { color: #fff; }

/* ── the wine list ──────────────────────────────────────────────────── */

.twy-wine-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

.twy-wine-card {
	background: #fff;
	border: 1px solid var(--twy-line);
	border-top: 3px solid var(--twy-wine);
	border-radius: 10px;
	padding: 16px 18px;
	margin: 0;
}

.twy-wine-img { max-width: 100%; height: auto; border-radius: 6px; margin-bottom: 10px; display: block; }
.twy-wine-name { margin: 0 0 4px; font-size: 1.1em; color: var(--twy-wine-dark); }
.twy-wine-meta { margin: 0 0 8px; color: var(--twy-muted); font-size: .88em; }
.twy-wine-notes { margin: 0 0 8px; }
.twy-wine-pair { margin: 0 0 8px; font-size: .92em; }
.twy-wine-pair .twy-lab { color: var(--twy-muted); text-transform: uppercase; letter-spacing: .06em; font-size: .82em; }
.twy-wine-buy { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.twy-price { font-size: 1.25em; font-weight: 700; color: var(--twy-slate); }
.twy-member-price { color: var(--twy-green); font-weight: 600; font-size: .92em; }
.twy-stock { font-size: .86em; color: var(--twy-green); }
.twy-stock.twy-out { color: var(--twy-wine-dark); font-weight: 600; }
.twy-alloc { font-size: .8em; background: var(--twy-cream); border-radius: 999px; padding: 2px 10px; color: var(--twy-wine-dark); }

/* ── the events diary ───────────────────────────────────────────────── */

.twy-event-list,
.twy-pick-list,
.twy-mini-list { list-style: none; margin: 0; padding: 0; }
.twy-pick-list li,
.twy-mini-list li { padding: 6px 0; border-bottom: 1px solid var(--twy-line); }

.twy-event {
	display: flex;
	gap: 20px;
	padding: 18px 0;
	border-bottom: 1px solid var(--twy-line);
}

.twy-event-when { flex: 0 0 170px; }
.twy-event-date { font-weight: 700; color: var(--twy-wine-dark); }
.twy-event-body { flex: 1 1 auto; min-width: 0; }
.twy-event-title { margin: 0 0 4px; font-size: 1.1em; }
.twy-event-meta { margin: 0 0 6px; color: var(--twy-muted); font-size: .9em; }
.twy-event-text { margin: 0 0 10px; }
.twy-event-cta { margin: 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.twy-seats { font-size: .86em; color: var(--twy-green); }
.twy-full { font-weight: 600; color: var(--twy-wine-dark); }

/* ── the club tiers ─────────────────────────────────────────────────── */

.twy-tiers {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
}

.twy-tier {
	background: var(--twy-cream);
	border: 1px solid var(--twy-line);
	border-radius: 10px;
	padding: 18px 20px;
	margin: 0;
}

.twy-tier-name { margin: 0 0 6px; color: var(--twy-wine-dark); }
.twy-tier-meta { margin: 0 0 10px; color: var(--twy-green); font-weight: 600; font-size: .92em; }
.twy-tier-text { margin: 0 0 10px; }
.twy-perks { margin: 0; padding-left: 20px; font-size: .92em; }
.twy-perks li { margin-bottom: 4px; }

/* ── the two public forms ───────────────────────────────────────────── */

.twy-pform { margin: 8px 0 0; }
.twy-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 20px; }
.twy-field { margin: 0 0 14px; }
.twy-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.twy-field input[type="text"],
.twy-field input[type="email"],
.twy-field input[type="tel"],
.twy-field input[type="date"],
.twy-field input[type="number"],
.twy-field select,
.twy-field textarea {
	width: 100%;
	max-width: 420px;
	padding: 8px 10px;
	border: 1px solid var(--twy-line);
	border-radius: 6px;
	font: inherit;
	background: #fff;
	color: inherit;
}

.twy-field input:focus,
.twy-field select:focus,
.twy-field textarea:focus { outline: 2px solid var(--twy-wine); outline-offset: 1px; }
.twy-check label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.twy-check input { margin-top: .25em; }
.twy-req { color: var(--twy-wine); }
.twy-submit { margin: 18px 0 0; }
.twy-terms {
	background: var(--twy-cream);
	border-radius: 8px;
	padding: 12px 16px;
	margin: 14px 0;
	font-size: .9em;
	max-height: 220px;
	overflow: auto;
}
.twy-price-line { font-weight: 600; }

/* The honeypot. Hidden from people and from screen readers, left in the DOM. */
.twy-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── a customer's own page ──────────────────────────────────────────── */

.twy-acc-sec { margin: 0 0 26px; }

.twy-ptable { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.twy-ptable th,
.twy-ptable td { text-align: left; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--twy-line); vertical-align: top; }
.twy-ptable thead th { font-size: .82em; text-transform: uppercase; letter-spacing: .06em; color: var(--twy-muted); }
.twy-ptable tbody th { color: var(--twy-muted); font-weight: 600; white-space: nowrap; width: 1%; }

@media (max-width: 600px) {
	.twy-event { display: block; }
	.twy-event-when { margin-bottom: 6px; }
}

/* ── ordering on the website ([teg-winery-order]) ──────────────────── */

.twy-public .twy-basket-link { margin: 0 0 16px; }
.twy-public .twy-add { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; }
.twy-public .twy-add input[type="number"] { width: 4.5em; }
.twy-public .twy-basket input[type="number"] { width: 5em; }
.twy-public .twy-summary .num,
.twy-public .twy-basket .num { text-align: right; white-space: nowrap; }
.twy-public .twy-summary .twy-total-row th,
.twy-public .twy-summary .twy-total-row td { border-top: 2px solid var(--twy-line); }
.twy-public .twy-fulfill { border: 0; padding: 0; margin: 12px 0; }
.twy-public .twy-fulfill legend { font-weight: 600; margin-bottom: 4px; }
.twy-public .twy-fulfill .twy-check { display: block; margin: 4px 0; }
.twy-public .twy-demo-note { background: #fff6dc; border-left: 4px solid #c99a1c; padding: 10px 14px; border-radius: 0 6px 6px 0; }
