/**
 * Tányérműhely Csomagrendszer – Rendelési felület stílusok
 *
 * Elvek:
 *  – Minimális saját design: a téma alap-stílusai örökölve maradnak.
 *  – Reszponzív: 480 px alatt egyoszlopos elrendezés.
 *  – Prefix: .tc- (tanyer-csomagrendszer)
 *
 * Phase 4 Note: a #tc-step-time blokk megjelenése változatlan marad;
 *   a belső input-ot cseréli a zóna-választó.
 */

/* ── Alapkeret ──────────────────────────────────────────────────────────────── */
.tanyer-csomagrendszer {
	max-width: 740px;
	margin: 0 auto;
	font-size: 1rem;
	line-height: 1.5;
}

.tc-step {
	margin-bottom: 2em;
	padding-bottom: 1.75em;
	border-bottom: 1px solid #e2e4e7;
}
.tc-step:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.tc-step-title {
	font-size: 1.05em;
	font-weight: 600;
	margin: 0 0 0.9em;
	display: flex;
	align-items: center;
	gap: 0.5em;
	flex-wrap: wrap;
}

.tc-preview-range {
	font-size: 0.85em;
	font-weight: 400;
	color: #666;
}

/* ── Csomag-opciók (kalória / napszám) ─────────────────────────────────────── */
.tc-option-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65em;
}

.tc-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	cursor: pointer;
	min-width: 120px;
	padding: 0.65em 1.1em;
	border: 2px solid #d0d5de;
	border-radius: 8px;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
	user-select: none;
}
.tc-option input[type="radio"] {
	/* Vizuálisan rejtett, de akadálymentesen elérhető */
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.tc-option:hover {
	border-color: #9daec8;
}
.tc-option--selected {
	border-color: #2271b1;
	background: #f0f6fc;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.12);
}
.tc-option:focus-within {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.tc-option__title {
	font-weight: 700;
	font-size: 1.05em;
}
.tc-option__desc {
	font-size: 0.8em;
	color: #666;
	margin-top: 0.2em;
}

/* ── Ár-bar ──────────────────────────────────────────────────────────────────── */
.tc-price-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em 1.2em;
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	border-radius: 0 6px 6px 0;
	padding: 0.75em 1.1em;
	margin: -0.5em 0 2em;   /* összevonja a step aljával */
}
.tc-price-bar__name {
	font-weight: 600;
	flex: 1 1 auto;
}
.tc-price-bar__breakdown {
	font-size: 0.95em;
	color: #444;
	white-space: nowrap;
}
#tc-total-price {
	font-size: 1.1em;
}

/* ── Napi előnézet ───────────────────────────────────────────────────────────── */
.tc-loading {
	color: #888;
	padding: 0.8em 0;
	font-style: italic;
}

.tc-days-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
	margin-bottom: 0.6em;
}
.tc-days-table th {
	text-align: left;
	padding: 0.45em 0.6em;
	background: #f5f6f7;
	border-bottom: 2px solid #dde0e6;
	font-weight: 600;
	white-space: nowrap;
}
.tc-days-table td {
	padding: 0.38em 0.6em;
	border-bottom: 1px solid #eef0f3;
}
.tc-days-table tr:last-child td {
	border-bottom: none;
}
.tc-days-table tr.tc-day-row:hover td {
	background: #f9fafb;
}

/* Hétkezdő jelzők */
.tc-week-label td {
	font-size: 0.78em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #2271b1;
	background: #eef4fb !important;
	padding: 0.3em 0.6em;
}
.tc-week-separator td {
	padding: 0;
	height: 4px;
	background: #f0f0f0;
}

