/* [csv_download] shortcode
 *
 * The form sits straight on the plum page background, so it is dressed the
 * same way as the contact and GDPR forms in the theme's "Forms on the page
 * background" section - white rounded fields, a gold focus ring, and a white
 * pill submit button that turns gold. 5px corners throughout, the radius the
 * shortcode cards use.
 *
 * Its two groups are held together by a translucent panel rather than the flat
 * grey boxes this form used to have, which read as a different site.
 *
 * Both grids are sized by what fits rather than by breakpoint, so the three
 * filters and the seventeen column checkboxes reflow on their own and adding a
 * column to the export never means touching the layout.
 */
.dcw-csv-panel {
	margin-bottom: 30px;
	padding: 22px 24px;
	border-radius: 8px;
	background-color: rgba(0, 0, 0, .11);
}

.dcw-csv-panel-title,
.dcw-csv-form label {
	display: block;
	color: #fff;
	font-size: 18px;
	font-size: 1.8rem;
	font-weight: 600;
	line-height: 1.3;
}

/* Carried by the wording that is genuinely optional, so the three filters do
 * not all shout equally loudly */
.dcw-csv-optional {
	font-weight: 400;
	opacity: .75;
}

/* ## The three filters
--------------------------------------------- */

.dcw-csv-filters {
	display: grid;
	/* min() so the track can go under its own minimum on a narrow phone rather
	 * than push the page sideways */
	grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
	gap: 20px;
}

.dcw-csv-field label {
	margin-bottom: 8px;
}

.dcw-csv-form select {
	width: 100%;
	padding: 14px 16px;
	border: 2px solid transparent;
	border-radius: 8px;
	background-color: #fff;
	color: #333;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 18px;
	font-size: 1.8rem;
	font-weight: 400;
	line-height: 1.4;
}

/* A gold ring rather than the theme's grey border, which is invisible against
 * a white field on a coloured background */
.dcw-csv-form select:focus {
	border-color: #f2d492;
	outline: none;
}

/* ## The column checkboxes
--------------------------------------------- */

.dcw-csv-panel-title {
	margin-bottom: 14px;
}

.dcw-csv-form ul.dcw-csv-column-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
	gap: 2px 20px;
	margin: 0;
}

.dcw-csv-form ul.dcw-csv-column-list > li {
	margin-bottom: 0;
	list-style-type: none;
}

/* The wording is inside the label, so the tick box and its name are one target
 * - the reason the list is a stack of labels rather than of plain text */
.dcw-csv-form ul.dcw-csv-column-list label {
	display: flex;
	align-items: center;
	padding: 5px 0;
	font-size: 17px;
	font-size: 1.7rem;
	font-weight: 400;
	cursor: pointer;
}

.dcw-csv-form ul.dcw-csv-column-list input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0 10px 0 0;
	accent-color: #522c3e;
	cursor: pointer;
}

/* ## Download
--------------------------------------------- */

/* The page content button - see .dcw-button in the theme */
.dcw-csv-form input[type="submit"] {
	width: auto;
	padding: 15px 34px;
	border: 3px solid #fff;
	border-radius: 8px;
	background-color: rgba(255, 255, 255, .14);
	color: #fff;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 18px;
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.dcw-csv-form input[type="submit"]:hover,
.dcw-csv-form input[type="submit"]:focus {
	background-color: rgba(255, 255, 255, .28);
	color: #fff;
}

/* Phone - the panels give back the page's own side padding, which is all the
 * room a single column of checkboxes has to spare */
@media only screen and (max-width: 460px) {

	.dcw-csv-panel {
		padding: 18px 16px;
	}

}
