@font-face {
	font-family: 'MyCustomFont';
	src: url('../fonts/DoublePorter5.woff2') format('woff2');
}

html {
	font-size: 20px;
	font-family: 'MyCustomFont', sans-serif;
}

body {
	margin: 0;
	paddig: 0;
	display: flex;
	justify-content: center;
}

body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: url("../img/background.jpg");
	background-size: contain;
	background-position: center;
	opacity: 0.8;
	z-index: -1;
}

/* Phone (max-width: 600px) */
@media (max-width: 600px) {
.card-container {
	grid-template-columns: repeat(1, 1fr);
	margin-bottom: 20px;
}
.title {
	font-size: 28px;
}

.ingredients,
	#chosenPizzaBase {
	font-size: 18px;
}

.card-img {
	width: 100px;
	height: 100px;
}

.card {
	padding: 60px 15px 15px;
}
}

/* Tablet (601px to 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
.card-container {
	grid-template-columns: repeat(2, 1fr);
	margin-bottom: 20px;
}
}

/* Desktop (1025px and up) */
@media (min-width: 1025px) {
.card-container {
	grid-template-columns: repeat(5, 1fr);
	margin-bottom: 20px;
}
}


button {
	font-family: 'MyCustomFont', sans-serif;
}

.no-scroll {
	overflow: hidden;
	height: 100%;
	
	width: 100%;
}




.form-footer	{
	
	bottom: 0;
	z-index: 100;
	display: flex;
	justify-content: space-between; /* or center, or flex-end */
	gap: 16px;
	margin-top: 30px;
	margin-bottom: 100px;
}

.form-footer	button {
	flex: 1;
	padding: 12px 20px;
	border-radius: 6px;
	cursor: pointer;
	font-size: larger;
	font-weight: 500;
	transition: background-color 0.2s;
	box-shadow: 0 10px 25px rgba(0,0,0,0.3);
	border: 1px solid #ccc;
}


.place-order-btn {
	width: 100%;
	background: #28a745;
	color: white;
	border: none;
	padding: 12px;
	border-radius: 8px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.2s;
}

.place-order-btn:hover {
	background: #0a9129;
}

.cancelButton {
	width: 100%;
	background: #e53935;
	color: white;
	border: none;
	padding: 12px;
	border-radius: 8px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.2s;
}

.cancelButton:hover {
	background: #c62828;
}


.main-wrapper {
	margin: 0 auto;
	padding: 0px;
	z-index: 9998;
	margin-bottom: 200px;
}

.order-container {
	display: block;
	max-width: 500px;
	margin: 10px auto;
	padding: 20px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
	background-image: url("../img/order-background.png");
}

.card-container {
	display: grid;
	gap: 30px;
	max-width: 100%;
	width: 100%;
	padding: 0 10px;
	box-sizing: border-box;
	margin: 0 auto;
	margin-bottom: 20px;
	
}


.card-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	transition: all 0.4s ease;
	font-family: 'MyCustomFont', sans-serif;
}	

.card-img {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	object-fit: cover;
	border: 6px solid white;
	background: white;
	z-index: 1;
}

.card {
	position: relative;
	overflow: hidden;
	background: url("../img/card-background.jpg") no-repeat center center / cover;
	color: white;
	border-radius: 16px;
	box-shadow: 0 8px 16px rgba(0,0,0,0.2);
	text-align: center;
	padding: 80px 20px 20px;
	margin-top: -70px;
	width: 100%;
	box-sizing: border-box;

	display: flex;
	flex-direction: column;
	min-height: 265px;
	
}

#orderedPizza .card {
	min-height: unset !important;
	margin-top: 0px !important;
}

.card.order {
	min-height: 150px;
}
.card-wrapper.order {
	margin-bottom: 15px;
	width: 100%;
	max-width: 560px;
	box-sizing: border-box;
}



.card-content {
	position: relative;
	z-index: 1;
}

.title {
	font-size: 30px;
	font-weight: bold;
	color: #e63946;
	margin-bottom: 10px;
}

.ingredients {
	font-size: 22px;
	margin-bottom: 20px;
	color: #eee;
}


