/* Registration Modal - Scoped Styles */
/* Prefix: .reg-modal for all styles to avoid conflicts */

/* Modal styles */
.reg-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 1050;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.reg-modal.reg-show {
	display: flex;
}

.reg-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 800px;
	margin: 20px auto;
}

.reg-modal-content {
	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	max-height: 90vh;
	overflow-y: auto;
}

.reg-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #dee2e6;
	border-radius: 8px 8px 0 0;
}

.reg-modal-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	color: #212529;
}

.reg-modal-body {
	padding: 24px;
}

.reg-close {
	background: none;
	border: none;
	font-size: 28px;
	font-weight: 300;
	color: #6c757d;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s;
}

.reg-close:hover {
	color: #000;
	background-color: #f8f9fa;
}

/* Registration button */
.reg-register-button {
	background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
	box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.reg-register-button:hover {
	background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Container and layout */
.reg-container {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

.reg-py-4 {
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}

.reg-mb-1 { margin-bottom: 0.25rem !important; }
.reg-mb-2 { margin-bottom: 0.5rem !important; }
.reg-mb-3 { margin-bottom: 1rem !important; }
.reg-mb-4 { margin-bottom: 1.5rem !important; }
.reg-mt-3 { margin-top: 1rem !important; }
.reg-mt-5 { margin-top: 3rem !important; }
.reg-my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
.reg-mx-auto { margin-left: auto !important; margin-right: auto !important; }
.reg-pl-0 { padding-left: 0 !important; }
.reg-ml-0 { margin-left: 0 !important; }

/* Typography */
.reg-h5 {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
	color: #212529;
}

.reg-fw-bold { font-weight: 600; }
.reg-fw-semibold { font-weight: 600; }
.reg-text-center { text-align: center; }
.reg-text-muted { color: #6c757d; }
.reg-text-primary { color: #007bff; }
.reg-small { font-size: 0.875rem; }

/* Flex utilities */
.reg-d-flex { display: flex; }
.reg-justify-content-between { justify-content: space-between; }
.reg-justify-content-center { justify-content: center; }
.reg-align-items-center { align-items: center; }
.reg-w-100 { width: 100%; }

/* Form controls */
.reg-form-select,
.reg-form-control {
	width: 100%;
	padding: 8px 12px;
	font-size: 16px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	background-color: #fff;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.reg-form-select:focus,
.reg-form-control:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.reg-form-select:disabled,
.reg-form-control:disabled {
	background-color: #e9ecef;
	opacity: 0.6;
	cursor: not-allowed;
}

.reg-form-control {
	resize: vertical;
}

/* Buttons */
.reg-btn {
	display: inline-block;
	padding: 8px 16px;
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
	background-color: transparent;
	user-select: none;
	font-family: inherit;
}

.reg-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.reg-btn-primary {
	color: #fff;
	background-color: #007bff;
	border-color: #007bff;
}

.reg-btn-primary:hover:not(:disabled) {
	background-color: #0056b3;
	border-color: #0056b3;
}

.reg-btn-outline-primary {
	color: #007bff;
	background-color: transparent;
	border-color: #007bff;
}

.reg-btn-outline-primary:hover:not(:disabled) {
	color: #fff;
	background-color: #007bff;
	border-color: #007bff;
}

.reg-btn-secondary {
	color: #fff;
	background-color: #6c757d;
	border-color: #6c757d;
}

.reg-btn-secondary.reg-disabled {
	background-color: #6c757d;
	border-color: #6c757d;
}

.reg-btn-sm {
	padding: 6px 12px;
	font-size: 12px;
}

.reg-px-3 {
	padding-left: 1rem;
	padding-right: 1rem;
}

.reg-py-1 {
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
}

.reg-p-1 { padding: 0.25rem; }
.reg-p-2 { padding: 0.5rem; }
.reg-p-3 { padding: 1rem; }

/* Calendar grid */
.reg-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	text-align: center;
	overflow-x: auto;
}

.reg-calendar-day-header {
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	background-color: #f8f9fa;
	border-radius: 4px;
}

.reg-calendar-day-button {
	height: 64px;
	min-width: 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	border-radius: 4px;
	position: relative;
}

.reg-invisible {
	visibility: hidden;
}

.reg-border {
	border: 1px solid #dee2e6;
}

/* Time selection grid */
.reg-time-grid {
	display: grid;
	grid-gap: 0.25rem;
	grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
}

.reg-time-button {
	padding: 0.25rem;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
}

/* Alerts */
.reg-alert {
	padding: 12px 16px;
	margin-bottom: 1rem;
	border: 1px solid transparent;
	border-radius: 4px;
}

.reg-alert-success {
	color: #155724;
	background-color: #d4edda;
	border-color: #c3e6cb;
}

.reg-alert-warning {
	color: #856404;
	background-color: #fff3cd;
	border-color: #ffeaa7;
}

.reg-alert-heading {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

/* Summary box */
.reg-summary-box {
	padding: 1rem;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	background-color: #f8f9fa;
	margin-bottom: 1.5rem;
}

.reg-summary-box p {
	margin-bottom: 0.25rem;
}

.reg-summary-box p:last-child {
	margin-bottom: 0;
}

/* Spinner */
.reg-spinner-border {
	display: inline-block;
	width: 2rem;
	height: 2rem;
	vertical-align: text-bottom;
	border: 0.25em solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: reg-spinner-border 0.75s linear infinite;
}

.reg-spinner-container {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 200px;
}

@keyframes reg-spinner-border {
	to {
		transform: rotate(360deg);
	}
}

/* Reason container and text */
.reg-reason-container {
	position: relative;
	overflow: hidden;
	white-space: nowrap;
	justify-content: center;
	align-items: center;
	display: flex;
	width: 100%;
}

.reg-reason-text {
	display: inline-block;
	white-space: nowrap;
	transition: transform 0.3s;
	font-size: 0.8rem;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

@keyframes reg-scroll-left {
	0% {
		transform: translateX(100%);
	}
	100% {
		transform: translateX(-100%);
	}
}

/* Vue.js directive */
.reg-modal [v-cloak] {
	display: none;
}

/* Custom checkbox */
.reg-form-check {
	padding-left: 0;
	margin-left: 0;
}

.reg-custom-checkbox {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
	position: relative;
	font-size: 16px;
}

.reg-custom-checkbox input {
	opacity: 0;
	position: absolute;
	cursor: pointer;
	height: 0;
	width: 0;
}

.reg-custom-checkbox .reg-checkmark {
	display: inline-block;
	height: 19px;
	width: 19px;
	background-color: #fff;
	border: 1px solid #007BFF;
	border-radius: 4px;
	box-sizing: border-box;
	transition: background-color 0.2s, border-color 0.2s;
	margin-right: 8px;
	position: relative;
}

.reg-custom-checkbox:hover .reg-checkmark {
	border-color: #0056b3;
}

.reg-custom-checkbox input:checked + .reg-checkmark {
	background-color: #007BFF;
	border-color: #007BFF;
}

.reg-custom-checkbox .reg-checkmark::after {
	content: "";
	position: absolute;
	display: none;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.reg-custom-checkbox input:checked + .reg-checkmark::after {
	display: block;
}

/* Modal and form headings - scoped to registration modal */
.reg-modal h2,
.reg-modal h3,
.reg-modal h5 {
	color: #212529 !important;
}

/* Form layout */
.reg-form-container {
	max-width: 600px;
	margin: 0 auto;
}

/* Navigation buttons */
.reg-nav-buttons {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.reg-month-display {
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0;
}

/* Success state */
.reg-success-container {
	text-align: center;
	padding: 2rem;
}

/* Loading state */
.reg-loading-text {
	margin-top: 3rem;
	color: #6c757d;
	text-align: center;
}

/* Background colors */
.reg-bg-light {
	background-color: #f8f9fa;
}

.reg-rounded {
	border-radius: 4px;
}

/* Responsive design */
@media (max-width: 892px) {
	.reg-reason-text {
		max-width: 66px !important;
	}

	.reg-calendar-day-button {
		height: 56px;
		min-width: 56px;
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.reg-modal-dialog {
		margin: 10px;
		max-width: none;
	}

	.reg-modal-body {
		padding: 16px;
	}

	.reg-nav-buttons {
		flex-direction: column;
		gap: 8px;
	}

	.reg-nav-buttons .reg-btn {
		width: 100%;
	}

	.reg-time-grid {
		grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	}
}

@media (max-width: 576px) {

	.reg-calendar-day-button {
		height: 48px;
		min-width: 40px;
		font-size: 12px;
	}

	.reg-time-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}