/* =============================================================
   Event Planning Calculator – Frontend Styles
   ============================================================= */

/* ── Reset / base ──────────────────────────────────────────── */
.ep-wrap *,
.ep-wrap *::before,
.ep-wrap *::after {
	box-sizing: border-box;
}

.ep-wrap {
	--ep-primary:    #667eea;
	--ep-primary-dk: #764ba2;
	--ep-accent:     #f093fb;
	--ep-text:       #2d3748;
	--ep-text-light: #718096;
	--ep-bg:         #f7f8fc;
	--ep-card-bg:    #ffffff;
	--ep-border:     #e2e8f0;
	--ep-radius:     14px;
	--ep-shadow:     0 4px 24px rgba(102, 126, 234, .12);
	--ep-shadow-sm:  0 2px 8px rgba(0, 0, 0, .06);
	--ep-transition: .2s ease;

	font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
	color: var(--ep-text);
	max-width: 960px;
	margin: 0 auto;
	padding: 0 8px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.ep-card {
	background: var(--ep-card-bg);
	border-radius: var(--ep-radius);
	box-shadow: var(--ep-shadow);
	margin-bottom: 24px;
	overflow: hidden;
	transition: box-shadow var(--ep-transition);
}

.ep-card-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 28px;
	background: var(--ep-primary);
	color: #fff;
}

.ep-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255,255,255,.25);
	font-weight: 700;
	font-size: 16px;
	flex-shrink: 0;
}

.ep-step-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #fff;
}

.ep-results-head {
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
}

.ep-period-label {
	font-size: 14px;
	opacity: .9;
	font-style: italic;
}

.ep-card-body {
	padding: 28px;
}

/* ── Form grid ──────────────────────────────────────────────── */
.ep-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}

@media (max-width: 600px) {
	.ep-grid-2 {
		grid-template-columns: 1fr;
	}
}

.ep-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ep-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ep-text-light);
	text-transform: uppercase;
	letter-spacing: .5px;
}

.ep-input {
	border: 2px solid var(--ep-border);
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 15px;
	color: var(--ep-text);
	background: #fff;
	transition: border-color var(--ep-transition), box-shadow var(--ep-transition);
	width: 100%;
	outline: none;
}

.ep-input:focus {
	border-color: var(--ep-primary);
	box-shadow: 0 0 0 3px rgba(102, 126, 234, .15);
}

.ep-input[readonly] {
	background: #f7f8fc;
	cursor: default;
}

.ep-textarea {
	resize: vertical;
	min-height: 90px;
}

/* Date inputs  */
.ep-input[type="date"] {
	cursor: pointer;
}

/* ── Days badge ─────────────────────────────────────────────── */
.ep-days-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	background: #f5576c;
	color: #fff;
	padding: 8px 18px;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
}

.ep-days-icon {
	font-size: 18px;
}

/* ── Staff grid ─────────────────────────────────────────────── */
.ep-staff-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.ep-staff-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 20px 16px;
	border: 2px solid var(--ep-border);
	border-radius: 12px;
	transition: border-color var(--ep-transition), box-shadow var(--ep-transition);
	background: #fafbff;
}

.ep-staff-tile:hover {
	border-color: var(--ep-primary);
	box-shadow: var(--ep-shadow-sm);
}

.ep-staff-avatar {
	font-size: 36px;
	margin-bottom: 10px;
}

.ep-staff-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 14px;
}

.ep-staff-name {
	font-weight: 700;
	font-size: 15px;
	color: var(--ep-text);
}

.ep-staff-rate {
	font-size: 13px;
	color: var(--ep-primary);
	font-weight: 600;
	display: none;
}

.ep-staff-fee {
	font-size: 12px;
	color: var(--ep-text-light);
	display: none;
}

/* ── Counter ────────────────────────────────────────────────── */
.ep-counter {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ep-cnt-btn {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid var(--ep-primary);
	background: transparent;
	color: var(--ep-primary);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--ep-transition), color var(--ep-transition);
	padding: 0;
}

.ep-cnt-btn:hover {
	background: var(--ep-primary);
	color: #fff;
}

.ep-cnt-input {
	width: 52px;
	text-align: center;
	border: 2px solid var(--ep-border);
	border-radius: 8px;
	padding: 6px 4px;
	font-size: 16px;
	font-weight: 700;
	color: var(--ep-text);
	outline: none;
	-moz-appearance: textfield;
}

.ep-cnt-input::-webkit-outer-spin-button,
.ep-cnt-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

.ep-cnt-input:focus {
	border-color: var(--ep-primary);
}

/* ── Buttons ────────────────────────────────────────────────── */
.ep-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 28px;
	border: none;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: transform var(--ep-transition), box-shadow var(--ep-transition),
				filter var(--ep-transition);
}

.ep-btn:active {
	transform: scale(.97);
}

.ep-btn-primary {
	background: var(--ep-primary);
	color: #fff;
	box-shadow: 0 4px 18px rgba(102, 126, 234, .4);
}