.card-footer {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}

#chosenPizzaBase {
	font-size: 22px;
	color: #eee;
}

.allergen-table-container {
	display: none;
	max-width: 500px;
	margin: 10px auto;
	padding: 20px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.2);
	background-color: #f4f4f9;
}

.allergenContainer {
	color: yellow;
	margin-bottom: 10px;
}

#allergenList,
#chosenPizzaAllergens {
	color: yellow;
	margin-bottom: 10px;
}

#chosenPizzaAllergens_ordered {
	color: yellow;
	margin-top: 5px;
}



.price {
	color: red;
	font-size: larger;
	font-style: italic;
}

.order-btn {
	background-color: #e63946;
	border: none;
	color: white;
	padding: 10px 24px;
	font-size: 22px;
	border-radius: 20px;
	cursor: pointer;
	transition: background 0.3s ease;
	margin-top: auto;
	font-family: 'MyCustomFont', sans-serif;
	width: 90%;
}

.order-btn:hover {
	background-color: #d62828;
}


.modal {
	display: flex;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transform: scale(0.95);
	transition: opacity 0.3s ease, transform 0.3s ease;
	padding: 20px; /* Add some padding so content doesn't hit edges */
	box-sizing: border-box;
	overflow-y: auto; /* Allow modal to scroll if it's too tall */
}

.modal.show {
	opacity: 1;
	visibility: visible;
	transform: scale(1);
	overflow-y: scroll;
}

.modal-content {
	background-color: #fff;
	color: #333;
	padding: 30px;
	border-radius: 12px;
	width: 100%;
	max-width: 400px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	box-sizing: border-box;
	overflow-y: auto;
	max-height: 100%;
}

.modal-content h1 {
	margin-top: 0px;
	margin-bottom: 2px;
	text-align: center;
}

.modal-content input[type="text"] {
	padding: 10px;
	font-size: 16px;
	width: 100%;
	box-sizing: border-box;
}

#kulsos {
	display: unset;
	margin-bottom: 15px;
}

#delta {
	display: none;
}

#customerName,
#customerNameDelta, 
#orderComment, 
#orderCommentKivansag,
#customerNameKivansag,
#customerNameDeltaKivansag {
	margin-top: 10px;
	margin-bottom: 15px;
}

#result-order-comment-container {
	padding: 0px 0px 0px 30px;
	text-align: left;
}

select {
	padding: 8px;
	font-size: 16px;
	width: 100%;
}

.chosenPizza {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 15px;
}

#chosenPizzaName h2 {
	margin-bottom: 0px;
	margin-top: 25px;
}

#chosenPizzaName_ordered h2 {
	margin-bottom: 0px;
}

#chosenPizzaPrice_ordered {
	margin-top: 10px;
}

.order-number-card {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	/*background: linear-gradient(145deg, #f0f0f0, #ffffff); 
	 box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
	 margin: 20px auto;
	*/
	padding: 10px 20px;
	border-radius: 16px;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	
	text-align: center;
	margin-top: 80px;
}

.order-label {
	font-size: 18px;
	font-weight: 500;
	color: #444;
	margin-bottom: 10px;
}

#orderNumberDisplay {
	font-size: 60px;
	font-weight: bold;
	background: #b9e4f5;
	padding: 5px 10px;
	border-radius: 12px;
	box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
	margin-bottom: 15px;
	transform: rotateX(180deg);
	position: absolute;
	color: black;

	user-select: none;
	pointer-events: none;
}

#chosenPizzaImage_ordered {
	width: 100px;
	height: 100px;
}
#chosenPizzaIngredients_ordered {
	margin-bottom: 0px;
}

#result-orderModal .card {

}

.checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}


.close-btn {
	position: absolute;
	right: 16px;
	top: 10px;
	font-size: 48px;
	cursor: pointer;
}



.order-list {
	list-style-type: none;
	padding: 0;
	font-size: 18px;
}

.order-list li {
	display: flex;
	justify-content: space-between;
	padding: 7px;
	border-bottom: 1px solid #ddd;
}

