/* Request styles that must load on every page (header menu button, forms, search bar).
   Moved from the child theme; the theme colours are used where they exist, with fallbacks. */
body .hp-request__action--message {display: block;font-size: 16px;font-weight: 600;color: var(--navy, #0d3b66);margin-bottom: 6px;text-transform: uppercase;letter-spacing: 0.06em;}
button.hp-menu__item.hp-menu__item--request-submit.button.button--secondary::before {
    content: "\f067";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    font-size: 16px;
    margin-right: 7.5px;
    position: relative;
    opacity: 1;
	margin-top:2px;
	background-color: transparent;
}
@media only screen and (max-width: 47.99em) {
button.hp-menu__item.hp-menu__item--request-submit.button.button--secondary::before {
    	margin-right: 0;
	}
}
body .hp-requests__messages .hp-form__message {background-color: var(--cream, #fdfbf7);}
.hp-form--request-search {
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 3px;
    box-shadow: 0 2px 4px 0 rgba(7, 36, 86, 0.075);
    background-color: var(--white, #fff);
    padding: 0.625rem;
    align-items: center;
}
.hp-form.hp-form--request-search input[type='search'].hp-field,
.hp-form.hp-form--request-search input[aria-label="Search"].hp-field {
	    height: 3rem;
    width: 100%;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    color: var(--text, #1a1a1a);
    padding: 12px 14px;
    outline: none;
    background: var(--white, #fff);
	border:0;
}
.hp-form.hp-form--request-search .select2-container--default .select2-selection--single {
	border: 0;
}
.hp-form--request-submit .select2-container--default .select2-selection--single {	border: 1.5px solid var(--border, #e2e8f0);}
.hp-form--request-submit .select2-container--default .select2-selection--single,
.hp-form.hp-form--request-search .select2-container--default .select2-selection--single {
    height: 3rem !important;
    width: 100%;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    color: var(--text, #1a1a1a);
    padding: 0;
    outline: none;
    box-sizing: border-box;
}
.hp-form--request-submit .select2-container--default .select2-selection--single .select2-selection__rendered,
.hp-form.hp-form--request-search .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(3rem - 15px);
    color: var(--text, #1a1a1a);
    padding: 7px 32px 8px 12px;
    display: flex;
    align-items: center;
}
.hp-form--request-submit .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 3rem;
    right: 10px;
	top: 0 !important;
}
/* Add Request and Edit Request: 3-column grid.
   - Images always starts in the first column and takes two columns and
     two rows, so the two fields after it (Budget and Deadline) stack in
     the third column beside it.
   - Long fields (Description, checkboxes) span the full width.
   !important: other stylesheets lay these forms out as a wrapping flex
   row, which would otherwise win. */
body form.hp-form--request-submit .hp-form__fields,
body form.hp-form--request-update .hp-form__fields {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	grid-auto-flow: row !important;
	column-gap: 24px;
	align-items: start;
	justify-content: stretch !important;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field,
body form.hp-form--request-update .hp-form__fields > .hp-form__field {
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	flex: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	float: none !important;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field--attachment-upload,
body form.hp-form--request-update .hp-form__fields > .hp-form__field--attachment-upload {
	grid-column: 1 / span 2 !important;
	grid-row: span 2 !important;
}

/* Order: the required fields first, then Images, then everything else.
     Row 1: Category, Title, Name of Requestor
     Row 2: Location
     Then:  Images (two columns) with Budget and Deadline beside it
     Then:  the category's other fields, in their usual order
     Last:  Description, then any checkbox (e.g. the terms box). */
body form.hp-form--request-submit .hp-form__fields > .hp-form__field,
body form.hp-form--request-update .hp-form__fields > .hp-form__field {
	order: 20;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name^="categories"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name^="categories"]) {
	order: 1;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name="name"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name="name"]) {
	order: 2;
}

/* Name of Requestor only (not Title / Phone of Requestor): the field
   name has both "requestor" and "name", e.g. name_of_requestor. */
body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name*="requestor"][name*="name"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name*="requestor"][name*="name"]) {
	order: 3;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name^="location"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name^="location"]) {
	order: 4;
	grid-column: 1 !important;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field--attachment-upload,
body form.hp-form--request-update .hp-form__fields > .hp-form__field--attachment-upload {
	order: 10;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name="budget"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name="budget"]) {
	order: 11;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name="deadline"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name="deadline"]) {
	order: 12;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has(textarea),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has(textarea) {
	order: 30;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field--checkbox,
body form.hp-form--request-update .hp-form__fields > .hp-form__field--checkbox {
	order: 31;
}

/* Budget and Deadline: third column, beside Images. */
body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name="budget"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name="budget"]),
body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name="deadline"]),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name="deadline"]) {
	grid-column: 3 !important;
}

body form.hp-form--request-submit .hp-form__fields > .hp-form__field--checkbox,
body form.hp-form--request-update .hp-form__fields > .hp-form__field--checkbox,
body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has(textarea),
body form.hp-form--request-update .hp-form__fields > .hp-form__field:has(textarea) {
	grid-column: 1 / -1 !important;
}

@media only screen and (max-width: 47.99em) {
	body form.hp-form--request-submit .hp-form__fields,
	body form.hp-form--request-update .hp-form__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	/* Images full width; Budget and Deadline side by side below it. */
	body form.hp-form--request-submit .hp-form__fields > .hp-form__field--attachment-upload,
	body form.hp-form--request-update .hp-form__fields > .hp-form__field--attachment-upload {
		grid-column: 1 / -1 !important;
		grid-row: auto !important;
	}

	body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name="budget"]),
	body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name="budget"]),
	body form.hp-form--request-submit .hp-form__fields > .hp-form__field:has([name="deadline"]),
	body form.hp-form--request-update .hp-form__fields > .hp-form__field:has([name="deadline"]) {
		grid-column: auto !important;
	}
}