.ep-btn-primary:hover {
	filter: brightness(1.08);
	box-shadow: 0 6px 24px rgba(102, 126, 234, .5);
}

.ep-btn-secondary {
	background: #f5576c;
	color: #fff;
	box-shadow: 0 4px 18px rgba(240, 147, 251, .4);
}

.ep-btn-secondary:hover {
	filter: brightness(1.08);
	box-shadow: 0 6px 24px rgba(240, 147, 251, .5);
}

/* ── Action bars ────────────────────────────────────────────── */
.ep-action-bar,
.ep-cta-bar {
	text-align: center;
	margin-bottom: 24px;
}

/* ── Results table ──────────────────────────────────────────── */
.ep-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 24px;
}

.ep-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	min-width: 600px;
}

.ep-table thead th {
	background: var(--ep-primary);
	color: #fff;
	padding: 12px 14px;
	text-align: left;
	font-weight: 600;
	white-space: nowrap;
}

.ep-table tbody tr {
	border-bottom: 1px solid var(--ep-border);
	transition: background var(--ep-transition);
}

.ep-table tbody tr:hover {
	background: #f7f8fc;
}

.ep-table tbody td {
	padding: 11px 14px;
}

.ep-tc { text-align: center; }
.ep-tr { text-align: right; }

.ep-table thead th.ep-tc { text-align: center; }
.ep-table thead th.ep-tr { text-align: right; }

.ep-total-row td {
	padding: 12px 14px;
	font-weight: 700;
	background: #eef0fb;
	border-top: 2px solid var(--ep-primary);
}

.ep-brokerage-row td {
	padding: 11px 14px;
	font-weight: 600;
	background: #f9f9ff;
	border-top: 1px solid var(--ep-border);
}

/* ── Brokerage fee detail section ───────────────────────────── */
.ep-brokerage-detail {
	margin-top: 24px;
	border: 1px solid var(--ep-border);
	border-radius: 12px;
	overflow: hidden;
}

.ep-brokerage-detail-head {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #f0f2f5;
	padding: 14px 18px;
	border-bottom: 1px solid var(--ep-border);
}

.ep-brokerage-detail-icon {
	font-size: 18px;
}

.ep-brokerage-detail-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ep-text);
}

.ep-brokerage-detail-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ep-brokerage-weeks-label {
	display: block;
	font-size: 12px;
	color: var(--ep-text-light);
}

.ep-brokerage-table {
	margin: 0;
}

.ep-brokerage-table tfoot td {
	background: #eef0fb;
	font-weight: 700;
	border-top: 2px solid var(--ep-primary);
}

.ep-grand-row td {
	padding: 13px 14px;
	font-weight: 700;
	background: var(--ep-primary);
	color: #fff;
	font-size: 15px;
}

.ep-grand-row .ep-grand-total {
	text-align: center;
}

/* ── Summary cards ──────────────────────────────────────────── */
.ep-summary-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 24px 0;
}

@media (min-width: 701px) {
	.ep-summary-cards--with-brokerage .ep-summary-card--dark {
		grid-column: 2;
	}
}

@media (max-width: 700px) {
	.ep-summary-cards {
		grid-template-columns: 1fr;
	}

	.ep-summary-card--dark {
		order: 99;
	}
}

.ep-summary-card {
	background: #f7f8fc;
	border: 2px solid var(--ep-border);
	border-radius: 12px;
	padding: 20px;
	text-align: center;
	transition: transform var(--ep-transition), box-shadow var(--ep-transition);
}

.ep-summary-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--ep-shadow);
}

.ep-summary-card--accent {
	background: #fdf0ff;
	border-color: #f093fb;
}

.ep-summary-card--dark {
	background: var(--ep-primary);
	border-color: transparent;
	color: #fff;
}

/* Brokerage summary card: hidden by default, shown via JS when fee > 0 */
.ep-sum-brokerage-card {
	display: none;
}

.ep-sum-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ep-text-light);
	margin-bottom: 10px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ep-summary-card--dark .ep-sum-label {
	color: rgba(255,255,255,.8);
}

.ep-sum-label small {
	font-weight: 400;
	font-size: 11px;
}

.ep-sum-value {
	font-size: 22px;
	font-weight: 800;
	color: var(--ep-primary-dk);
	word-break: break-word;
}

.ep-summary-card--dark .ep-sum-value {
	color: #fff;
}

/* ── Notice ─────────────────────────────────────────────────── */
.ep-notice {
	padding: 12px 18px;
	border-radius: 8px;
	font-size: 14px;
	color: var(--ep-text-light);
	background: #f7f8fc;
	border: 1px solid var(--ep-border);
}

/* ── Calculate error message ────────────────────────────────── */
.ep-calc-msg {
	margin-top: 10px;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	width: 100%;
}

.ep-calc-msg--error {
	background: #fff5f5;
	border: 1px solid #fc8181;
	color: #c53030;
}

/* ── Modal ──────────────────────────────────────────────────── */
.ep-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 9999;
	align-items: center;
	justify-content: center;
}

.ep-modal.ep-modal-open {
	display: flex;
}