.order-list li .order-status {
	font-weight: bold;
}

.order-list li .status-1 {
	color: cornflowerblue;
}

.order-list li .status-2 {
	color: darkkhaki;
}

.order-list li .status-3 {
	color: white;
	font-weight: bold;
}


#modalTitle {
	margin-top: 5px;
}

.result-modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0; top: 0;
	width: 100%; height: 100%;
	background: rgba(0, 0, 0, 0.6);
	justify-content: center;
	align-items: center;
	font-size: larger;
}

.result-modal-content {
	background: white;
	padding: 30px;
	border-radius: 8px;
	text-align: center;
	box-shadow: 0 5px 15px rgba(0,0,0,0.3);
	margin: 5px auto;
	max-width: 500px;
	max-height: 800px;
	overflow-y: scroll;
}

.result-modal-content button {
	margin-top: 20px;
	padding: 20px 20px;
	background: #28a745;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 32px;
	width: 30%;
}

#result-orders pre {
	background: #f8f9fa;
	padding: 10px;
	border-left: 3px solid #28a745;
	margin: 10px 0;
	white-space: pre-wrap;
	text-align: left !important;
}

#result-orders {
	text-align: left !important;
}

.result-order-card {
	margin: 10px;
	padding: 10px;
	text-align: left !important;
}

#result-orders ul {
	padding-left: 20px;
	margin: 0;
	margin-left: 20px;
	list-style: disc;
}

#result-orders li {
	margin: 0;
	padding: 0;
}

.fancy-checkbox {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	font-size: 20px;
	user-select: none;
	gap: 10px;
	position: relative;
	opacity: 1;
	transition: opacity 0.2s;
}

.fancy-checkbox input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
}

.fancy-checkbox .checkmark {
	height: 20px;
	width: 20px;
	background-color: #f0f0f0;
	border: 2px solid #aaa;
	border-radius: 6px;
	transition: all 0.2s ease;
	position: relative;
}

/* Checked state */
.fancy-checkbox input:checked + .checkmark {
	background-color: #4caf50;
	border-color: #4caf50;
}

/* Checkmark tick */
.fancy-checkbox .checkmark::after {
	content: "";
	position: absolute;
	display: none;
	left: 5px;
	top: 1px;
	width: 6px;
	height: 12px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.fancy-checkbox input:checked + .checkmark::after {
	display: block;
}

.fancy-checkbox.disabled {
	cursor: not-allowed;
	opacity: 0.5;
	pointer-events: none;
	display: none;
}

.fancy-checkbox.disabled input {
	cursor: not-allowed;
}



.modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 1000;
	opacity: 0;
	
}

.modal-backdrop.show {
	opacity: 1;
}

.chosenPizza {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	transition: all 0.4s ease;
	text-align: center;
}


#modal_custom {
	z-index: 9998;
}


.custom-pizza-modal {
	position: fixed;
	top: 0; left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0,0,0,0.6);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 999;
}

.custom-pizza-content {
	background: #fff;
	padding: 2rem;
	border-radius: 12px;
	width: 90%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 10px 25px rgba(0,0,0,0.3);
	z-index: 1001;
}

.custom-pizza-content h2 {
	margin-top: 0;
	font-size: 40px;
	text-align: center;
}

#customPizzaPrice {
	margin-top: 0;
	font-size: 30px;
	text-align: center;
	color: red;
}

.custom-pizza-content input[type="text"] {
	padding: 10px;
	font-size: 16px;
	width: 100%;
	box-sizing: border-box;
}


.subtitle {
	margin-bottom: 1rem;
	text-align: center;
	color: #666;
}

.ingredient-group {
	margin-bottom: 2rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem 1rem;
}

.ingredient-group h3 {
	grid-column: 1 / -1;
	font-size: 32px;
	color: #444;
	font-weight: 600;
}
.ingredient-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.required-note {
	color: red;
	vertical-align: super;
	margin-left: 4px;
}

.ingredient-label.disabled {
	pointer-events: none;
	opacity: 0.5;
	color: gray;
	display: none;
	cursor: not-allowed;
}