.tc-col-num  { color: #aaa; width: 28px; text-align: center; }
.tc-col-date { white-space: nowrap; width: 105px; }
.tc-col-day  { width: 88px; }

/* Hiányzó termék */
.tc-day-row--missing td { background: #fff8f0; }
.tc-missing { color: #b44500; font-size: 0.85em; }
.tc-missing code { font-size: 0.95em; }

/* Hover-jelzés azokon a cellákon, amelyekhez van fogáslista */
.tc-has-meals {
	cursor: help;
	text-decoration: underline dotted #999;
	text-underline-offset: 3px;
}

/* ── Fogáslista tooltip ────────────────────────────────────────────────────── */
.tc-meal-tooltip {
	position: fixed;
	z-index: 9999;
	max-width: 300px;
	background: #fff;
	border: 1px solid #d0d5de;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
	padding: 0.55em 0.75em;
	pointer-events: none;  /* nem zavarja az egéreseményt */
	font-size: 0.84em;
	line-height: 1.45;
}

.tc-meal-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tc-meal-list li {
	padding: 0.18em 0;
	border-bottom: 1px dotted #eee;
}
.tc-meal-list li:last-child {
	border-bottom: none;
}

/* Előnézet lábléc */
.tc-preview-footer {
	padding: 0.55em 0.1em;
	font-size: 0.9em;
	color: #555;
	border-top: 1px solid #eef0f3;
}
.tc-preview-sep { color: #bbb; }
.tc-preview-total { color: #1a1a1a; }
.tc-preview-holidays { color: #b44500; font-weight: 600; }

/* ── Phase 5: Zárt napok (ünnep / leállítás) ─────────────────────────────────── */
.tc-day-row--closed td {
	background: #f4f5f6;
	color: #9aa0a6;
	text-decoration: line-through;
	text-decoration-color: #c2c6cc;
}
.tc-day-row--closed:hover td {
	background: #f4f5f6; /* ne reagáljon hoverre */
}
.tc-closed-badge {
	display: inline-block;
	text-decoration: none;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #6b7177;
	background: #e7e9ec;
	border-radius: 10px;
	padding: 0.1em 0.6em;
}

/* Teljesen zárt naptári hét (leállítás) */
.tc-week-label--closed td {
	color: #8a8f95 !important;
	background: #f1f1f1 !important;
}
.tc-week-closed-note {
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: #b44500;
}

/* ── Phase 4: Zóna-info blokk (idő-mező helyett) ─────────────────────────────── */
.tc-step--zone-info {
	background: #f8fafc;
	border-radius: 6px;
	padding: 1em 1.2em;
}
.tc-zone-info-box p {
	margin: 0 0 0.6em;
	color: #444;
}
.tc-zone-preview-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.tc-zone-preview-list li {
	font-size: 0.88em;
	padding: 0.22em 0;
	color: #555;
	border-bottom: 1px dotted #dde0e6;
}
.tc-zone-preview-list li:last-child {
	border-bottom: none;
}

/* ── Időmező (Phase 3 fallback – Phase 4-ben nem jelenik meg) ────────────────── */
.tc-time-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	max-width: 320px;
}
.tc-time-label {
	font-weight: 500;
}
#tc-billing-time {
	font-size: 1.1em;
	padding: 0.35em 0.5em;
	border: 1px solid #bbb;
	border-radius: 4px;
	max-width: 140px;
}
.tc-time-note {
	margin: 0;
	font-size: 0.82em;
	color: #888;
}

/* ── Összegzés + gomb ────────────────────────────────────────────────────────── */
.tc-step--submit {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
}
.tc-submit-summary {
	font-weight: 600;
	color: #2271b1;
	min-height: 1.4em;
}
.tc-btn-submit {
	align-self: flex-start;
	font-size: 1em !important;
	padding: 0.6em 1.8em !important;
	cursor: pointer;
}
.tc-btn-submit:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
.tc-error {
	padding: 0.55em 0.8em;
	background: #fff0f0;
	border-left: 3px solid #cc0000;
	color: #aa0000;
	font-size: 0.92em;
	border-radius: 0 4px 4px 0;
}

/* ── Reszponzív ──────────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
	.tc-option {
		min-width: 90px;
		padding: 0.55em 0.8em;
	}
	.tc-option__desc {
		display: none;   /* helytakarékos mobilon */
	}
	.tc-price-bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.3em;
	}
	/* A „Napi menü" oszlop mobilon is látszik (a fogásokkal együtt);
	   a helyért cserébe a sorszám (#) oszlopot rejtjük. */
	.tc-days-table .tc-col-num,
	.tc-days-table th.tc-col-num {
		display: none;
	}
	.tc-days-table td.tc-col-menu {
		white-space: normal;
		min-width: 0;
	}
	.tc-btn-submit {
		width: 100%;
		text-align: center;
	}
}

/* ── Aznapi fogások: szem-ikon + koppintós popover ───────────────────────────
   Asztali gépen a fogások hoverre jelennek meg. Érintőképernyőn (nincs hover)
   egy kis szem-ikon kerül a nap mellé, amelyre koppintva kis ablakban (popover)
   jelennek meg a fogások – így a lista nem nyújtja meg az oldalt. */
.tc-meal-toggle { display: none; }
@media ( hover: none ) {
	.tc-meal-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin-left: 6px;
		width: 26px;
		height: 26px;
		vertical-align: middle;
		border: none;
		border-radius: 9999px;
		background: #EFF3ED;
		color: #3D4E36;
		font-size: 15px;
		line-height: 1;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}
	/* Érintőn ne legyen „hoverezhető" jelzés a menücellán. */
	.tc-has-meals { text-decoration: none; cursor: default; }
}

