/* ==========================================================================
   CENTRÁLNÍ MODÁLNÍ SYSTÉM – Jednotný vzhled pro celý projekt
   Načítá se na všech stránkách přes _header.php
   ========================================================================== */

/* --- Overlay (poloprůhledné pozadí) --- */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	display: none;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.modal-overlay.active {
	display: flex;
	opacity: 1;
}

/* --- Společný základ pro všechny kontejnery --- */
.modal-success,
.modal-error,
.modal-payment {
	display: flex;
	gap: 1rem;
	padding: 1.5rem;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	font-family: 'Exo 2', sans-serif;
	max-width: 500px;
	width: 90%;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.modal-overlay.active .modal-success,
.modal-overlay.active .modal-error,
.modal-overlay.active .modal-payment {
	transform: scale(1);
}

/* --- Úspěch (zelená) --- */
.modal-success {
	background-color: #eef8e8;
	border-left: 5px solid #549d2a;
	color: #2d6a14;
}

/* --- Chyba (červená) --- */
.modal-error {
	background-color: #fef0f0;
	border-left: 5px solid #d14343;
	color: #b91c1c;
}

/* --- Platba (modrá) --- */
.modal-payment {
	background-color: #eef4ff;
	border-left: 5px solid #2563eb;
	color: #1e40af;
}

/* --- Levý sloupec (emoji) --- */
.modal-left {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	width: auto;
	flex-shrink: 0;
}

.modal-emoji {
	font-size: 2rem;
	margin-top: -0.25rem;
}

.modal-success .modal-emoji {
	color: #549d2a;
}

.modal-error .modal-emoji {
	color: #d14343;
}

.modal-payment .modal-emoji {
	color: #2563eb;
}

/* --- Prostřední sloupec (nadpis + text) --- */
.modal-middle {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0; /* zabrání přetékání */
}

.modal-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.2rem;
	font-weight: 700;
}

.modal-text {
	margin: 0;
	line-height: 1.5;
	font-size: 0.95rem;
	opacity: 0.9;
}

/* --- Pravý sloupec (tlačítko) --- */
.modal-right {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-end;
	width: auto;
	flex-shrink: 0;
}

.modal-btn {
	padding: 0.6rem 1.5rem;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 1.1rem;
	font-weight: 600;
	font-family: 'Exo 2', sans-serif;
	transition: background 0.2s;
	color: #fff;
	white-space: nowrap;
}

.modal-btn-success {
	background: #1f9d55;
}

.modal-btn-success:hover {
	background: #17814a;
}

.modal-btn-error {
	background: #d14343;
}

.modal-btn-error:hover {
	background: #b53434;
}

.modal-btn-payment {
	background: #2563eb;
}

.modal-btn-payment:hover {
	background: #1d4ed8;
}

/* --- Responzivní --- */
@media (max-width: 500px) {
	.modal-success,
	.modal-error,
	.modal-payment {
		flex-direction: column;
		gap: 0.5rem;
		padding: 1.25rem;
	}

	.modal-right {
		align-items: stretch;
	}

	.modal-btn {
		width: 100%;
		text-align: center;
	}
}
