/* TVSF volunteer grid form — day cards + slot chips.
   States: default (available), selected (green), exhausted (gray, "No slots available").
   prefix beats the GF theme framework resets. */

/* --- Day card --- */
.tvsf-day {
	border: 1px solid #d1d5db !important;
	border-radius: 10px;
	background: #fff !important;
	padding: 14px 16px 12px !important;
	margin: 14px 0 !important;
}

.tvsf-day legend.gfield_label {
	font-weight: 700;
	font-size: 1.05rem;
	color: #1f2937;
	margin-bottom: 6px;
}

/* Role badge — cards for the same date sit side by side, so each names its role. */
.tvsf-day legend.gfield_label::after {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 999px;
	padding: 2px 10px;
	margin-left: 10px;
	vertical-align: middle;
}

.tvsf-day--recycling legend.gfield_label::after {
	content: "Event Recycling";
	color: #1d5c3f;
	background: #e7f6ec;
}

.tvsf-day--tabling legend.gfield_label::after {
	content: "Tabling";
	color: #1e40af;
	background: #e5edff;
}

/* --- Slot chip grid (single column: rows align across the two role columns) --- */
.tvsf-day .gfield_checkbox {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 8px;
}

.tvsf-day .gchoice {
	position: relative;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	background: #fafafa;
	transition: background-color 0.12s ease, border-color 0.12s ease;
}

.tvsf-day .gchoice:hover:not(:has(> input:disabled)) {
	border-color: #2f855a;
	background: #f3faf5;
}

.tvsf-day .gchoice input.gfield-choice-input {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	accent-color: #2f855a;
	width: 17px;
	height: 17px;
}

.tvsf-day .gchoice label.gform-field-label {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center;
	gap: 10px;
	width: 100% !important;
	max-width: none !important;
	margin: 0;
	padding: 10px 12px 10px 38px;
	cursor: pointer;
	font-size: 0.92rem;
	color: #1f2937;
	line-height: 1.3;
}

.tvsf-count {
	font-size: 0.8em;
	font-weight: 500;
	color: #6b7280;
	white-space: nowrap;
	margin-left: auto;
}

/* --- Selected: green --- */
.tvsf-day .gchoice:has(> input:checked) {
	background: #e7f6ec;
	border-color: #2f855a;
	box-shadow: inset 0 0 0 1px #2f855a;
}

.tvsf-day .gchoice:has(> input:checked) label.gform-field-label {
	color: #1d5c3f;
	font-weight: 600;
}

.tvsf-day .gchoice:has(> input:checked) .tvsf-count {
	color: #2f855a;
}

/* --- Exhausted: gray + messaging --- */
.tvsf-day .gchoice:has(> input:disabled):not(.tvsf-conflict) {
	background: #f3f4f6;
	border-color: #e5e7eb;
}

.tvsf-day .gchoice:has(> input:disabled):not(.tvsf-conflict) label.gform-field-label {
	color: #9ca3af;
	cursor: not-allowed;
}

.tvsf-day .gchoice:has(> input:disabled):not(.tvsf-conflict) .tvsf-count {
	display: none;
}

.tvsf-day .gchoice:has(> input:disabled):not(.tvsf-conflict) label.gform-field-label::after {
	content: "No slots available";
	font-size: 0.8em;
	font-style: italic;
	font-weight: 500;
	color: #9ca3af;
	white-space: nowrap;
	margin-left: auto;
}

/* --- Pre-submit confirmation popup --- */
.tvsf-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(17, 24, 39, 0.55);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.tvsf-modal-overlay.is-open {
	display: flex;
}

.tvsf-modal {
	background: #fff;
	border-radius: 12px;
	max-width: 460px;
	width: 100%;
	padding: 28px 26px 22px;
	text-align: center;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.tvsf-modal h2 {
	margin: 0 0 12px;
	font-size: 1.35rem;
	color: #1d5c3f;
}

.tvsf-modal p {
	margin: 0 0 12px;
	color: #374151;
	font-size: 0.95rem;
	line-height: 1.5;
}

.tvsf-modal-confirm {
	display: block;
	width: 100%;
	margin: 16px 0 8px;
	padding: 13px 16px;
	border: 0;
	border-radius: 8px;
	background: #2f855a;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	cursor: pointer;
}

.tvsf-modal-confirm:hover,
.tvsf-modal-confirm:focus {
	background: #276749;
}

.tvsf-modal-back {
	background: none;
	border: 0;
	color: #6b7280;
	font-size: 0.85rem;
	cursor: pointer;
	text-decoration: underline;
}

.tvsf-modal p strong {
	font-weight: 700; /* theme maps strong to 400 over 300-weight body text */
}

/* --- Same-time conflict: counterpart slot disabled while the other role holds that hour --- */
.tvsf-day .gchoice.tvsf-conflict {
	background: #f3f4f6;
	border-color: #e5e7eb;
}

.tvsf-day .gchoice.tvsf-conflict label.gform-field-label {
	color: #9ca3af;
	cursor: not-allowed;
}

.tvsf-day .gchoice.tvsf-conflict .tvsf-count {
	display: none;
}

.tvsf-day .gchoice.tvsf-conflict label.gform-field-label::after {
	content: "You're booked at this time";
	font-size: 0.8em;
	font-style: italic;
	font-weight: 500;
	color: #9ca3af;
	white-space: nowrap;
	margin-left: auto;
}

/* --- "Email me my link" block: a quiet aside, clearly separate from the signup form --- */
.tvsf-resend-box {
	background: #f3f8f5;
	border: 1px solid #d7e7de;
	border-left: 4px solid #2f855a;
	border-radius: 10px;
	padding: 18px 20px 6px;
	margin: 0 0 40px;
}

.tvsf-resend-box .tvsf-resend-intro {
	margin: 0 0 14px;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #374151;
}

/* GF adds its own generous margins inside; tighten them within the aside. */
.tvsf-resend-box .gform_wrapper,
.tvsf-resend-box .gform_wrapper form,
.tvsf-resend-box .gform_body,
.tvsf-resend-box .gform_footer {
	margin: 0 !important;
	padding: 0 !important;
}

.tvsf-resend-box .gform_wrapper .gfield {
	margin-bottom: 10px !important;
}

/* Confirmation shown in place after requesting a link. */
.tvsf-resend-box .gform_confirmation_message {
	margin: 0;
	color: #1d5c3f;
	font-weight: 600;
}

/* --- Sign-ups closed notice (shown in place of the grid once nothing is bookable) --- */
.tvsf-closed-notice {
	background: #f3f8f5;
	border: 1px solid #d7e7de;
	border-left: 4px solid #2f855a;
	border-radius: 10px;
	padding: 20px 22px;
	color: #374151;
}

.tvsf-closed-notice p {
	margin: 0 0 10px;
	line-height: 1.55;
}

.tvsf-closed-notice p:last-child {
	margin-bottom: 0;
}

/* The gap under the intro is GF's grid row-gap (40px in the theme framework), not a
   margin — tighten it for this small aside only. */
.tvsf-resend-box .gform_fields {
	row-gap: 12px !important;
}

.tvsf-resend-box .tvsf-resend-intro {
	margin-bottom: 2px;
}

.tvsf-resend-box .gform_wrapper .gfield {
	margin-bottom: 0 !important;
}

/* Single role chosen -> day cards run full width in one column, so choosing the second
   role visibly opens a second column rather than just reflowing the same cards. */
.tvsf-roles-single .tvsf-day {
	grid-column: 1 / -1 !important;
}
