/* Liikkuva Bike Booking — frontend styles. Scoped under .lbb-root. */

.lbb-root {
	font-family: inherit;
	color: inherit;
	max-width: 880px;
	margin: 0 auto;
}

.lbb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.lbb-month-title {
	font-size: 1.25rem;
	font-weight: 600;
	text-transform: capitalize;
	text-align: center;
	flex: 1;
}

.lbb-nav {
	background: var(--wp--preset--color--accent, #C8860A);
	color: #fff;
	border: 0;
	border-radius: 6px;
	width: 40px;
	height: 40px;
	font-size: 1.4rem;
	cursor: pointer;
	line-height: 1;
}
.lbb-nav[disabled] { opacity: 0.4; cursor: not-allowed; }

.lbb-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}

.lbb-weekday {
	font-weight: 600;
	font-size: 0.85rem;
	text-align: center;
	padding: 6px 0;
	color: #555;
}

.lbb-cell {
	min-height: 78px;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 6px 8px;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 0.85rem;
}

.lbb-empty { border: none; background: transparent; }

.lbb-day-num { font-weight: 600; font-size: 0.95rem; }

.lbb-cell.lbb-available {
	cursor: pointer;
	background: #f0f8ee;
	border-color: #b8d9ad;
	transition: background 0.12s ease;
}
.lbb-cell.lbb-available:hover,
.lbb-cell.lbb-available:focus {
	background: #d7ecd0;
	outline: 2px solid var(--wp--preset--color--accent, #C8860A);
}

.lbb-cell.lbb-past {
	background: #f5f5f5;
	color: #aaa;
	border-color: #eee;
}

.lbb-cell.lbb-closed-cell {
	background: #fbe9e7;
	color: #b8453a;
	border-color: #f3b9b3;
}

.lbb-cell.lbb-full-cell {
	background: #eceff1;
	color: #555;
	border-color: #cfd8dc;
}

.lbb-cell.lbb-too-soon {
	background: #fffdf2;
	color: #8a6d3b;
	border-color: #f0e8c4;
}

.lbb-slot { font-size: 0.78rem; line-height: 1.2; }
.lbb-slot-empty { color: #999; text-decoration: line-through; }

.lbb-cell-label {
	font-size: 0.85rem;
	font-weight: 500;
}

.lbb-legend {
	display: flex;
	gap: 16px;
	font-size: 0.85rem;
	margin-top: 12px;
	color: #555;
	justify-content: center;
}
.lbb-legend-item { padding-left: 18px; position: relative; }
.lbb-legend-item::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 3px; border: 1px solid; }
.lbb-legend-item.lbb-avail::before { background: #f0f8ee; border-color: #b8d9ad; }
.lbb-legend-item.lbb-full::before  { background: #eceff1; border-color: #cfd8dc; }
.lbb-legend-item.lbb-closed::before{ background: #fbe9e7; border-color: #f3b9b3; }

.lbb-loading { opacity: 0.55; pointer-events: none; }

/* Modal */
.lbb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(30, 43, 26, 0.55);
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4vh 16px;
	z-index: 100000;
	overflow-y: auto;
}
.lbb-modal {
	background: #fff;
	border-radius: 10px;
	max-width: 480px;
	width: 100%;
	padding: 24px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.lbb-modal-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
}
.lbb-form { display: flex; flex-direction: column; gap: 12px; }
.lbb-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.lbb-field-type { border: 0; padding: 0; margin: 0; }
.lbb-field-type legend { font-weight: 600; margin-bottom: 6px; padding: 0; }

.lbb-radio { display: block; padding: 4px 0; cursor: pointer; }
.lbb-radio-disabled { color: #999; cursor: not-allowed; }
.lbb-radio input { margin-right: 6px; }

.lbb-label { font-size: 0.9rem; font-weight: 500; }
.lbb-field input[type=text],
.lbb-field input[type=email],
.lbb-field input[type=tel],
.lbb-field textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 0.95rem;
	font-family: inherit;
	box-sizing: border-box;
}
.lbb-field input:focus,
.lbb-field textarea:focus {
	outline: 2px solid var(--wp--preset--color--accent, #C8860A);
	border-color: var(--wp--preset--color--accent, #C8860A);
}

/* Bike picker combobox */
.lbb-field-bike { position: relative; }
.lbb-combo { position: relative; }
.lbb-combo-list {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 2px);
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
	max-height: 240px;
	overflow-y: auto;
	z-index: 10;
}
.lbb-combo-option {
	padding: 8px 10px;
	font-size: 0.95rem;
	cursor: pointer;
}
.lbb-combo-option:hover,
.lbb-combo-option.is-active {
	background: #f0f8ee;
}
.lbb-combo-option-other {
	border-top: 1px solid #eee;
	font-style: italic;
	color: #555;
}
.lbb-combo-empty {
	padding: 8px 10px;
	font-size: 0.9rem;
	color: #999;
}
.lbb-combo-other { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.lbb-combo-other[hidden] { display: none; }

.lbb-turnstile { display: flex; justify-content: center; min-height: 65px; }

.lbb-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 8px;
}

.lbb-btn {
	padding: 10px 18px;
	border-radius: 6px;
	border: 0;
	font-size: 0.95rem;
	cursor: pointer;
	font-family: inherit;
}
.lbb-btn-primary {
	background: var(--wp--preset--color--accent, #C8860A);
	color: #fff;
}
.lbb-btn-primary[disabled] { opacity: 0.6; cursor: wait; }
.lbb-btn-secondary {
	background: #eee;
	color: #333;
}

.lbb-status {
	min-height: 18px;
	font-size: 0.9rem;
	color: #b8453a;
}
.lbb-success { color: #2e7d32; font-size: 1rem; }

@media (max-width: 640px) {
	.lbb-cell { min-height: 60px; padding: 4px 5px; }
	.lbb-day-num { font-size: 0.85rem; }
	.lbb-slot { font-size: 0.7rem; }
	.lbb-cell-label { font-size: 0.75rem; }
	.lbb-modal { padding: 18px; }
	.lbb-month-title { font-size: 1.05rem; }
}
