/* =========================================================================
   Sündmused (events) — archive + single + CF7 registration form
   Loaded only on the sundmused archive/single views.
   Design ref: EKMY event calendar design (Claude Design export, screens 1a–1d)
   ========================================================================= */

.nd-ev-page {
	--nd-ev-blue: #0e00f0;       /* site accent (underlines, form top border) */
	--nd-ev-lightblue: #0087d8;  /* date badge, facts box */
	--nd-ev-steel: #3a5ba9;      /* buttons, price */
	--nd-ev-steel-dark: #2f4b8d;
	--nd-ev-red: #d61e1e;
	--nd-ev-text: #333333;
	--nd-ev-body: #5f5f5f;
	--nd-ev-muted: #8a8a8a;
	--nd-ev-border: #e8e8e8;
}

/* --- shared ------------------------------------------------------------ */

.nd-ev-heading {
	margin: 0 0 18px;
	font-family: 'Open Sans', 'Arial', sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	color: var(--nd-ev-text);
}
.nd-ev-heading::after {
	content: '';
	display: block;
	width: 50px;
	height: 2px;
	background: var(--nd-ev-blue);
	margin-top: 10px;
}

a.nd-ev-btn {
	display: inline-block;
	background: var(--nd-ev-steel);
	color: #ffffff;
	font-size: 14px;
	line-height: 1;
	font-weight: 400;
	padding: 13px 26px;
	border-radius: 3px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease;
}
a.nd-ev-btn:hover,
a.nd-ev-btn:focus {
	background: var(--nd-ev-steel-dark);
	color: #ffffff;
}

.nd-ev-box-title {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--nd-ev-text);
}
.nd-ev-box-title::after {
	content: '';
	display: block;
	width: 44px;
	height: 2px;
	margin-top: 10px;
}

/* --- archive ------------------------------------------------------------ */

.post-type-archive-sundmused .theme-page {
	padding-bottom: 0; /* the CTA band sits flush against the footer */
}

.nd-ev-archive {
	padding: 52px 0 72px;
}

.nd-ev-intro {
	max-width: 760px;
	margin-bottom: 44px;
}
.nd-ev-intro p {
	margin: 0;
	font-size: 15px;
	line-height: 1.8;
	color: var(--nd-ev-body);
}

.nd-ev-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* empty state (design 2a) */
.nd-ev-emptybox {
	max-width: 640px;
	margin: 20px auto 16px;
	text-align: center;
}
.nd-ev-heading--centered::after {
	margin-left: auto;
	margin-right: auto;
}
.nd-ev-emptybox .nd-ev-heading {
	font-size: 22px;
}
.nd-ev-emptybox p {
	margin: 0 0 28px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--nd-ev-body);
}

.nd-ev-card {
	display: flex;
	border: 1px solid var(--nd-ev-border);
	background: #ffffff;
}

.nd-ev-card-date {
	width: 110px;
	flex-shrink: 0;
	background: var(--nd-ev-lightblue);
	color: #ffffff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 22px 0;
	text-align: center;
}
.nd-ev-card-day {
	font-size: 34px;
	font-weight: 300;
	line-height: 1;
}
.nd-ev-card-month {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
}
.nd-ev-card-year {
	font-size: 12px;
	opacity: 0.8;
}

.nd-ev-card-body {
	flex: 1;
	min-width: 0;
	padding: 24px 28px;
	display: flex;
	align-items: center;
	gap: 28px;
}
.nd-ev-card-main {
	flex: 1;
	min-width: 0;
}

.nd-ev-card-title {
	margin: 0;
	font-family: 'Open Sans', 'Arial', sans-serif;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
}
.nd-ev-card-title a {
	color: var(--nd-ev-text);
	text-decoration: none;
	transition: color 0.2s ease;
}
.nd-ev-card-title a:hover {
	color: var(--nd-ev-blue);
}

.nd-ev-card-meta {
	margin-top: 8px;
	font-size: 13px;
	color: var(--nd-ev-muted);
	display: flex;
	gap: 6px 18px;
	flex-wrap: wrap;
}
.nd-ev-card-price {
	color: var(--nd-ev-steel);
	font-weight: 600;
}

.nd-ev-card-excerpt {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--nd-ev-body);
}

/* past events */
.nd-ev-past {
	margin-top: 56px;
}
.nd-ev-card--past .nd-ev-card-date {
	background: #9a9a9a;
}
.nd-ev-card--past .nd-ev-card-btn {
	background: #9a9a9a;
}
.nd-ev-card--past .nd-ev-card-btn:hover,
.nd-ev-card--past .nd-ev-card-btn:focus {
	background: #7d7d7d;
}

