/**
 * BookMaster Pro — Frontend stílusok.
 * BEM metodológia. Mobile-first.
 */

:root {
	--bmp-primary: #2563eb;
	--bmp-primary-hover: #1d4ed8;
	--bmp-accent: #f59e0b;
	--bmp-text: #1f2937;
	--bmp-text-light: #6b7280;
	--bmp-bg: #ffffff;
	--bmp-bg-secondary: #f9fafb;
	--bmp-border: #e5e7eb;
	--bmp-success: #16a34a;
	--bmp-error: #dc2626;
	--bmp-info: #0284c7;
	--bmp-border-radius: 8px;
	--bmp-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	--bmp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	--bmp-font: inherit;
}

.bmp-booking {
	font-family: var(--bmp-font);
	color: var(--bmp-text);
	max-width: 720px;
	margin: 0 auto;
	background: var(--bmp-bg);
	border-radius: var(--bmp-border-radius);
	padding: 24px;
	box-shadow: var(--bmp-shadow);
	line-height: 1.5;
}

.bmp-booking__title {
	margin: 0 0 24px;
	font-size: 1.5rem;
	color: var(--bmp-text);
}

/* ---- Steps indicator ---- */
.bmp-steps {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
	margin: 0 0 24px;
	counter-reset: bmp-step;
}

.bmp-steps__item {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.85rem;
	color: var(--bmp-text-light);
	padding: 8px 12px;
	background: var(--bmp-bg-secondary);
	border-radius: var(--bmp-border-radius);
	text-align: center;
	counter-increment: bmp-step;
	position: relative;
}

.bmp-steps__item::before {
	content: counter(bmp-step) ". ";
	font-weight: 600;
}

.bmp-steps__item--active {
	background: var(--bmp-primary);
	color: #fff;
}

.bmp-steps__item--done {
	background: var(--bmp-bg-secondary);
	color: var(--bmp-success);
}

.bmp-steps__item--done::before {
	content: "✓ ";
}

/* ---- Form & steps ---- */
.bmp-form {
	position: relative;
}

.bmp-step {
	display: none;
}

.bmp-step--active {
	display: block;
}

.bmp-step__hint {
	color: var(--bmp-text-light);
	font-size: 0.95rem;
	margin: 0 0 16px;
}

/* ---- Fields ---- */
.bmp-field {
	margin-bottom: 16px;
}

.bmp-field__label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 0.95rem;
}

.bmp-required {
	color: var(--bmp-error);
	margin-left: 2px;
}

.bmp-field__input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-size: 1rem;
	font-family: var(--bmp-font);
	border: 1px solid var(--bmp-border);
	border-radius: var(--bmp-border-radius);
	background: var(--bmp-bg);
	color: var(--bmp-text);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.bmp-field__input:focus {
	outline: none;
	border-color: var(--bmp-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.bmp-field__input:invalid:not(:focus):not(:placeholder-shown) {
	border-color: var(--bmp-error);
}

textarea.bmp-field__input {
	resize: vertical;
	min-height: 80px;
}

.bmp-checkbox-label,
.bmp-radio-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 8px 0;
	cursor: pointer;
	font-size: 0.95rem;
}

.bmp-checkbox-label input,
.bmp-radio-label input {
	margin-top: 3px;
	flex-shrink: 0;
}

/* ---- Slots grid ---- */
.bmp-slots__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 8px;
	margin-bottom: 16px;
}

.bmp-slot {
	padding: 10px 12px;
	background: var(--bmp-bg-secondary);
	border: 1px solid var(--bmp-border);
	border-radius: var(--bmp-border-radius);
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--bmp-text);
	transition: all 0.15s;
}

.bmp-slot:hover {
	border-color: var(--bmp-primary);
	background: var(--bmp-bg);
}

.bmp-slot--selected {
	background: var(--bmp-primary);
	color: #fff;
	border-color: var(--bmp-primary);
}

/* ---- Table cards ---- */
.bmp-tables__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.bmp-table-card {
	padding: 14px;
	background: var(--bmp-bg-secondary);
	border: 2px solid var(--bmp-border);
	border-radius: var(--bmp-border-radius);
	cursor: pointer;
	transition: all 0.15s;
}

.bmp-table-card:hover {
	border-color: var(--bmp-primary);
}

.bmp-table-card--selected {
	border-color: var(--bmp-primary);
	background: rgba(37, 99, 235, 0.05);
}

.bmp-table-card strong {
	display: block;
	font-size: 1rem;
	margin-bottom: 4px;
}

