/* =========================
   Front-end Booking Form
   ========================= */

.tcwd-booking-form {
	max-width: 480px;
	padding: 1rem 1.25rem;
	border: 1px solid #e1e1e1;
	border-radius: 6px;
	background: #fafafa;
	margin-top: 0;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

#content p .tcwd-slot-label-text {
	font-size: .8em;
	font-weight: normal;
}

#content p.tcwd-booking-field {
	margin: 0 0 15px 0;
	line-height: 1.5em;
}

#content p.tcwd-booking-field label {
	font-size: 1em;
}

#content p .tcwd-slot-label-wrap {
    margin-bottom: 2px;
    padding: 0px 6px;
}

.tcwd-booking-field {
	margin-bottom: 0.85rem;
}

.tcwd-booking-field label {
	font-weight: 600;
}

.tcwd-booking-field input[type="text"],
.tcwd-booking-field input[type="email"],
.tcwd-booking-field input[type="date"],
.tcwd-booking-field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font-size: 14px;
}

.tcwd-booking-field textarea {
	min-height: 70px;
}

.tcwd-b-date-note {
	font-size: 11px;
	color: #666;
	display: block;
	margin-top: 2px;
}

/* Timeslot radios */

.tcwd-slot-label-wrap {
	display: block;
	margin-bottom: 4px;
	cursor: pointer;
	padding: 4px 6px;
	border-radius: 3px;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.tcwd-slot-label-wrap:hover {
	background: #f0f7ff;
}

.tcwd-slot-label-wrap input[type="radio"] {
	margin-right: 6px;
}

.tcwd-slot-label-text {
	font-weight: 600;
}

.tcwd-slot-time {
	margin-left: 4px;
	color: #555;
	font-size: 12px;
}

.tcwd-slot-status {
	font-style: italic;
	margin-left: 4px;
	color: #b00;
	font-size: 12px;
}

.tcwd-slot-unavailable {
	opacity: 0.5;
}

/* Submit button */

.tcwd-booking-submit {
	margin-top: 1.1rem;
}

.tcwd-booking-submit input[type="submit"] {
	padding: 8px 16px;
	border-radius: 3px;
	border: 1px solid #0073aa;
	background: #0073aa;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
}

.tcwd-booking-submit input[type="submit"]:hover {
	background: #005f8d;
}

/* =========================
   Front-end Calendar Wrapper
   ========================= */

.tcwd-front-calendar-wrap {
	max-width: none;
	margin-bottom: 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: 6px;
	background: #ffffff;
	border: 1px solid #bfbfbf;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Header (month + nav) */

.tcwd-front-calendar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.75rem;
	gap: 10px;
	flex-wrap: wrap;
}

.tcwd-front-calendar-title {
	font-weight: 700;
	font-size: 16px;
}

.tcwd-front-calendar-nav {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
}

.tcwd-front-cal-month {
	font-weight: 600;
}

.tcwd-front-cal-nav-link {
	text-decoration: none;
	color: #0073aa;
}

.tcwd-front-cal-nav-link:hover {
	text-decoration: underline;
}

/* Calendar table */

.tcwd-front-calendar {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 2px solid #bfbfbf; /* strong outer border */
}

.tcwd-front-calendar th,
.tcwd-front-calendar td {
	border: 1px solid #ccc;
	padding: 6px 4px;
	vertical-align: top;
	font-size: 12px;
}

.tcwd-front-calendar th {
	background: #f0f3f8;
	text-align: center;
	font-weight: 600;
	color: #333;
}

.tcwd-front-calendar-cell {
	min-height: 80px;
	background: #ffffff;
}

.tcwd-front-calendar-empty {
	background: #f5f5f5;
}

.tcwd-front-calendar-day {
	font-weight: 700;
	margin-bottom: 4px;
}

/* Weekend styling */

.tcwd-front-calendar-weekend {
	background: #f0f0f0;
}

.tcwd-front-calendar-weekend-note {
	font-size: 11px;
	color: #999;
	margin-bottom: 4px;
}

/* Slot status inside cells */

.tcwd-front-calendar-slot {
	font-size: 11px;
	margin-bottom: 2px;
}

.tcwd-front-calendar-slot .booked {
    color: #ff0000;
    font-weight: bold;
}

/* Available = neutral */
.tcwd-front-calendar-slot.available {
	color: #555;
}

/* Optional: tighten layout on smaller screens */

@media (max-width: 600px) {
	.tcwd-front-calendar th,
	.tcwd-front-calendar td {
		padding: 4px 2px;
		font-size: 11px;
	}

	.tcwd-front-calendar-day {
		font-size: 11px;
	}

	.tcwd-front-calendar-slot {
		font-size: 10px;
	}
}

/* Past dates (front calendar) */
.tcwd-front-calendar-cell.tcwd-front-calendar-past {
    background: #f4f4f4 !important;
    color: #999;
}

.tcwd-front-calendar-cell.tcwd-front-calendar-past .tcwd-front-calendar-day {
    opacity: 0.5;
}

.tcwd-front-calendar-cell.tcwd-front-calendar-past .tcwd-front-calendar-slot {
    opacity: 0.4;
}

/* Stop interaction if you ever add JS click events */
.tcwd-front-calendar-cell.tcwd-front-calendar-past {
    pointer-events: none;
}

.tcwd-front-calendar-note {
    font-size: 11px;
    color: #777;
    margin-top: 4px;
}

/* =========================
   MOBILE RESPONSIVE CALENDAR (Under 800px)
   ========================= */

@media (max-width: 800px) {

	/* Wrap calendar in horizontal scroll */
	.tcwd-front-calendar-wrap {
		overflow-x: auto;
		padding: 10px;
	}

	/* Force table to maintain a minimum width */
	.tcwd-front-calendar {
		min-width: 700px;
	}

	/* Header adjusts layout */
	.tcwd-front-calendar-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.tcwd-front-calendar-title {
		font-size: 15px;
	}

	.tcwd-front-calendar-nav {
		font-size: 12px;
		gap: 6px;
	}

	/* Calendar cells reduce padding & spacing */
	.tcwd-front-calendar th,
	.tcwd-front-calendar td {
		padding: 4px 3px;
		font-size: 11px;
	}

	.tcwd-front-calendar-day {
		font-size: 11px;
		margin-bottom: 2px;
	}

	.tcwd-front-calendar-slot {
		font-size: 10px;
		margin-bottom: 1px;
		line-height: 1.2;
	}

	/* Reduce minimum cell height */
	.tcwd-front-calendar-cell {
		min-height: 60px;
	}

	/* Weekend + Past Date adjustments */
	.tcwd-front-calendar-weekend,
	.tcwd-front-calendar-past {
		background-size: cover;
	}

	/* Keep layout from squashing top labels */
	.tcwd-front-calendar th {
		font-size: 11px;
		padding: 4px 2px;
	}
}

/* =========================
   Layout: Form left, Calendar right
   ========================= */

.tcwd-bookings-layout {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

/* Left column: form (about 1/3) */
.tcwd-bookings-form-col {
	flex: 0 0 32%;
	max-width: 32%;
}

/* Right column: calendar (about 2/3) */
.tcwd-bookings-calendar-col {
	flex: 0 0 68%;
	max-width: 68%;
}

/* Make inner blocks fill their columns */
.tcwd-bookings-form-col .tcwd-booking-form {
	width: 100%;
	max-width: 100%;
}

.tcwd-bookings-calendar-col .tcwd-front-calendar-wrap {
	width: 100%;
	max-width: 100%;
}

/* Stack nicely on smaller screens */
@media (max-width: 800px) {
	.tcwd-bookings-layout {
		flex-direction: column;
	}

	.tcwd-bookings-form-col,
	.tcwd-bookings-calendar-col {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

.tcwd-booking-field input[type="text"], .tcwd-booking-field input[type="email"], .tcwd-booking-field input[type="date"], .tcwd-booking-field textarea {
    font-family: inherit;
	margin-top: 5px;
}