/* ==========================================================================
   Tutor single-booking form
   ========================================================================== */

/*
 * WordPress positions the admin footer at the bottom of #wpwrap.
 * Give the Booking Hub enough document-flow clearance so longer forms
 * cannot run underneath it.
 */
.toplevel_page_tutorhelper #wpbody-content {
	box-sizing: border-box;
	padding-bottom: 100px;
}

.toplevel_page_tutorhelper .tutorhelper-booking-hub {
	margin-bottom: 40px;
}


.tutorhelper-tutor-booking {
	overflow: visible;
	background: #fff;
	border: 1px solid rgba(19, 57, 73, 0.16);
	box-shadow: var(--tutorhelper-soft-shadow);
}

.tutorhelper-tutor-booking__header {
	padding: 22px 24px;
	background: var(--tutorhelper-dark);
	color: #fff;
    border-radius: 17px 17px 0 0;
}

.tutorhelper-tutor-booking__header h2 {
	margin: 0 0 6px;
	color: #fff;
}

.tutorhelper-tutor-booking__header p {
	max-width: 760px;
	margin: 0;
	color: rgba(255, 255, 255, 0.84);
}

.tutorhelper-tutor-booking__form {
	padding: 24px;
}

.tutorhelper-tutor-booking__form {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 24px;
}

.tutorhelper-tutor-booking-section {
	overflow: visible;
	background: #fff;
	border: 1px solid rgba(19, 57, 73, 0.15);
	border-radius: 14px;
}

.tutorhelper-tutor-booking-section__header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 17px 20px;
	background: #f6f8f9;
	border-bottom: 1px solid rgba(19, 57, 73, 0.12);
	border-radius: 13px 13px 0 0;
}

.tutorhelper-tutor-booking-section__number {
	display: inline-flex;
	flex: 0 0 30px;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	color: #fff;
	font-weight: 700;
	background: var(--tutorhelper-dark);
	border-radius: 50%;
}

.tutorhelper-tutor-booking-section__header h3 {
	margin: 0 0 3px;
	color: var(--tutorhelper-dark);
	font-size: 15px;
	line-height: 1.3;
}

.tutorhelper-tutor-booking-section__header p {
	margin: 0;
	color: #55717c;
	font-size: 13px;
	line-height: 1.5;
}

.tutorhelper-tutor-booking-section__body {
	padding: 20px;
}

.tutorhelper-tutor-booking-section.is-summary {
	border-color: rgba(255, 99, 38, 0.32);
}

.tutorhelper-tutor-booking-section.is-summary
.tutorhelper-tutor-booking-section__number {
	background: var(
		--tutorhelper-orange,
		#ff6326
	);
}

.tutorhelper-tutor-booking__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px 24px;
}

.tutorhelper-tutor-booking__field {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
}

.tutorhelper-tutor-booking__field.is-wide {
	grid-column: 1 / -1;
}

.tutorhelper-tutor-booking__field.is-half {
	grid-column: span 2;
}

.tutorhelper-tutor-booking__field.is-quarter {
	grid-column: span 1;
}

.tutorhelper-tutor-booking__field > label {
	color: var(--tutorhelper-dark);
	font-weight: 700;
}

.tutorhelper-tutor-booking__field input,
.tutorhelper-tutor-booking__field select,
.tutorhelper-tutor-booking__field textarea {
	width: 100%;
	max-width: none;
}

.tutorhelper-tutor-booking__field textarea {
	resize: vertical;
}

.tutorhelper-tutor-booking__field .description {
	margin: 0;
	color: #55717c;
	font-size: 12px;
	line-height: 1.5;
}

.tutorhelper-tutor-booking__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 20px 22px;
	background: #f6f8f9;
	border: 1px solid rgba(19, 57, 73, 0.15);
	border-radius: 14px;
}

.tutorhelper-tutor-booking__actions-copy {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.tutorhelper-tutor-booking__actions-copy strong {
	color: var(--tutorhelper-dark);
}

.tutorhelper-tutor-booking__actions-copy span {
	color: #55717c;
	font-size: 13px;
}

.tutorhelper-tutor-booking__actions .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	flex: 0 0 auto;
}


/* ==========================================================================
   Tutor booking student search
   ========================================================================== */

.tutorhelper-booking-student-search {
	position: relative;
}

.tutorhelper-booking-student-search__input-wrap {
	position: relative;
}

.tutorhelper-booking-student-search__input {
	padding-right: 42px;
}

.tutorhelper-booking-student-search__spinner {
	position: absolute;
	top: 50%;
	right: 10px;
	margin: -10px 0 0;
}

.tutorhelper-booking-student-search__spinner.is-active {
	visibility: visible;
}

.tutorhelper-booking-student-search__results {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	max-height: 280px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid rgba(19, 57, 73, 0.2);
	border-radius: 10px;
	box-shadow: 0 12px 28px rgba(19, 57, 73, 0.18);
}

.tutorhelper-booking-student-search__result {
	display: flex;
	flex-direction: column;
	gap: 3px;
	width: 100%;
	padding: 12px 14px;
	text-align: left;
	background: transparent;
	border: 0;
	border-bottom: 1px solid rgba(19, 57, 73, 0.1);
	cursor: pointer;
}

