/* Import component styles */
@import url('./components/common.css');
@import url('./components/modal.css');
@import url('./components/modal-specialized.css');

:root {
	--primary-color: #8FBF36 !important;
	--primary-light: white;
	--primary-dark: #A8D36B !important;
	--secondary-color: #2196f3;
	--success-color: #4caf50;
	--warning-color: #ff9800;
	--danger-color: #f44336;
	--dark-color: #212529;
	--light-color: #f8f9fa;
	--border-color: #dee2e6;
	--text-muted: #6c757d;
	--shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', sans-serif;
	line-height: 1.6;
	color: var(--dark-color);
	background-color: #fff;
}

/* Main Content */
.main-content {
	transition: opacity 0.5s ease-in;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header & Navigation */
.header {
	background: #fff;
	box-shadow: var(--shadow);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.navbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

.nav-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.logo {
	width: 220px;
	height: 85px;
}

.brand-name {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--primary-color);
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.nav-link {
	background: var(--primary-color);
	color: white !important;
	/* border: 1px solid #999; */
	margin-right: 4px;
	padding: 6px 12px;
	cursor: pointer;
	/* box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.1); */
	transition: background 0.2s;
	font-weight: 100;
	font-size: 14px;
	border-radius: 5px;
	text-decoration: none !important;
}

.nav-link:hover {
	color: var(--primary-color) !important;
	background: var(--primary-light);
	border: 1px solid var(--primary-color);
}

.user-menu {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.user-name {
	font-weight: 500;
	color: var(--text-muted);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	background: none;
	border: none;
	cursor: pointer;
}

.nav-toggle span {
	width: 25px;
	height: 3px;
	background: var(--dark-color);
	margin: 3px 0;
	transition: 0.3s;
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 500;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 0.9rem;
}

.btn-primary {
	background: var(--primary-color);
	color: white;
}

.btn-primary:hover {
	color: var(--primary-color);
	background: var(--primary-light);
	border: 1px solid var(--primary-color);
}

.btn-secondary {
	background: var(--secondary-color);
	color: white;
}

.btn-secondary:hover {
	background: #1976d2;
}

.btn-success {
	background: var(--success-color);
	color: white;
}

.btn-success:hover {
	background: #388e3c;
}

.btn-danger {
	background: var(--danger-color);
	color: white;
}

.btn-danger:hover {
	background: #d32f2f;
}

.btn-large {
	padding: 0.75rem 2rem;
	font-size: 1.1rem;
}

.btn-small {
	padding: 0.25rem 0.5rem;
	font-size: 0.8rem;
}

/* Hero Section */
.hero-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	padding: 4rem 2rem;
	max-width: 1200px;
	margin: 0 auto;
	min-height: 60vh;
	align-items: center;
}

.hero-content h1 {
	font-size: 3rem;
	font-weight: 700;
	color: var(--dark-color);
	margin-bottom: 1rem;
	line-height: 1.2;
}

.hero-content p {
	font-size: 1.2rem;
	color: var(--text-muted);
	margin-bottom: 2rem;
}

.hero-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	box-shadow: var(--shadow-lg);
}

/* Sections */
.section-title {
	text-align: center;
	font-size: 2.5rem;
	font-weight: 600;
	margin-bottom: 3rem;
	color: var(--dark-color);
}

.treatments-section,
.locations-section,
.features-section {
	padding: 4rem 0;
	background: var(--light-color);
}

.treatments-section:nth-child(even),
.locations-section:nth-child(even),
.features-section:nth-child(even) {
	background: white;
}

.treatments-grid,
.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}

.locations-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
}

.treatment-card,
.feature-card {
	background: white;
	border-radius: 8px;
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform 0.3s;
}

.treatment-card:hover,
.feature-card:hover {
	transform: translateY(-4px);
}

.treatment-card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.treatment-card h3 {
	padding: 1rem;
	font-size: 1.25rem;
	color: var(--primary-color);
}

.treatment-card p {
	padding: 0 1rem;
	color: var(--text-muted);
}

.treatment-info {
	display: flex;
	justify-content: space-between;
	padding: 1rem;
	background: var(--light-color);
	font-size: 0.9rem;
	color: var(--text-muted);
}

.location-card {
	background: white;
	padding: 2rem;
	border-radius: 8px;
	box-shadow: var(--shadow);
}

.location-card h3 {
	color: var(--primary-color);
	margin-bottom: 1rem;
	font-size: 1.5rem;
}

.location-card p {
	margin-bottom: 0.5rem;
	color: var(--text-muted);
}

.feature-card {
	padding: 2rem;
	text-align: center;
}

.feature-icon {
	font-size: 3rem;
	margin-bottom: 1rem;
}

.feature-card h3 {
	color: var(--primary-color);
	margin-bottom: 1rem;
}

