/*!
 * Jaloin !dean Talkoot-plugin
 * Frontend-tyylit tapahtumanäkymälle ja ilmoittautumisille
 */
 
 
 /* =========================================================
   TAPAHTUMAHAKU
   ========================================================= */

.talkoot-event-search {
	margin-bottom: 1.5rem;
}

.talkoot-event-search__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.talkoot-event-search input[type="text"] {
	flex: 1 1 280px;
	min-width: 0;
}

.talkoot-event-search__reset {
	text-decoration: none;
}

@media (max-width: 768px) {
	.talkoot-event-search__fields {
		align-items: stretch;
	}

	.talkoot-event-search input[type="text"],
	.talkoot-event-search button,
	.talkoot-event-search__reset {
		width: 100%;
	}
}
 
/* =========================================================
   TAPAHTUMALISTA
   ========================================================= */

.talkoot-event-list__items {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.talkoot-event-card {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr);
	gap: 1rem;
	align-items: stretch;
	padding: 1rem;
	border: 1px solid #ddd;
	background: #fff;
}

.talkoot-event-card__image {
	display: block;
	width: 150px;
	max-width: 100%;
	text-decoration: none;
}

.talkoot-event-card__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: center;
}

.talkoot-event-card__content {
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.talkoot-event-card__datetime {
	margin: 0 0 0.2em !important;
	font-size: 1rem;
	line-height: 1.4;
}

.talkoot-event-card__title {
	margin: 0 !important;
	font-size: 1.1rem;
	line-height: 1.2;
	font-weight: 500 !important
}

.talkoot-event-card__title a {
	color: inherit;
	text-decoration: none;
}

.talkoot-event-card__title a:hover,
.talkoot-event-card__title a:focus {
	text-decoration: underline;
}


@media (max-width: 768px) {
	.talkoot-event-list__items {
		grid-template-columns: 1fr;
	}
	.talkoot-event-card {
	grid-template-columns: 80px minmax(0, 1fr);
	}
}

/*
	.talkoot-event-card__image {
		width: 100%;
	}

	.talkoot-event-card__image img {
		width: 100%;
	}
}*/

/* =========================================================
   SINGLE
   ========================================================= */

.talkoot-single-event {
	max-width: 1100px;
}

.talkoot-single-event *,
.talkoot-single-event *::before,
.talkoot-single-event *::after {
	box-sizing: border-box;
}


.talkoot-single-event__backlink {
	margin-bottom: 1rem;
}

.talkoot-message {
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid #d0d0d0;
	background: #f7f7f7;
}

.talkoot-card-title {
	margin: 0 0 0.85rem;
	font-size: 1rem;
	line-height: 1.25;
}


.talkoot-single-event__header {
	max-width: 700px;
	display: grid;
	grid-template-columns: 1.25fr 0.75fr;
	grid-template-areas:
		"info image"
		"presence contact";
	gap: 1.25rem 1.3rem;
	align-items: stretch;
	margin-bottom: 1rem;
}

.talkoot-single-event__info-card,
.talkoot-single-event__image,
.talkoot-presence-card,
.talkoot-contact-card {
	min-width: 0;
}

/* Ylärivin vasen */
.talkoot-single-event__info-card {
	grid-area: info;
	padding: 1.5rem 1.5rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-height: 80px;
}

.talkoot-single-event__title {
	margin: 0 0 1rem;
	line-height: 1.1;
}

.talkoot-single-event__time {
	margin: 0;
	line-height: 1.4;
	font-size: 1.2rem;
	font-weight: 600;
}

/* Ylärivin oikea */
.talkoot-single-event__image {
	grid-area: image;
	margin: 0 !important;
	align-self: stretch;
}

.talkoot-single-event__image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 80px;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	object-position: center;
	background: #fff;
}

/* Alarivin vasen */
.talkoot-presence-card {
	grid-area: presence;
	padding: 1.25rem 1.5rem;
	background: var(--global-palette1);
	color: #fff !important;
	min-height: 150px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}
.talkoot-presence-card h3{
	color: #fff !important;
}

.talkoot-presence-card p {
	margin: 0 !important;
	line-height: 1.45;
}

.talkoot-presence-card p + p {
	margin-top: 0.2rem !important;
}

/* Alarivin oikea */
.talkoot-contact-card {
	grid-area: contact;
	padding: 1.25rem 1.5rem;
	background: var(--global-palette8);
	min-height: 150px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

.talkoot-contact-card__content > * {
	margin-top: 0;
	margin-bottom: 0;
	line-height: 1.45;
}

.talkoot-contact-card__content > * + * {
	margin-top: 0.35rem;
}

/* =========================================================
   TEHTÄVÄT
   Desktopissa kortit näkyvät taulukkona.
   Mobiilissa kortit toimivat haitareina.
   ========================================================= */

.talkoot-single-event__tasks {
	margin-top: 2rem;
}

.talkoot-single-event__tasks h3 {
	margin-bottom: 1rem;
}

.talkoot-signup-form__actions {
	margin-top: 1rem !important;
}

.talkoot-task-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	align-items: start;
}