.tutorhelper-booking-student-search__result:last-child {
	border-bottom: 0;
}

.tutorhelper-booking-student-search__result:hover,
.tutorhelper-booking-student-search__result:focus {
	background: rgba(50, 139, 184, 0.1);
	outline: 2px solid transparent;
}

.tutorhelper-booking-student-search__result strong {
	color: var(--tutorhelper-dark);
}

.tutorhelper-booking-student-search__result span,
.tutorhelper-booking-student-search__result small {
	color: #55717c;
}

.tutorhelper-booking-student-search__status {
	min-height: 18px;
	margin: 6px 0 0;
	color: #55717c;
	font-size: 12px;
}

.tutorhelper-booking-student-search__status.is-error {
	color: #b32d2e;
}

.tutorhelper-booking-student-search__selection {
	margin-top: 10px;
}

.tutorhelper-booking-student-search__empty {
	margin: 0;
	padding: 12px 14px;
	background: #f6f8f9;
	border: 1px dashed rgba(19, 57, 73, 0.2);
	border-radius: 9px;
	color: #55717c;
}

.tutorhelper-booking-student-search__selected {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 12px 14px;
	background: rgba(50, 139, 184, 0.08);
	border: 1px solid rgba(50, 139, 184, 0.24);
	border-radius: 9px;
}

.tutorhelper-booking-student-search__selected > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tutorhelper-booking-student-search__selected strong,
.tutorhelper-booking-student-search__selected span,
.tutorhelper-booking-student-search__selected small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tutorhelper-booking-student-search__selected span,
.tutorhelper-booking-student-search__selected small {
	color: #55717c;
}


@media screen and (max-width: 1100px) {
	.tutorhelper-tutor-booking__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tutorhelper-tutor-booking__field.is-quarter,
	.tutorhelper-tutor-booking__field.is-half {
		grid-column: span 1;
	}
}

@media screen and (max-width: 782px) {
	.toplevel_page_tutorhelper #wpbody-content {
		padding-bottom: 120px;
	}

	.tutorhelper-tutor-booking__form {
		gap: 18px;
		padding: 16px;
	}

	.tutorhelper-tutor-booking-section__header {
		padding: 15px 16px;
	}

	.tutorhelper-tutor-booking-section__body {
		padding: 16px;
	}

	.tutorhelper-tutor-booking__grid {
		grid-template-columns: 1fr;
	}

	.tutorhelper-tutor-booking__field.is-wide,
	.tutorhelper-tutor-booking__field.is-half,
	.tutorhelper-tutor-booking__field.is-quarter {
		grid-column: auto;
	}

	.tutorhelper-tutor-booking__actions {
		align-items: stretch;
		flex-direction: column;
	}

	.tutorhelper-tutor-booking__actions .button {
		width: 100%;
	}

	.tutorhelper-booking-student-search__selected {
		align-items: stretch;
		flex-direction: column;
	}

	.tutorhelper-booking-student-search__selected .button {
		align-self: flex-start;
	}
}



/* ==========================================================================
   Tutor booking preview
   ========================================================================== */

.tutorhelper-tutor-booking-preview {
	display: flex;
	gap: 16px;
	padding: 0;
	background: transparent;
	border: 0;
}

.tutorhelper-tutor-booking-preview__colour {
	flex: 0 0 8px;
	min-height: 70px;
	background: #328bb8;
	border-radius: 999px;
}

.tutorhelper-tutor-booking-preview__content {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.tutorhelper-tutor-booking-preview__values {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 28px;
}

.tutorhelper-tutor-booking-preview__values span {
	color: #55717c;
}

.tutorhelper-tutor-booking-preview__values strong {
	color: var(--tutorhelper-dark);
}

.tutorhelper-tutor-booking-preview__content p {
	margin: 0;
	color: #55717c;
	font-size: 12px;
}

@media screen and (max-width: 782px) {
	.tutorhelper-booking-student-search__selected {
		align-items: stretch;
		flex-direction: column;
	}

	.tutorhelper-booking-student-search__selected .button {
		align-self: flex-start;
	}
}


/* ==========================================================================
   Tutor booking edit mode
   ========================================================================== */

.tutorhelper-tutor-booking__readonly-label {
	color: var(--tutorhelper-dark);
	font-weight: 700;
}

.tutorhelper-booking-student-search__selected.is-readonly {
	background: rgba(19, 57, 73, 0.05);
	border-color: rgba(19, 57, 73, 0.18);
}

.tutorhelper-tutor-booking__locked {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex: 0 0 auto;
	color: #55717c;
	font-size: 12px;
	font-weight: 600;
}

.tutorhelper-tutor-booking__locked .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.tutorhelper-tutor-booking__action-buttons {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
}

.tutorhelper-tutor-booking__action-buttons .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.tutorhelper-tutor-booking__error {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
}

@media screen and (max-width: 782px) {
	.tutorhelper-tutor-booking__locked {
		align-self: flex-start;
	}

	.tutorhelper-tutor-booking__action-buttons {
		align-items: stretch;
		flex-direction: column-reverse;
		width: 100%;
	}

	.tutorhelper-tutor-booking__action-buttons .button {
		width: 100%;
	}
}