/* Dashboard */
.dashboard {
	padding: 2rem;
	max-width: 1200px;
	margin: 0 auto;
}

.dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.dashboard-header h1 {
	color: var(--dark-color);
	font-size: 2rem;
}

.dashboard-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
}

.stats-section {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

.stat-card {
	background: white;
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: var(--shadow);
	text-align: center;
}

.stat-card h3 {
	font-size: 2rem;
	color: var(--primary-color);
	margin-bottom: 0.5rem;
}

.appointments-section,
.progress-section,
.messages-section {
	background: white;
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: var(--shadow);
}

.appointments-section h2,
.progress-section h2,
.messages-section h2 {
	margin-bottom: 1rem;
	color: var(--dark-color);
	font-size: 1.5rem;
}

.appointment-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	margin-bottom: 1rem;
}

.appointment-info h3 {
	color: var(--primary-color);
	margin-bottom: 0.5rem;
}

.appointment-info p {
	color: var(--text-muted);
	margin-bottom: 0.25rem;
}

.appointment-actions {
	display: flex;
	gap: 0.5rem;
}

.status-badge {
	padding: 0.25rem 0.5rem;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: 500;
	text-transform: uppercase;
}

.status-scheduled {
	background: #fff3cd;
	color: #856404;
}

.status-confirmed {
	background: #d4edda;
	color: #155724;
}

.status-completed {
	background: #d1ecf1;
	color: #0c5460;
}

.status-cancelled {
	background: #f8d7da;
	color: #721c24;
}

.progress-card {
	padding: 1rem;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	margin-bottom: 1rem;
}

.progress-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.progress-header h3 {
	margin: 0;
	color: var(--primary-color);
}

.progress-percentage {
	font-weight: 600;
	color: var(--success-color);
	font-size: 1.1rem;
}

.progress-bar {
	width: 100%;
	height: 8px;
	background: var(--border-color);
	border-radius: 4px;
	margin: 0.5rem 0;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: var(--success-color);
	transition: width 0.3s;
}

.progress-details {
	margin: 1rem 0;
}

.progress-details p {
	margin: 0.25rem 0;
	font-size: 0.9rem;
}

.completed-badge {
	color: var(--success-color);
	font-weight: 600;
}

.next-session {
	background: var(--light-color);
	padding: 0.75rem;
	border-radius: 4px;
	margin-top: 1rem;
}

.next-session p {
	margin: 0 0 0.5rem 0;
}

.session-info {
	font-size: 0.8rem;
	color: var(--text-muted);
	font-style: italic;
}

.message-card {
	padding: 1rem;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	margin-bottom: 1rem;
}

.message-card.unread {
	border-color: var(--primary-color);
	background: rgba(233, 30, 99, 0.05);
}

.message-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.5rem;
}

.sender {
	font-weight: 500;
	color: var(--primary-color);
}

.timestamp {
	font-size: 0.8rem;
	color: var(--text-muted);
}

.empty-state {
	text-align: center;
	padding: 2rem;
	color: var(--text-muted);
}

/* Modals */
.modal {
	display: none;
	position: fixed;
	z-index: 2000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
	background-color: white;
	margin: 5% auto;
	padding: 0px;
	border-radius: 12px;
	width: 90%;
	max-width: 500px;
	position: relative;
	max-height: 80vh;
	overflow-y: auto;
}

.modal-large {
	max-width: 800px;
}

.close {
	position: absolute;
	right: 1rem;
	top: 1rem;
	color: var(--text-muted);
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

.close:hover {
	color: var(--dark-color);
}

/* Forms */
.form-group {
	margin-bottom: 1rem;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--primary-color);
}

/* Password input with toggle */
.password-input-container {
	position: relative;
	display: flex;
	align-items: center;
}

.password-input-container input {
	padding-right: 3rem;
	/* Make room for the eye button */
}

.password-toggle {
	position: absolute;
	right: 0.75rem;
	background: none;
	border: none;
	cursor: pointer;
	color: #666;
	font-size: 1.2rem;
	padding: 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.password-toggle:hover {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--primary-color);
}

.password-toggle:focus {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

/* Fallback for when Bootstrap Icons don't load */
.password-toggle .fallback-eye {
	display: none;
	width: 20px;
	height: 20px;
}

.password-toggle:not(:has(.bi))::before {
	content: "👁️";
	font-size: 18px;
}

.password-toggle.hidden:not(:has(.bi))::before {
	content: "🙈";
	font-size: 18px;
}

/* Checkbox styling */
.checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	margin-top: 0.5rem !important;
}

.checkbox-label input[type="checkbox"] {
	margin-right: 0.5rem;
	width: auto !important;
	height: auto !important;
}

.checkbox-label .checkmark {
	margin-left: 0.25rem;
}