@media only screen and (max-width: 576px) {
	body form.hp-form--request-submit .hp-form__fields,
	body form.hp-form--request-update .hp-form__fields {
		grid-template-columns: minmax(0, 1fr) !important;
	}

	body form.hp-form--request-submit .hp-form__fields > .hp-form__field,
	body form.hp-form--request-update .hp-form__fields > .hp-form__field {
		grid-column: 1 / -1 !important;
		grid-row: auto !important;
	}
}

@media only screen and (max-width: 47.99em) {
.hp-form--request-search {
        align-items: stretch;
    }
.hp-form--request-search .hp-form__field:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid rgba(7, 36, 86, 0.075);
    }
.hp-form--request-search .hp-form__field:not(:last-child),
.hp-form--request-search .hp-form__fields:not(:last-child) {
        margin: 0;
    }
.hp-form--request-search .hp-form__fields:not(:last-child) {
        margin-bottom: 0.625rem;
    }
}
.hp-requests__card-meta {color: var(--text-muted, #5a5a5a);display: grid;}
.hp-requests__founder,
.hp-requests__provider {margin-bottom: 15px;}

/* ==========================================================================
   Request forms: Images field (cover image, bordered tiles, empty slots)
   ========================================================================== */

/* Images and empty slots on one wrapping line; the error message and the
   Select Images button below on their own lines. */
body .hp-field--attachment-upload.hpr-images {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

body .hp-field--attachment-upload.hpr-images > * {
	flex: 0 0 100%;
}

body .hp-field--attachment-upload.hpr-images > [data-component="sortable"],
body .hp-field--attachment-upload.hpr-images > .hpr-images__slots {
	display: flex;
	flex: 0 1 auto;
	flex-wrap: wrap;
	gap: 12px;
	margin: 12px 0 16px;
}

body .hp-field--attachment-upload.hpr-images.hpr-images--has-images > [data-component="sortable"] {
	margin-right: 12px;
}

body .hpr-images [data-component="sortable"] > .hpr-images__tile,
body .hpr-images .hpr-images__slots > .hpr-images__slot {
	position: relative;
	flex: 0 0 120px;
	width: 120px;
	max-width: 120px;
	height: 120px;
	margin: 0;
	padding: 0;
	float: none;
	border-radius: 6px;
	overflow: hidden;
}

body .hpr-images .hpr-images__tile {
	border: 1.5px solid var(--border, #e2e8f0);
	background: var(--white, #fff);
	cursor: move;
}

body .hpr-images .hpr-images__tile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

body .hpr-images .hpr-images__tile--cover {
	border: 2px solid var(--prim, #ff8957);
}

/* "Cover" label: same look as the Founder / Provider labels on member
   cards (grey pill), so it doesn't read as a button. Bottom-left corner. */
body .hp-field--attachment-upload.hpr-images .hpr-images__tile > .hpr-images__badge {
	display: none;
	position: absolute;
	top: auto;
	right: auto;
	left: 6px;
	bottom: 6px;
	z-index: 2;
	margin: 0;
	padding: 2px 10px;
	border-radius: 12px;
	background: #f1f1f1;
	color: var(--text, #1a1a1a);
	font-size: .7em;
	font-weight: 400;
	letter-spacing: .05em;
	line-height: 1.6;
	text-transform: uppercase;
}

body .hp-field--attachment-upload.hpr-images .hpr-images__tile--cover > .hpr-images__badge {
	display: block;
}

/* Image buttons (delete / download) on every upload field. */
body .hp-field--attachment-upload .hp-field__button {
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	top: .5rem;
	right: 6px;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	text-decoration: none;
	color: #fff;
	background-color: rgba(0, 0, 0, .5);
}

/* Star (make cover) button: bottom-left corner of the image, the same
   spot as the "Cover" label on the cover image. */
body .hp-field--attachment-upload.hpr-images .hpr-images__tile > a.hp-field__button--cover {
	top: auto;
	right: auto;
	left: 6px;
	bottom: 6px;
	z-index: 2;
	margin: 0;
	font-size: 12px;
}

body .hp-field--attachment-upload.hpr-images .hpr-images__tile > a.hp-field__button--cover:hover,
body .hp-field--attachment-upload.hpr-images .hpr-images__tile > a.hp-field__button--cover:focus {
	background: var(--prim, #ff8957);
	color: var(--navy, #0d3b66);
}

body .hp-field--attachment-upload.hpr-images .hpr-images__tile--cover > a.hp-field__button--cover {
	display: none;
}

body .hp-field--attachment-upload.hpr-images label.hpr-images__slot-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	border: 2px dashed var(--border, #e2e8f0);
	border-radius: 6px;
	color: var(--text-muted, #5a5a5a);
	font-size: 18px;
	cursor: pointer;
	transition: border-color .2s, color .2s;
}

body .hp-field--attachment-upload.hpr-images label.hpr-images__slot-inner:hover {
	border-color: var(--prim, #ff8957);
	color: var(--prim, #ff8957);
}

/*
 * Request cards: the same behaviour as the Founder, Provider and /members/
 * cards. The whole card above the footer opens the request (the title link
 * is stretched over it), and hovering there turns the title orange. Other
 * links (e.g. a location) and the footer (Send Message) stay on top and keep
 * working on their own.
 */
.hp-requests__card {
	position: relative;
}

.hp-requests__card .hp-listing__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.hp-requests__card .hp-listing__title a:hover {
	color: var(--prim, #ff8957);
}

.hp-requests__card a:not(.hp-listing__title a):not(.hp-listing__image a),
.hp-requests__card .hp-listing__footer {
	position: relative;
	z-index: 2;
}