.talkoot-task-card {
	margin: 0;
	min-width: 0;
	border: 1px solid #ddd;
	background: #fff;
	overflow: hidden;
}

.talkoot-task-card__summary {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.75rem 1rem;
	align-items: start;
	padding: 1rem;
	list-style: none;
	border-bottom: 1px solid #ddd;
	cursor: default;
}

.talkoot-task-card__summary::-webkit-details-marker {
	display: none;
}

.talkoot-task-card__title {
	display: block;
	min-width: 0;
	font-weight: 700;
	line-height: 1.35;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.talkoot-task-card__meta {
	display: block;
	font-size: 0.95rem;
	line-height: 1.35;
	text-align: right;
	white-space: nowrap;
}

.talkoot-task-card__body {
	display: block;
	padding: 1rem;
	min-width: 0;
}

.talkoot-task-card__slots {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
}

.talkoot-slot {
	min-width: 0;
}

.talkoot-slot__label {
	display: grid;
	grid-template-columns: 3.75rem minmax(0, 1fr);
	gap: 0.5rem;
	align-items: center;
	margin: 0;
	min-width: 0;
}

.talkoot-slot__name {
	font-size: 0.95rem;
	line-height: 1.2;
}

.talkoot-slot input {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.talkoot-slot input:disabled {
	background: #efefef;
	color: #666;
	font-weight: 700;
	cursor: not-allowed;
	opacity: 1;
}

.talkoot-slot__input.is-own {
	font-weight: 600;
	border-color: var(--global-palette7);
	background: var(--global-palette8);
}

.talkoot-slot__you {
	display: inline-block;
	margin-left: 0.5rem;
	font-size: 0.85rem;
	color: var(--accent-main, #F37920);
	font-weight: 600;
}

/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 769px) {
	.talkoot-task-card__summary {
		pointer-events: none;
	}

	.talkoot-task-card__body {
		display: block;
	}
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {
	.talkoot-single-event__header {
		grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.9fr);
		gap: 1rem 1.25rem;
	}

	.talkoot-single-event__info-card {
		padding: 1.25rem 1.5rem;
		min-height: 160px;
	}

	.talkoot-single-event__image img {
		min-height: 160px;
	}

	.talkoot-presence-card,
	.talkoot-contact-card {
		padding: 1rem 1.25rem;
		min-height: 140px;
	}

	.talkoot-task-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {
	.talkoot-single-event__header {
		grid-template-columns: 1fr;
		grid-template-areas:
			"image"
			"info"
			"presence"
			"contact";
		gap: 1rem;
	}



	.talkoot-single-event__info-card,
	.talkoot-presence-card,
	.talkoot-contact-card {
		min-height: 0;
		padding: 1rem 1.125rem;
	}

	.talkoot-task-grid {
		grid-template-columns: 1fr;
	}

	.talkoot-task-card__summary {
		grid-template-columns: minmax(0, 1fr) auto;
		cursor: pointer;
		border-bottom: 0;
	}

	.talkoot-task-card[open] .talkoot-task-card__summary {
		border-bottom: 1px solid #ddd;
	}

	.talkoot-task-card__meta {
		white-space: normal;
		text-align: right;
	}

	.talkoot-task-card:not([open]) .talkoot-task-card__body {
		display: none;
	}

	.talkoot-task-card[open] .talkoot-task-card__body {
		display: block;
	}

	.talkoot-slot__label {
		grid-template-columns: 1fr;
		gap: 0.35rem;
		align-items: start;
	}
	

}

/* =========================================================
   OMA TILI
   ========================================================= */

.talkoot-account {
	max-width: 640px;
}

.talkoot-account-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.talkoot-account-form__row {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.talkoot-account-form__row input {
	width: 100%;
	max-width: 100%;
}

.talkoot-account-form__note {
	margin: 0;
	font-size: 0.95rem;
	opacity: 0.8;
}

.talkoot-account-form__actions {
	margin: 0.5rem 0 0;
}

/* =========================================================
   OMA TILI
   ========================================================= */

.talkoot-account {
	max-width: 640px;
}

.talkoot-account-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.talkoot-account-form__row {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.talkoot-account-form__row input {
	width: 100%;
	max-width: 100%;
}

.talkoot-account-form__hint {
	font-size: 0.9em;
	font-weight: 400;
	opacity: 0.75;
}

.talkoot-account-form__readonly,
.talkoot-account-form__readonly[disabled],
.talkoot-account-form input[disabled] {
	background: #f3f4f6;
	color: #6b7280;
	border-color: #d1d5db;
	cursor: not-allowed;
	opacity: 1;
	box-shadow: none;
}

.talkoot-account-form__readonly:focus,
.talkoot-account-form__readonly[disabled]:focus,
.talkoot-account-form input[disabled]:focus {
	outline: none;
	box-shadow: none;
}

.talkoot-account-form__note {
	margin: 0;
	font-size: 0.95rem;
	opacity: 0.8;
}

.talkoot-account-form__actions {
	margin: 0.5rem 0 0;
}