/* ----------------------------------------------------------------
	Member area (/leden): navigation, forms and pages in the colours of the Barning logo.
	Everything is scoped to body.members-area, so the public site keeps its own style.
-----------------------------------------------------------------*/

.members-area {
	--barning-pink: #ff5b8f;
	--barning-orange: #ff985b;
	--barning-yellow: #ffd45b;
	/* Deeper tones behind white text, for contrast. */
	--barning-pink-deep: #e6336e;
	--barning-orange-deep: #f2742b;
	--barning-gradient-deep: linear-gradient(135deg, var(--barning-pink-deep) 0%, var(--barning-orange-deep) 100%);
	--barning-tint: linear-gradient(135deg, rgba(255, 91, 143, 0.09) 0%, rgba(255, 173, 91, 0.09) 100%);
	--barning-ink: #2f2a33;
}

.members-area #content h2,
.members-area #content h3 {
	color: var(--barning-ink);
}

.members-area #content a:not(.button):not(.list-group-item):not(.btn) {
	color: var(--barning-pink-deep);
}

/* Navigation */
.members-area .sidebar .list-group {
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(47, 42, 51, 0.08);
}

.members-area .sidebar .list-group-item {
	position: relative;
	padding: 15px 20px;
	border: 0;
	border-bottom: 1px solid #f1eef0;
	color: var(--barning-ink);
	font-weight: 500;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.members-area .sidebar .list-group-item:last-child {
	border-bottom: 0;
}

.members-area .sidebar .list-group-item i {
	color: var(--barning-orange);
	transition: color 0.15s ease;
}

.members-area .sidebar .list-group-item:hover,
.members-area .sidebar .list-group-item:focus-visible {
	background: var(--barning-tint), #fff;
	color: var(--barning-pink-deep);
}

.members-area .sidebar .list-group-item.active,
.members-area .sidebar .list-group-item.active:hover {
	background: var(--barning-gradient-deep);
	color: #fff;
	font-weight: 700;
}

.members-area .sidebar .list-group-item.active i {
	color: #fff;
}

/* Cards and tables */
.members-area #content .card {
	border: 0;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(47, 42, 51, 0.08);
}

.members-area #content .card-header,
.members-area #content .card-header.bg-primary {
	background: #fff !important;
	border-bottom: 1px solid #f1eef0;
	padding: 16px 20px;
	color: var(--barning-ink);
	font-size: 17px;
	font-weight: 700;
}

.members-area #content .card-header .text-white {
	color: var(--barning-ink) !important;
}

/* Rows only: no boxes around the cells. */
.members-area #content .table > :not(:first-child) {
	border-top: 0;
}

/* Bootstrap also draws lines on the rows of a bordered table. */
.members-area #content .table > :not(caption) > * {
	border-width: 0;
}

.members-area #content .table,
.members-area #content .table > :not(caption) > * > * {
	border-left: 0;
	border-right: 0;
	border-top: 0;
}

.members-area #content .table > :not(caption) > * > * {
	padding: 14px 12px;
	border-bottom: 1px solid #f1eef0;
	text-align: left;
	vertical-align: middle;
}

.members-area #content .table > tbody > tr:last-child > * {
	border-bottom: 0;
}

.members-area #content .table thead th {
	border-bottom: 1px solid #e4dfe2;
	color: #8a8088;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.members-area #content .table td:last-child,
.members-area #content .table th:last-child {
	text-align: right;
}

/* A message in a table cell stays inside the cell. */
.members-area #content .table .style-msg {
	margin: 0;
	text-align: left;
	white-space: normal;
}

.members-area #content .table td:first-child {
	font-weight: 600;
}

/* Striped rows clash with the row lines and the hover colour. */
.members-area #content .table-striped > tbody > tr:nth-of-type(odd) {
	--bs-table-accent-bg: transparent;
}

.members-area #content .table tbody tr:hover {
	background: var(--barning-tint);
}

/* Form fields */
.members-area #content label {
	color: var(--barning-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

.members-area #content .form-check-label {
	margin-left: 8px;
	font-weight: 400;
}

.members-area #content .form-control,
.members-area #content .form-select {
	border: 2px solid #ebe7ea;
	border-radius: 10px;
	padding: 10px 14px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.members-area #content .form-control:focus,
.members-area #content .form-select:focus {
	border-color: var(--barning-pink);
	box-shadow: 0 0 0 4px rgba(255, 91, 143, 0.15);
}

.members-area #content .form-control:disabled,
.members-area #content .form-select:disabled {
	background-color: #faf8f9;
	border-style: dashed;
}