.ep-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(45, 55, 72, .65);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.ep-modal-box {
	position: relative;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	width: 94vw;
	max-width: 680px;
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	animation: ep-modal-in .25s ease;
}

@keyframes ep-modal-in {
	from { opacity: 0; transform: translateY(24px) scale(.97); }
	to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

.ep-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 28px;
	background: var(--ep-primary);
	color: #fff;
	flex-shrink: 0;
}

.ep-modal-head h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.ep-modal-close {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.4);
	background: transparent;
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background var(--ep-transition);
	padding: 0;
}

.ep-modal-close:hover {
	background: rgba(255,255,255,.2);
}

.ep-modal-body {
	overflow-y: auto;
	padding: 28px;
	flex: 1;
}

/* ── Fieldsets inside modal ─────────────────────────────────── */
.ep-fieldset {
	border: none;
	padding: 0;
	margin: 0 0 22px;
}

.ep-legend {
	font-size: 14px;
	font-weight: 700;
	color: var(--ep-primary-dk);
	text-transform: uppercase;
	letter-spacing: .5px;
	margin-bottom: 12px;
	padding: 0;
	display: block;
	width: 100%;
	border-bottom: 2px solid #eef0fb;
	padding-bottom: 6px;
}

/* ── Staff summary in modal ─────────────────────────────────── */
.ep-staff-summary-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ep-staff-summary-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 14px;
	background: #f7f8fc;
	border: 1px solid var(--ep-border);
	border-radius: 8px;
	font-size: 14px;
}

.ep-staff-summary-name {
	font-weight: 600;
}

.ep-staff-summary-count {
	color: var(--ep-primary);
	font-weight: 600;
}

/* ── Form footer ────────────────────────────────────────────── */
.ep-form-footer {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	padding-top: 8px;
}

.ep-form-msg {
	width: 100%;
	padding: 11px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}

.ep-form-msg--success {
	background: #e6ffed;
	border: 1px solid #6fcf97;
	color: #276749;
}

.ep-form-msg--error {
	background: #fff5f5;
	border: 1px solid #fc8181;
	color: #c53030;
}

/* ── body scroll-lock when modal open ──────────────────────── */
body.ep-no-scroll {
	overflow: hidden;
}

/* ── Mobile responsive table (card layout, no horizontal scroll) */
@media (max-width: 600px) {
	.ep-brokerage-detail-head {
		flex-wrap: wrap;
	}

	.ep-brokerage-detail-text {
		flex: 1;
	}

	.ep-table-scroll {
		overflow-x: visible;
	}

	.ep-table {
		min-width: 0;
		display: block;
	}

	.ep-table thead {
		display: none;
	}

	.ep-table tbody {
		display: block;
	}

	.ep-table tbody tr {
		display: block;
		border: 1px solid var(--ep-border);
		border-radius: 10px;
		margin-bottom: 12px;
		overflow: hidden;
		background: var(--ep-card-bg);
	}

	.ep-table tbody tr:hover {
		background: var(--ep-bg);
	}

	.ep-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 9px 12px;
		text-align: right;
		border-bottom: 1px solid var(--ep-border);
	}

	.ep-table tbody td:last-child {
		border-bottom: none;
	}

	.ep-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		font-size: 12px;
		color: var(--ep-text-light);
		text-transform: uppercase;
		letter-spacing: .4px;
		text-align: left;
		flex-shrink: 0;
		margin-right: 12px;
	}

	/* Hide tfoot on mobile – summary cards below show the totals */
	.ep-table tfoot {
		display: none;
	}
}

/* ── Responsive helpers ─────────────────────────────────────── */
@media (max-width: 480px) {
	.ep-card-body,
	.ep-modal-body {
		padding: 18px 16px;
	}
	.ep-card-head,
	.ep-modal-head {
		padding: 16px 18px;
	}
	.ep-step-title {
		font-size: 15px;
	}
	.ep-btn {
		width: 100%;
		justify-content: center;
	}
	.ep-form-footer {
		align-items: stretch;
	}
}

/* ── DSGVO consent block ──────────────────────────────────────── */
.ep-dsgvo-fieldset {
border: none;
padding: 0;
margin: 0;
}

.ep-dsgvo-notice {
background: #f0f4ff;
border-left: 4px solid var(--ep-primary, #667eea);
border-radius: 6px;
padding: 14px 18px;
}

.ep-dsgvo-text {
margin: 0 0 12px;
font-size: 14px;
color: var(--ep-text-light, #718096);
line-height: 1.55;
}

.ep-dsgvo-link {
color: var(--ep-primary, #667eea);
text-decoration: underline;
}

.ep-dsgvo-label {
display: flex;
align-items: flex-start;
gap: 10px;
cursor: pointer;
}

.ep-dsgvo-checkbox {
flex-shrink: 0;
margin-top: 2px;
width: 16px;
height: 16px;
accent-color: var(--ep-primary, #667eea);
cursor: pointer;
}

.ep-dsgvo-label-text {
font-size: 14px;
color: var(--ep-text, #2d3748);
line-height: 1.5;
}