/* CTA band above the footer */
.nd-ev-cta {
	background: #f0f0f0;
	padding: 44px 0;
}
.nd-ev-cta-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 36px;
	flex-wrap: wrap;
}
.nd-ev-cta-text {
	font-size: 24px;
	font-weight: 300;
	color: var(--nd-ev-steel);
}

/* --- single ------------------------------------------------------------- */

.nd-ev-single {
	padding-top: 52px;
}

.nd-ev-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	grid-template-rows: auto auto 1fr;
	grid-template-areas:
		"main facts"
		"main aside"
		"main .";
	column-gap: 56px;
	align-items: start;
}
.nd-ev-main {
	grid-area: main;
	min-width: 0;
}
.nd-ev-facts {
	grid-area: facts;
}
.nd-ev-aside {
	grid-area: aside;
	margin-top: 28px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* facts box */
.nd-ev-facts {
	background: #f7f7f7;
	border-top: 3px solid var(--nd-ev-lightblue);
	padding: 28px 30px;
}
.nd-ev-facts .nd-ev-box-title::after {
	background: var(--nd-ev-lightblue);
}
.nd-ev-facts-rows {
	margin-top: 18px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.nd-ev-fact {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.nd-ev-fact-label {
	color: #9a9a9a;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.nd-ev-fact-value {
	color: var(--nd-ev-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

/* contact box + back link */
.nd-ev-contactbox {
	background: var(--nd-ev-steel);
	color: #ffffff;
	padding: 28px 30px;
}
.nd-ev-contactbox .nd-ev-box-title {
	color: #ffffff;
}
.nd-ev-contactbox .nd-ev-box-title::after {
	background: rgba(255, 255, 255, 0.5);
}
.nd-ev-contactbox-body {
	margin-top: 16px;
	font-size: 14px;
	line-height: 2;
	opacity: 0.95;
}

a.nd-ev-backlink {
	display: block;
	border: 1px solid #dddddd;
	color: #444444;
	font-size: 14px;
	padding: 13px 0;
	text-align: center;
	border-radius: 3px;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease;
}
a.nd-ev-backlink:hover,
a.nd-ev-backlink:focus {
	border-color: var(--nd-ev-steel);
	color: var(--nd-ev-steel);
}

/* main column content */
.nd-ev-content {
	margin-bottom: 36px;
}
.nd-ev-content p {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--nd-ev-body);
}
.nd-ev-content ul,
.nd-ev-content ol {
	margin: 0 0 16px;
	padding-left: 22px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--nd-ev-body);
}

/* --- registration box + CF7 form ----------------------------------------- */

.nd-ev-regbox {
	border: 1px solid var(--nd-ev-border);
	border-top: 3px solid var(--nd-ev-blue);
	background: #ffffff;
	padding: 32px 36px;
}
.nd-ev-regbox-note {
	margin: 0 0 24px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--nd-ev-muted);
}

.nd-ev-regbox--closed {
	border-top-color: var(--nd-ev-red);
	background: #fbfbfb;
}
.nd-ev-closed-title {
	margin: 0 0 8px;
	font-family: 'Open Sans', 'Arial', sans-serif;
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--nd-ev-text);
}
.nd-ev-regbox--closed p {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
	color: var(--nd-ev-muted);
}

/* form grid (markup comes from the auto-created CF7 form) */
.nd-ev-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px 20px;
}
.nd-ev-field--full {
	grid-column: 1 / -1;
}

/* "Arve saaja andmed" section heading inside the form */
.nd-ev-form-subhead {
	grid-column: 1 / -1;
	margin-top: 10px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--nd-ev-text);
}
.nd-ev-form-subhead::after {
	content: '';
	display: block;
	width: 36px;
	height: 2px;
	background: var(--nd-ev-lightblue);
	margin-top: 8px;
}

.nd-ev-field label,
.nd-ev-field-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #444444;
}

.nd-ev-field .wpcf7-form-control-wrap {
	display: block;
	margin-top: 6px;
	font-weight: 400;
}