/* Check boxes become switches */
.members-area #content input[type='checkbox'] {
	appearance: none;
	-webkit-appearance: none;
	vertical-align: middle;
	margin-right: 6px;
}

.members-area #content input[type='checkbox'] {
	width: 2.6em;
	height: 1.4em;
	border: 0;
	border-radius: 2em;
	background-color: #d9d3d7;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: left center;
	transition: background-position 0.15s ease, background-color 0.15s ease;
	cursor: pointer;
}

.members-area #content input[type='checkbox']:checked {
	background-color: var(--barning-pink-deep);
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"), var(--barning-gradient-deep);
	background-position: right center, center;
	background-size: contain, cover;
}

.members-area #content input[type='checkbox']:focus-visible {
	box-shadow: 0 0 0 4px rgba(255, 91, 143, 0.25);
}

/* Choice toggles: one answer from a short list, see templates/form/barning_theme.html.twig */
.barning-toggle {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 6px;
}

.barning-toggle__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.barning-toggle__option {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 10px 22px;
	border: 2px solid #ebe7ea;
	border-radius: 999px;
	background: #fff;
	color: #2f2a33;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.barning-toggle__option:hover {
	border-color: #ff5b8f;
	background: linear-gradient(135deg, rgba(255, 91, 143, 0.09) 0%, rgba(255, 173, 91, 0.09) 100%), #fff;
}

/* The #content selector outranks the label colour of the member area. */
.barning-toggle__input:checked + .barning-toggle__option,
.members-area #content .barning-toggle__input:checked + .barning-toggle__option {
	border-color: transparent;
	background: linear-gradient(135deg, #e6336e 0%, #f2742b 100%);
	color: #fff;
	box-shadow: 0 6px 16px rgba(230, 51, 110, 0.28);
}

.barning-toggle__input:focus-visible + .barning-toggle__option {
	outline: 3px solid rgba(255, 91, 143, 0.45);
	outline-offset: 2px;
}

.barning-toggle__option:active {
	transform: scale(0.97);
}

.members-area #content .barning-question {
	margin-bottom: 26px;
}

.members-area #content .barning-question > legend,
.members-area #content .barning-question > label {
	float: none;
	margin-bottom: 4px;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

/* Buttons */
.members-area #content .button.button-green,
.members-area #content .button.button-green:hover {
	background: var(--barning-gradient-deep) !important;
	border-color: transparent !important;
	border-radius: 999px;
	color: #fff !important;
	box-shadow: 0 6px 16px rgba(230, 51, 110, 0.25);
	text-shadow: none;
}

.members-area #content .button.button-green:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

/* Every other button is a quiet secondary button. */
.members-area #content .button.button-blue,
.members-area #content .button.button-red,
.members-area #content .button.button-blue:hover,
.members-area #content .button.button-red:hover {
	background: #fff !important;
	border: 2px solid #ebe7ea !important;
	border-radius: 999px;
	color: var(--barning-ink) !important;
	box-shadow: none;
	text-shadow: none;
}

.members-area #content .button.button-blue:hover,
.members-area #content .button.button-red:hover {
	border-color: var(--barning-pink) !important;
	color: var(--barning-pink-deep) !important;
}

.members-area #content .button.button-pink,
.members-area #content .button.button-pink:hover {
	background: #f4f1f3 !important;
	border-color: transparent !important;
	border-radius: 999px;
	color: #8a8088 !important;
	box-shadow: none;
	text-shadow: none;
	cursor: default;
}

/* Messages */
.members-area #content .style-msg {
	border-left: 0;
	border-radius: 12px;
	overflow: hidden;
}

/* Small screens: the navigation sits above the page, and a table row becomes a card. */
@media (max-width: 767.98px) {
	.members-area .sidebar {
		margin-bottom: 28px;
	}

	.members-area #content .table thead {
		display: none;
	}

	.members-area #content .table,
	.members-area #content .table tbody,
	.members-area #content .table tr,
	.members-area #content .table td {
		display: block;
		width: 100%;
	}

	.members-area #content .table > tbody > tr {
		padding: 14px 0;
		border-bottom: 1px solid #f1eef0;
	}

	.members-area #content .table > tbody > tr:last-child {
		border-bottom: 0;
	}

	.members-area #content .table > tbody > tr > td {
		padding: 4px 4px;
		border-bottom: 0;
		text-align: left;
	}

	.members-area #content .table td:last-child {
		padding-top: 10px;
		text-align: left;
	}

	.barning-toggle__option {
		padding: 10px 18px;
	}
}
