/**
 * Stylesheet for PetOS Public Booking Extension.
 * Premium green/neutral palette, smooth transitions, and responsive grid.
 */

:root {
	--petos-pub-primary: #10b981;
	--petos-pub-primary-hover: #059669;
	--petos-pub-secondary: #64748b;
	--petos-pub-secondary-hover: #475569;
	--petos-pub-success: #10b981;
	--petos-pub-danger: #ef4444;
	--petos-pub-danger-hover: #dc2626;
	--petos-pub-bg: #f8fafc;
	--petos-pub-surface: #ffffff;
	--petos-pub-border: #e2e8f0;
	--petos-pub-text: #1e293b;
	--petos-pub-text-muted: #64748b;
	--petos-pub-radius: 12px;
	--petos-pub-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--petos-pub-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Wizard Container */
.petos-booking-wizard,
.petos-cancel-box-wrapper {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--petos-pub-text);
	background: var(--petos-pub-surface);
	border: 1px solid var(--petos-pub-border);
	border-radius: var(--petos-pub-radius);
	padding: 30px;
	max-width: 650px;
	margin: 20px auto;
	box-shadow: var(--petos-pub-shadow);
	box-sizing: border-box;
}

.petos-booking-wizard *,
.petos-cancel-box-wrapper * {
	box-sizing: border-box;
}

/* Header */
.petos-wizard-header {
	text-align: center;
	margin-bottom: 30px;
	border-bottom: 1px solid var(--petos-pub-border);
	padding-bottom: 20px;
}

.petos-wizard-header h2 {
	margin: 0 0 8px 0;
	font-size: 24px;
	font-weight: 700;
	color: var(--petos-pub-text);
}

.petos-wizard-header p {
	margin: 0;
	font-size: 14px;
	color: var(--petos-pub-text-muted);
}

/* Stepper Progress */
.petos-wizard-steps {
	display: flex;
	justify-content: space-between;
	margin-bottom: 35px;
	position: relative;
}

.petos-wizard-steps::before {
	content: "";
	position: absolute;
	top: 15px;
	left: 10%;
	right: 10%;
	height: 2px;
	background: var(--petos-pub-border);
	z-index: 1;
}

.petos-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 2;
	width: 25%;
	text-align: center;
}

.petos-step .step-num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--petos-pub-border);
	color: var(--petos-pub-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 8px;
	border: 2px solid var(--petos-pub-surface);
	transition: all 0.3s ease;
}

.petos-step .step-label {
	font-size: 12px;
	font-weight: 500;
	color: var(--petos-pub-text-muted);
	transition: color 0.3s ease;
}

/* Stepper Active/Completed States */
.petos-step.active .step-num {
	background: var(--petos-pub-primary);
	color: #fff;
	box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.petos-step.active .step-label {
	color: var(--petos-pub-primary);
	font-weight: 600;
}

.petos-step.completed .step-num {
	background: var(--petos-pub-primary);
	color: #fff;
}

.petos-step.completed .step-label {
	color: var(--petos-pub-text);
}

/* Panes */
.petos-wizard-pane {
	display: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.petos-wizard-pane.active {
	display: block;
	opacity: 1;
}

/* Form Controls */
.petos-form-group {
	margin-bottom: 20px;
}

.petos-form-group label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--petos-pub-text);
}

.petos-form-control {
	width: 100%;
	padding: 12px 16px;
	font-size: 15px;
	border: 1px solid var(--petos-pub-border);
	border-radius: 8px;
	background-color: var(--petos-pub-bg);
	color: var(--petos-pub-text);
	transition: all 0.25s ease;
	outline: none;
}

