/* Spot Work Availability — Resume Editor */

.spot-availability-section {
	margin-bottom: 1.5rem;
}

/* Toggle row */
.spot-toggle-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.875rem 1rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	cursor: pointer;
	transition: all 0.2s;
}

.spot-toggle-row.active {
	background: #e8f5e9;
	border-color: #81c784;
}

.spot-toggle-row .toggle-info h5 {
	font-size: 0.95rem;
	font-weight: 500;
	color: #374151;
	margin: 0 0 0.125rem 0;
}

.spot-toggle-row .toggle-status {
	font-size: 0.8rem;
	color: #9ca3af;
}

.spot-toggle-row.active .toggle-status {
	color: #4caf50;
}

.toggle-hint {
	display: block;
	font-size: 0.8rem;
	color: #6b7280;
	margin-top: 0.25rem;
	line-height: 1.4;
}

.toggle-hint.hidden {
	display: none;
}

/* Toggle switch */
.toggle-switch {
	position: relative;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #d1d5db;
	border-radius: 24px;
	transition: 0.2s;
}

.toggle-slider::before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	border-radius: 50%;
	transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
	background-color: #4caf50;
}

.toggle-switch input:checked + .toggle-slider::before {
	transform: translateX(20px);
}

/* Grid wrapper */
.spot-grid-wrap {
	margin-top: 0.75rem;
	max-width: 480px;
}

/* Allow the grid box to fill the parent on narrower viewports — the 480px cap
   pinches the 8-column grid below tablet sizes and pushes the day cells outside
   the box. */
@media (max-width: 600px) {
	.spot-grid-wrap {
		max-width: none;
	}
}

.spot-grid-wrap.hidden {
	display: none;
}

.spot-grid-box {
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
}

/* Quick select buttons */
.availability-quick-select {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-bottom: 1rem;
}

.availability-quick-select button {
	padding: 0.25rem 0.625rem;
	font-size: 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 9999px;
	background: #fff;
	color: #374151;
	cursor: pointer;
	transition: all 0.15s;
}

.availability-quick-select button:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}

/* Availability grid */
.availability-grid {
	width: 100%;
	border-collapse: collapse;
}

.availability-grid th {
	font-size: 0.8rem;
	font-weight: 500;
	color: #6b7280;
	text-align: center;
	padding: 0.375rem 0.25rem;
}

/* Day headers — clickable column toggles */
.availability-grid .day-header {
	cursor: pointer;
	user-select: none;
	border-radius: 0.25rem;
	transition: background 0.15s;
}

.availability-grid .day-header:hover {
	background: #f3f4f6;
}

/* Time labels — clickable row toggles */
.availability-grid .time-label {
	text-align: left;
	white-space: nowrap;
	padding-right: 0.75rem;
	color: #6b7280;
	font-size: 0.85rem;
	cursor: pointer;
	user-select: none;
	border-radius: 0.25rem;
	transition: background 0.15s;
}

.availability-grid .time-label:hover {
	background: #f3f4f6;
}

.availability-grid .time-label i {
	width: 22px;
	font-size: 1.1rem;
	text-align: center;
	margin-right: 0.375rem;
	vertical-align: middle;
}

.availability-grid .time-label span {
	vertical-align: middle;
}

.availability-grid td {
	text-align: center;
	padding: 0.375rem;
}

/* Circular checkbox */
.availability-checkbox {
	display: inline-flex;
	cursor: pointer;
	margin: 0;
}

.availability-checkbox input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.check-circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2px solid #d1d5db;
	background: #fff;
	color: transparent;
	font-size: 0.75rem;
	transition: all 0.15s;
}

.availability-checkbox input:checked + .check-circle {
	border-color: #4caf50;
	background: #e8f5e9;
	color: #4caf50;
}

/* Hourly rate */
.spot-rate-row {
	margin-top: 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.spot-rate-row label {
	font-size: 0.85rem;
	font-weight: 500;
	color: #374151;
	white-space: nowrap;
}

.rate-input-wrap {
	display: flex;
	align-items: center;
	border: 1px solid #d1d5db;
	border-radius: 0.375rem;
	overflow: hidden;
	background: #fff;
}

.rate-prefix,
.rate-suffix {
	padding: 0.375rem 0.5rem;
	background: #f9fafb;
	color: #6b7280;
	font-size: 0.85rem;
	border: none;
}

.rate-input-wrap input {
	border: none;
	outline: none;
	padding: 0.375rem 0.5rem;
	width: 80px;
	font-size: 0.9rem;
	-moz-appearance: textfield;
}

.rate-input-wrap input::-webkit-outer-spin-button,
.rate-input-wrap input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ---------- Responsive: tighten the 8-column grid below tablet ---------- */
@media (max-width: 540px) {
	.spot-grid-box {
		padding: 0.875rem 0.75rem;
	}
	.availability-grid .time-label {
		font-size: 0.78rem;
		padding-right: 0.4rem;
	}
	.availability-grid .time-label i {
		width: 18px;
		font-size: 0.95rem;
		margin-right: 0.25rem;
	}
	.availability-grid td {
		padding: 0.25rem 0.1rem;
	}
	.availability-grid th {
		font-size: 0.72rem;
		padding: 0.3rem 0.1rem;
	}
	.check-circle {
		width: 30px;
		height: 30px;
	}
}

/* Phone — drop the time label text; icons alone (sun/cloud/moon) carry meaning. */
@media (max-width: 420px) {
	.availability-grid .time-label {
		text-align: center;
		padding-right: 0.2rem;
	}
	.availability-grid .time-label span {
		display: none;
	}
	.availability-grid .time-label i {
		margin-right: 0;
		width: 20px;
		font-size: 1rem;
	}
	.check-circle {
		width: 26px;
		height: 26px;
	}
	.availability-grid th {
		font-size: 0.68rem;
		padding: 0.25rem 0.05rem;
	}
	.availability-grid td {
		padding: 0.2rem 0.05rem;
	}
	.spot-grid-box {
		padding: 0.75rem 0.5rem;
	}
}