/* Booking Steps */
.booking-steps {
	margin-bottom: 2rem;
}

.step {
	display: none;
}

.step.active {
	display: block;
}

.treatment-options,
.location-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
}

.option-card {
	padding: 1rem;
	border: 2px solid var(--border-color);
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s;
	text-align: center;
}

.option-card:hover,
.option-card.selected {
	border-color: var(--primary-color);
	/* background: rgba(233, 30, 99, 0.05); */
	background: var(--primary-dark);

}

.time-slots {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 0.5rem;
	margin-top: 1rem;
}

.time-slot {
	padding: 0.5rem;
	border: 1px solid var(--border-color);
	border-radius: 4px;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s;
}

.time-slot:hover,
.time-slot.selected {
	border-color: var(--primary-color);
	background: var(--primary-color);
	color: white;
}

.time-slot.disabled {
	background: var(--light-color);
	color: var(--text-muted);
	cursor: not-allowed;
}

.step-navigation {
	display: flex;
	justify-content: space-between;
	margin-top: 2rem;
	gap: 10px;
}

/* Footer */
.footer {
	background: var(--dark-color);
	color: white;
	padding: 2rem 0;
	margin-top: 4rem;
}

.footer-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.footer-links {
	display: flex;
	gap: 2rem;
}

.footer-links a {
	color: white;
	text-decoration: none;
	transition: color 0.3s;
}

.footer-links a:hover {
	color: var(--primary-color);
}

/* Responsive Design */
@media (min-width: 769px) {
	.nav-menu {
		display: flex !important;
		position: static !important;
		width: auto !important;
		background: transparent !important;
		flex-direction: row !important;
		padding: 0 !important;
		box-shadow: none !important;
	}

	.nav-toggle {
		display: none !important;
	}
}

@media (max-width: 768px) {
	.nav-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background: white;
		flex-direction: column;
		padding: 1rem;
		box-shadow: var(--shadow);
		z-index: 1000;
	}

	.nav-menu.active {
		display: flex;
	}

	.nav-toggle {
		display: flex;
	}

	.hero-section {
		grid-template-columns: 1fr;
		text-align: center;
		padding: 2rem 1rem;
	}

	.hero-content h1 {
		font-size: 2rem;
	}

	.dashboard-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-header {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	.appointment-card {
		flex-direction: column;
		gap: 1rem;
	}

	.footer-content {
		flex-direction: column;
		gap: 1rem;
		text-align: center;
	}

	/* Enhanced modal styles for mobile */
	.modal {
		z-index: 9999;
	}

	.modal-content {
		margin: 5% auto;
		/* width: 95%; */
		max-width: none;
		/* padding: 1.5rem; */
		max-height: 85vh;
		overflow-y: auto;
		/* Ensure modal is properly positioned on mobile */
		position: relative;
		box-sizing: border-box;
	}

	/* Improve touch targets */
	.btn {
		min-height: 44px;
		padding: 12px 20px;
		font-size: 16px;
		touch-action: manipulation;
	}

	/* Fix input styling on mobile */
	input[type="email"],
	input[type="password"],
	input[type="text"],
	input[type="tel"] {
		font-size: 16px;
		/* Prevents zoom on iOS */
		padding: 12px;
		border-radius: 4px;
		border: 1px solid #ddd;
		width: 100%;
		box-sizing: border-box;
	}

	/* Close button enhancement for mobile */
	.close {
		font-size: 24px;
		padding: 5px;
		min-width: 30px;
		min-height: 30px;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #f0f0f0;
		border-radius: 50%;
		color: #666;
	}

	.form-row {
		grid-template-columns: 1fr;
	}
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
	.header {
		padding-top: env(safe-area-inset-top);
	}

	body {
		padding-bottom: env(safe-area-inset-bottom);
	}
}

/* Offline Indicator */
.offline-indicator {
	position: fixed;
	bottom: 20px;
	left: 20px;
	background: var(--warning-color);
	color: white;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	font-size: 0.9rem;
	z-index: 1000;
	display: none;
}

.offline-indicator.show {
	display: block;
}

/* Loading States */
.loading {
	text-align: center;
	padding: 2rem;
}

.spinner {
	border: 4px solid var(--border-color);
	border-top: 4px solid var(--primary-color);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 0 auto;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Message Notification Animation */
@keyframes pulse {
	0% {
		transform: scale(1);
		opacity: 1;
	}

	50% {
		transform: scale(1.1);
		opacity: 0.7;
	}

	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.message-notification {
	display: inline-block;
	background: var(--danger-color) !important;
	color: white !important;
	border-radius: 50% !important;
	padding: 2px 6px !important;
	font-size: 0.7rem !important;
	margin-left: 5px !important;
	animation: pulse 2s infinite !important;
	min-width: 18px;
	text-align: center;
}