.petos-form-control:focus {
	border-color: var(--petos-pub-primary);
	background-color: #fff;
	box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.petos-form-row {
	display: flex;
	gap: 15px;
}

.petos-form-row .petos-form-group {
	flex: 1;
}

textarea.petos-form-control {
	resize: vertical;
}

/* Helper hidden class */
.petos-hidden {
	display: none !important;
}

/* Buttons */
.petos-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.petos-btn-primary {
	background-color: var(--petos-pub-primary);
	color: #fff;
}

.petos-btn-primary:hover:not(:disabled) {
	background-color: var(--petos-pub-primary-hover);
}

.petos-btn-secondary {
	background-color: var(--petos-pub-bg);
	color: var(--petos-pub-text);
	border: 1px solid var(--petos-pub-border);
}

.petos-btn-secondary:hover:not(:disabled) {
	background-color: var(--petos-pub-border);
}

.petos-btn-success {
	background-color: var(--petos-pub-success);
	color: #fff;
}

.petos-btn-success:hover:not(:disabled) {
	opacity: 0.9;
}

.petos-btn-danger {
	background-color: var(--petos-pub-danger);
	color: #fff;
}

.petos-btn-danger:hover:not(:disabled) {
	background-color: var(--petos-pub-danger-hover);
}

.petos-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Actions Section */
.petos-wizard-actions {
	display: flex;
	justify-content: space-between;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid var(--petos-pub-border);
}

.petos-wizard-actions:has(#petos-btn-step1-next) {
	justify-content: flex-end;
}

/* Slots Grid */
.petos-slots-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 10px;
	max-height: 250px;
	overflow-y: auto;
	padding: 5px;
	border: 1px solid var(--petos-pub-border);
	border-radius: 8px;
	background: var(--petos-pub-bg);
}

.petos-slot-btn {
	background: #fff;
	border: 1px solid var(--petos-pub-border);
	border-radius: 6px;
	padding: 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--petos-pub-text);
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.petos-slot-btn:hover {
	border-color: var(--petos-pub-primary);
	color: var(--petos-pub-primary);
	background: rgba(16, 185, 129, 0.05);
}

.petos-slot-btn.selected {
	background: var(--petos-pub-primary);
	border-color: var(--petos-pub-primary);
	color: #fff;
	box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* Notifications */
.petos-booking-notice {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 20px;
	border-left: 4px solid transparent;
}

.petos-booking-notice.success {
	background-color: #ecfdf5;
	color: #065f46;
	border-left-color: var(--petos-pub-success);
}

.petos-booking-notice.error {
	background-color: #fef2f2;
	color: #991b1b;
	border-left-color: var(--petos-pub-danger);
}

/* Success Screen */
.petos-success-screen {
	text-align: center;
	padding: 20px 0;
}

.petos-success-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #ecfdf5;
	color: var(--petos-pub-success);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	font-weight: bold;
	margin-bottom: 20px;
	box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.05);
}

.petos-token-box {
	background: var(--petos-pub-bg);
	border: 1px dashed var(--petos-pub-primary);
	border-radius: 8px;
	padding: 20px;
	margin: 25px 0;
}

.petos-token-box .token-label {
	display: block;
	font-size: 12px;
	color: var(--petos-pub-text-muted);
	margin-bottom: 5px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.petos-token-box strong {
	display: block;
	font-size: 24px;
	color: var(--petos-pub-primary);
	letter-spacing: 2px;
	font-family: monospace, Courier, monospace;
	margin-bottom: 10px;
}

.petos-token-box .token-help {
	margin: 0;
	font-size: 12px;
	color: var(--petos-pub-text-muted);
	line-height: 1.4;
}

/* Cancellation Box */
.petos-cancel-box-wrapper {
	margin-top: 40px;
	padding: 20px;
	border-style: dashed;
}

.petos-cancel-header h3 {
	margin: 0 0 6px 0;
	font-size: 16px;
	font-weight: 700;
}

.petos-cancel-header p {
	margin: 0 0 15px 0;
	font-size: 13px;
	color: var(--petos-pub-text-muted);
}

.petos-cancel-form {
	display: flex;
	gap: 10px;
}

.petos-cancel-form .petos-form-control {
	flex: 1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
	.petos-booking-wizard,
	.petos-cancel-box-wrapper {
		padding: 20px;
		margin: 10px;
	}

	.petos-form-row {
		flex-direction: column;
		gap: 0;
	}

	.petos-wizard-steps {
		margin-bottom: 25px;
	}

	.petos-step .step-label {
		display: none;
	}

	.petos-wizard-steps::before {
		left: 5%;
		right: 5%;
	}
	
	.petos-cancel-form {
		flex-direction: column;
	}
}