.bmp-table-card small {
	color: var(--bmp-text-light);
	font-size: 0.85rem;
}

.bmp-table-card p {
	margin: 8px 0 0;
	font-size: 0.9rem;
	color: var(--bmp-text-light);
}

/* ---- Actions ---- */
.bmp-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 24px;
	flex-wrap: wrap;
}

.bmp-btn {
	display: inline-block;
	padding: 12px 24px;
	border: none;
	border-radius: var(--bmp-border-radius);
	font-size: 1rem;
	font-family: var(--bmp-font);
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s;
	text-decoration: none;
	text-align: center;
	line-height: 1.2;
}

.bmp-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bmp-btn--primary {
	background: var(--bmp-primary);
	color: #fff;
}

.bmp-btn--primary:hover:not(:disabled) {
	background: var(--bmp-primary-hover);
}

.bmp-btn--secondary {
	background: var(--bmp-bg-secondary);
	color: var(--bmp-text);
	border: 1px solid var(--bmp-border);
}

.bmp-btn--secondary:hover:not(:disabled) {
	background: var(--bmp-border);
}

.bmp-btn--danger {
	background: var(--bmp-error);
	color: #fff;
}

.bmp-btn--small {
	padding: 6px 12px;
	font-size: 0.85rem;
}

/* ---- Notices ---- */
.bmp-notice {
	padding: 12px 16px;
	border-radius: var(--bmp-border-radius);
	font-size: 0.95rem;
	margin: 12px 0;
}

.bmp-notice--info {
	background: #eff6ff;
	color: #1e40af;
	border-left: 3px solid var(--bmp-info);
}

.bmp-notice--error {
	background: #fef2f2;
	color: #991b1b;
	border-left: 3px solid var(--bmp-error);
}

.bmp-notice--success {
	background: #f0fdf4;
	color: #166534;
	border-left: 3px solid var(--bmp-success);
}

.bmp-inline-error {
	color: var(--bmp-error);
	font-size: 0.9rem;
	margin-bottom: 12px;
	padding: 8px 12px;
	background: #fef2f2;
	border-radius: var(--bmp-border-radius);
}

/* ---- Loading ---- */
.bmp-loading {
	padding: 20px;
	text-align: center;
	color: var(--bmp-text-light);
}

.bmp-loading::after {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid var(--bmp-border);
	border-top-color: var(--bmp-primary);
	border-radius: 50%;
	margin-left: 8px;
	animation: bmp-spin 0.8s linear infinite;
	vertical-align: middle;
}

@keyframes bmp-spin {
	to { transform: rotate(360deg); }
}

/* ---- Summary ---- */
.bmp-summary-table,
.bmp-bookings-table {
	width: 100%;
	border-collapse: collapse;
	margin: 16px 0;
}

.bmp-summary-table th,
.bmp-bookings-table th {
	text-align: left;
	padding: 10px 12px;
	background: var(--bmp-bg-secondary);
	border-bottom: 1px solid var(--bmp-border);
	font-weight: 500;
}

.bmp-summary-table td,
.bmp-bookings-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--bmp-border);
}

/* ---- Result ---- */
.bmp-result__success {
	text-align: center;
	padding: 32px;
	background: #f0fdf4;
	border-radius: var(--bmp-border-radius);
	border: 1px solid #bbf7d0;
}

.bmp-result__success h3 {
	color: var(--bmp-success);
	font-size: 1.4rem;
	margin: 0 0 16px;
}

.bmp-result__success p {
	margin: 8px 0;
	color: var(--bmp-text);
}

/* ---- Status badges ---- */
.bmp-status {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: 500;
}

.bmp-status--pending {
	background: #fef3c7;
	color: #92400e;
}

.bmp-status--confirmed {
	background: #d1fae5;
	color: #065f46;
}

.bmp-status--cancelled {
	background: #fee2e2;
	color: #991b1b;
}

.bmp-status--no_show {
	background: #fef3c7;
	color: #92400e;
}

.bmp-status--completed {
	background: #e0e7ff;
	color: #3730a3;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
	.bmp-booking {
		padding: 16px;
	}

	.bmp-steps {
		flex-direction: column;
	}

	.bmp-steps__item {
		text-align: left;
	}

	.bmp-actions {
		flex-direction: column-reverse;
	}

	.bmp-btn {
		width: 100%;
	}

	.bmp-bookings-table {
		font-size: 0.85rem;
	}

	.bmp-bookings-table th,
	.bmp-bookings-table td {
		padding: 8px 6px;
	}
}