.nd-ev-field input[type="text"],
.nd-ev-field input[type="email"],
.nd-ev-field input[type="tel"],
.nd-ev-field textarea {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid #dddddd;
	border-radius: 0;
	background: #fbfbfb;
	padding: 12px 14px;
	font-family: 'Open Sans', 'Arial', sans-serif;
	font-size: 14px;
	color: var(--nd-ev-text);
	outline: none;
}
.nd-ev-field input:focus,
.nd-ev-field textarea:focus {
	border-color: var(--nd-ev-steel);
	background: #ffffff;
}
.nd-ev-field textarea {
	resize: vertical;
	min-height: 110px;
}

/* radio group */
.nd-ev-field .wpcf7-radio {
	display: flex;
	gap: 10px 28px;
	flex-wrap: wrap;
	padding: 6px 0;
}
.nd-ev-field .wpcf7-radio .wpcf7-list-item {
	margin: 0;
}
.nd-ev-field .wpcf7-radio label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 400;
	color: var(--nd-ev-body);
	cursor: pointer;
}
.nd-ev-field .wpcf7-radio input[type="radio"] {
	margin: 0;
	accent-color: var(--nd-ev-steel);
}

/* consent checkboxes (privacy + media) */
.nd-ev-consents {
	grid-column: 1 / -1;
	margin-top: 6px;
	border-top: 1px solid #ececec;
	padding-top: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.nd-ev-consents .wpcf7-form-control-wrap {
	display: block;
}
.nd-ev-consents .wpcf7-list-item {
	margin: 0;
}
.nd-ev-consents label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--nd-ev-body);
	cursor: pointer;
}
.nd-ev-consents input[type="checkbox"] {
	margin: 2px 0 0;
	flex-shrink: 0;
	accent-color: var(--nd-ev-steel);
}

/* errors + response */
.nd-ev-regbox .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--nd-ev-red);
}
.nd-ev-regbox .wpcf7 form .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 1.6;
}

/* submit row */
.nd-ev-form-actions {
	margin-top: 24px;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}
.nd-ev-form-actions input[type="submit"] {
	background: var(--nd-ev-steel);
	color: #ffffff;
	font-family: 'Open Sans', 'Arial', sans-serif;
	font-size: 14px;
	line-height: 1;
	padding: 14px 32px;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.nd-ev-form-actions input[type="submit"]:hover,
.nd-ev-form-actions input[type="submit"]:focus {
	background: var(--nd-ev-steel-dark);
}
.nd-ev-note {
	font-size: 13px;
	color: #aaaaaa;
}

/* =========================================================================
   Responsive
   ========================================================================= */

/* single: stack the layout (markup order = facts, main, aside) */
@media only screen and (max-width: 980px) {
	.nd-ev-layout {
		display: block;
	}
	.nd-ev-facts {
		margin-bottom: 32px;
	}
	.nd-ev-aside {
		margin-top: 32px;
	}
	.nd-ev-single {
		padding-top: 36px;
	}
}

/* archive cards: allow the button to wrap under the text */
@media only screen and (max-width: 980px) {
	.nd-ev-card-body {
		flex-wrap: wrap;
	}
	.nd-ev-archive {
		padding: 36px 0 56px;
	}
}

/* mobile cards + form (design 1c/1d) */
@media only screen and (max-width: 640px) {
	.nd-ev-card {
		display: block;
	}
	.nd-ev-card-date {
		width: auto;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		gap: 6px;
		padding: 12px 16px;
		text-align: left;
	}
	.nd-ev-card-day {
		font-size: 26px;
		margin-right: 8px;
	}
	.nd-ev-card-year {
		font-size: 13px;
		font-weight: 600;
		letter-spacing: 1px;
		opacity: 1;
	}
	.nd-ev-card-body {
		display: block;
		padding: 18px 16px;
	}
	.nd-ev-card-title {
		font-size: 16px;
	}
	.nd-ev-card-meta {
		flex-direction: column;
		gap: 2px;
	}
	a.nd-ev-btn.nd-ev-card-btn {
		display: block;
		text-align: center;
		margin-top: 14px;
		white-space: normal;
	}

	.nd-ev-cta-inner {
		flex-direction: column;
		gap: 18px;
		text-align: center;
	}
	.nd-ev-cta-text {
		font-size: 20px;
	}

	.nd-ev-regbox {
		padding: 22px 18px;
	}
	.nd-ev-form-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	/* participation stacks on mobile (design 1d); certificate Jah/Ei stays inline */
	.nd-ev-field--viis .wpcf7-radio {
		flex-direction: column;
		gap: 8px;
	}
	.nd-ev-form-actions input[type="submit"] {
		width: 100%;
	}
	.nd-ev-facts,
	.nd-ev-contactbox {
		padding: 20px;
	}
}