.ingredient-label:hover {
	background-color: #e8e8e8;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ingredient-group input[type="checkbox"] {
	accent-color: #d32f2f;
	transform: scale(1.1);
}

.ingredient-label {
	display: flex;
	width: 100%;
	margin: 6px 0;
}

.ingredient-label input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 1px;
	height: 1px;
}

.ingredient-label span {
	flex: 1;
	padding: 10px 16px;
	background-color: #f2f2f2;
	border-radius: 8px;
	box-sizing: border-box;
	font-size: larger;
	box-shadow: 0 10px 25px rgba(0,0,0,0.3);
	border: 1px solid #ccc;
}

/* ✅ When checkbox is checked, style the span */
.ingredient-label input:checked + span {
	background-color: #28a745;
	color: white;
	font-weight: bold;
}

.customIngredientAllergens {
	font-size: 14px;
	color: yellow;
	background-color: black;
	border-radius: 5px;
	line-height: 1;
	align-items: center;
	justify-content: center;
	display: inline-flex;
	padding: 2px 4px;
}

.name-input {
	width: 100%;
	padding: 10px;
	margin: 1rem 0;
	border: 1px solid #ccc;
	border-radius: 6px;
}

.close-custom-btn {
	position: absolute;
	top: 10px; right: 10px;
	background: transparent;
	border: none;
	font-size: 48px;
	cursor: pointer;
}

/* Optional: hide modal by default */
.hidden {
	display: none;
}

#noMoreDough {
	display: none;
	max-width: 500px;
}

 .popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transform: scale(0.95);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.popup-overlay.show {
	opacity: 1;
	visibility: visible;
	transform: scale(1);
}	
	 #errorPopup {
	 z-index: 10000;
	 }

	/* Popup window */
.popup {
	background: #fff;
	padding: 24px;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	width: 500px;
	position: relative;
	text-align: center;
	z-index: 9999;
}

.popup h2 {
	color: #d32f2f;
	margin: 0 0 10px;
}

.popup p {
	color: #333;
	font-size: 16px;
}

.popup .close-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	background: transparent;
	border: none;
	font-size: 24px;
	color: #888;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background 0.3s, color 0.3s;
}

.popup .close-btn:hover {
	background: rgba(211, 47, 47, 0.1);
	color: #d32f2f;
}

.popup .icon {
	font-size: 36px;
	color: #d32f2f;
	margin-bottom: 10px;
}
	
.toast-container {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	align-items: center; 
	gap: 10px;
	pointer-events: none;
	width: max-content;
	max-width: 90vw;
}

.toast {
	pointer-events: auto; /* enable clicks on toast itself */
	padding: 15px 25px;
	border-radius: 8px;
	color: white;
	font-size: 1.1rem;
	min-width: 280px;
	max-width: 90vw;
	box-sizing: border-box;
	text-align: center;
	box-shadow: 0 3px 10px rgba(0,0,0,0.2);
	animation: slideDown 0.3s ease forwards;
}

.toast.availableOnly {
	background-color: rgba(46, 204, 113, 0.95); /* greenish */
}

.toast.visibleOnly {
	background-color: rgba(231, 76, 60, 0.95); /* reddish */
}

@keyframes slideDown {
	from {
	opacity: 0;
	transform: translateY(-20px) translateX(0);
}
	to {
	opacity: 0.9;
	transform: translateY(0) translateX(0);
}
}

.dough-sticky-card {
	
	top: 0;
	background-color: #ffffff;
	padding: 12px 16px;
	border: 1px solid #ccc;
	border-radius: 10px;
	width: fit-content;
	margin: 10px auto;
	font-family: Arial, sans-serif;
	font-size: 14px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
	z-index: 1000;
}

.dough-line {
	margin: 4px 0;
	color: #333;
}

.count.enabled {
	font-weight: bold;
	color: #2e7d32; /* green */
	display: unset;
}
.count.disabled {
	font-weight: bold;
	color: red;
	display: none;
}

.dough-line.enabled {
	display: block;
}
.dough-line.disabled {
	display: none;
}

#noMorePizza {
	display: none;
}