/* A koppintós popover legyen interaktív (a hover-tooltip pointer-events:none-ját
   az érintős nézetben felülírjuk, hogy a görgetés/koppintás kezelhető legyen). */
@media ( hover: none ) {
	.tc-meal-tooltip { pointer-events: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRÉMIUM BRAND FRISSÍTÉS (felülíró blokk) – funkció változatlan, csak vizuál.
   Tényleges osztálynevek: .tc-option(--selected), .tc-price-bar, .tc-days-table,
   .tc-week-label, .tc-btn-submit.
   ═══════════════════════════════════════════════════════════════════════════ */

.tanyer-csomagrendszer {
	font-family: 'Karla', sans-serif;
	color: #2B2F28;
}
.tanyer-csomagrendszer .tc-step-title {
	font-family: 'Be Vietnam Pro', sans-serif;
	color: #3D4E36;
}

/* ── Kalóriaszint + csomaghossz választó ─────────────────────────────────── */
.tanyer-csomagrendszer .tc-option {
	border: 2px solid #6E8861;
	border-radius: 12px;
	padding: 12px 24px;
	background: #fff;
	font-family: 'Be Vietnam Pro', sans-serif;
	font-weight: 700;
	color: #3D4E36;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: none;
}
.tanyer-csomagrendszer .tc-option:hover {
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(61,78,54,0.15);
}
.tanyer-csomagrendszer .tc-option--selected {
	background: #3D4E36;
	border-color: #3D4E36;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(61,78,54,0.25);
}
.tanyer-csomagrendszer .tc-option--selected .tc-option__title,
.tanyer-csomagrendszer .tc-option--selected .tc-option__desc { color: #fff; }
.tanyer-csomagrendszer .tc-option__title { color: inherit; }
.tanyer-csomagrendszer .tc-option__desc  { color: #6E8861; font-family: 'Karla', sans-serif; font-weight: 400; }

/* ── Csomagnév + ár összegző sáv ─────────────────────────────────────────── */
.tanyer-csomagrendszer .tc-price-bar {
	background: #F7F1EA;
	border: none;
	border-left: 4px solid #D97941;
	border-radius: 0 12px 12px 0;
	padding: 16px 24px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}
.tanyer-csomagrendszer .tc-price-bar__name {
	font-family: 'Be Vietnam Pro', sans-serif;
	font-size: 1.1rem;
	font-weight: 700;
	color: #3D4E36;
}
.tanyer-csomagrendszer .tc-price-bar__breakdown { color: #6E8861; }
.tanyer-csomagrendszer #tc-total-price {
	font-size: 1.4rem;
	font-weight: 800;
	color: #D97941;
	font-family: 'Be Vietnam Pro', sans-serif;
}

/* ── Kiszállítási napok táblázat ─────────────────────────────────────────── */
.tanyer-csomagrendszer .tc-days-table {
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid rgba(110,136,97,0.2);
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	border-collapse: separate;
	border-spacing: 0;
}
.tanyer-csomagrendszer .tc-days-table thead th {
	background: #3D4E36;
	color: #fff;
	font-family: 'Be Vietnam Pro', sans-serif;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border: none;
}
.tanyer-csomagrendszer .tc-days-table tbody tr:nth-child(even):not(.tc-week-label):not(.tc-week-separator) td {
	background: #F7F1EA;
}
.tanyer-csomagrendszer .tc-days-table tbody tr.tc-day-row:hover td {
	background: rgba(110,136,97,0.12);
	transition: background 0.15s ease;
}
.tanyer-csomagrendszer .tc-week-label td {
	background: rgba(110,136,97,0.15) !important;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #6E8861 !important;
	font-family: 'Be Vietnam Pro', sans-serif;
}

/* ── Rendelés gomb ───────────────────────────────────────────────────────── */
.tanyer-csomagrendszer .tc-btn-submit {
	background: #D97941 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 999px !important;
	padding: 16px 48px !important;
	font-family: 'Be Vietnam Pro', sans-serif !important;
	font-size: 1.1rem !important;
	font-weight: 700 !important;
	cursor: pointer;
	transition: all 0.25s ease !important;
	box-shadow: 0 4px 16px rgba(217,121,65,0.35);
	width: 100%;
	margin-top: 24px;
}
.tanyer-csomagrendszer .tc-btn-submit:hover:not(:disabled) {
	background: #c0682e !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(217,121,65,0.45);
}
.tanyer-csomagrendszer .tc-btn-submit:disabled {
	background: #A3A88E !important;
	box-shadow: none;
	transform: none;
	cursor: not-allowed;
}
.tanyer-csomagrendszer .tc-submit-summary {
	font-family: 'Be Vietnam Pro', sans-serif;
	font-weight: 700;
	color: #3D4E36;
}
