/**
 * Phantom Realty Engine - Template Styles
 * Centralized CSS for all template inline styles
 * Moved from inline <style> blocks for performance and maintainability
 * @brand Beaver Builder First - Professional Frontend Experience
 */

/* =============================================================================
   BEAVER BUILDER INTEGRATION - TEMPLATE ARCHITECTURE
   ============================================================================= */
.fl-builder-content .phantom-search-horizontal {
	margin: 0 auto;
	width: 100%;
}

.fl-module-phantom-search .phantom-search-horizontal {
	padding: 0; /* Let Beaver Builder handle padding */
}

/* ========================================
   SEARCH FORMS - HORIZONTAL LAYOUT
   ======================================== */

.phantom-search-horizontal {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	font-family: inherit;
}

.phantom-search-header {
	text-align: center;
	margin-bottom: 40px;
}

.phantom-search-title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--phantom-primary, #2563eb);
	margin: 0 0 16px 0;
}

.phantom-search-subtitle {
	font-size: 1.125rem;
	color: #64748b;
	margin: 0;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.phantom-search-form {
	background: white;
	border-radius: 16px;
	padding: 32px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
		0 10px 10px -5px rgba(0, 0, 0, 0.04);
	border: 1px solid #e2e8f0;
}

.phantom-search-row {
	display: grid;
	grid-template-columns: 2fr 1fr 1.5fr 1fr auto;
	gap: 20px;
	align-items: end;
}

.phantom-field {
	position: relative;
}

.phantom-field-inner {
	position: relative;
}

.phantom-field label {
	display: flex;
	align-items: center;
	font-weight: 600;
	color: #374151;
	margin-bottom: 8px;
	font-size: 0.875rem;
}

.phantom-icon {
	width: 16px;
	height: 16px;
	margin-right: 8px;
	opacity: 0.7;
}

.phantom-field input,
.phantom-field select {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	font-size: 1rem;
	transition: all 0.2s ease;
	background: white;
}

.phantom-field input:focus,
.phantom-field select:focus {
	outline: none;
	border-color: var(--phantom-primary, #2563eb);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.phantom-price-range {
	display: flex;
	align-items: center;
	gap: 8px;
}

.phantom-price-range select {
	flex: 1;
}

.phantom-separator {
	color: #9ca3af;
	font-size: 0.875rem;
}

.phantom-search-btn {
	background: var(--phantom-primary, #2563eb);
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.phantom-search-btn:hover {
	background: #1d4ed8;
	transform: translateY(-1px);
}

.phantom-advanced-toggle {
	text-align: center;
	margin-top: 24px;
}

.phantom-toggle-btn {
	background: transparent;
	border: none;
	color: var(--phantom-primary, #2563eb);
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 auto;
	padding: 8px 16px;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.phantom-toggle-btn:hover {
	background: #f1f5f9;
}

.phantom-advanced-filters {
	margin-top: 24px;
	padding: 24px;
	background: #f8fafc;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
}

.phantom-advanced-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 20px;
}

.phantom-sqft-range {
	display: flex;
	align-items: center;
	gap: 8px;
}

.phantom-sqft-range input {
	flex: 1;
}

.phantom-features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 12px;
}

.phantom-checkbox {
	display: flex;
	align-items: center;
	cursor: pointer;
	padding: 8px;
	border-radius: 6px;
	transition: background 0.2s ease;
}

.phantom-checkbox:hover {
	background: #f1f5f9;
}

.phantom-checkbox input {
	margin-right: 8px;
	width: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
	.phantom-search-row {
		grid-template-columns: 1fr 1fr 1fr;
		gap: 16px;
	}

	.phantom-field-submit {
		grid-column: span 3;
	}
}

@media (max-width: 768px) {
	.phantom-search-row {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.phantom-field-submit {
		grid-column: span 1;
	}

	.phantom-search-title {
		font-size: 2rem;
	}
}

/* ========================================
   SEARCH FORMS - VERTICAL SIDEBAR
   ======================================== */

.phantom-search-vertical {
	background: white;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	border: 1px solid #e5e7eb;
}

.phantom-search-vertical .phantom-field {
	margin-bottom: 20px;
}

.phantom-search-vertical .phantom-field:last-child {
	margin-bottom: 0;
}

.phantom-search-vertical .phantom-search-btn {
	width: 100%;
	justify-content: center;
}

/* ========================================
   SEARCH FORMS - MAP BASED
   ======================================== */

.phantom-search-map-container {
	position: relative;
	height: 600px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.phantom-map-overlay {
	position: absolute;
	top: 20px;
	left: 20px;
	right: 20px;
	z-index: 1000;
	background: white;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.phantom-map-overlay .phantom-search-row {
	grid-template-columns: 2fr 1fr 1fr auto;
}

/* ========================================
   SEARCH FORMS - MOBILE OPTIMIZED
   ======================================== */

.phantom-search-mobile {
	padding: 16px;
}

.phantom-search-mobile .phantom-search-form {
	padding: 20px;
	border-radius: 12px;
}

.phantom-search-mobile .phantom-field {
	margin-bottom: 16px;
}

.phantom-search-mobile .phantom-search-row {
	display: block;
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */

.phantom-dashboard-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.phantom-dashboard-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 40px;
	border-radius: 12px;
	margin-bottom: 30px;
}

.phantom-dashboard-nav {
	display: flex;
	gap: 16px;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.phantom-nav-item {
	padding: 12px 24px;
	background: white;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	text-decoration: none;
	color: #374151;
	font-weight: 600;
	transition: all 0.2s ease;
}

.phantom-nav-item:hover,
.phantom-nav-item.active {
	border-color: var(--phantom-primary, #2563eb);
	color: var(--phantom-primary, #2563eb);
	background: #f8fafc;
}

.phantom-dashboard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 20px;
}

.phantom-dashboard-card {
	background: white;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	border: 1px solid #e5e7eb;
}

.phantom-dashboard-card h3 {
	margin: 0 0 16px 0;
	color: #1f2937;
	font-size: 1.25rem;
}

/* ========================================
   CAROUSEL STYLES
   ======================================== */

.phantom-carousel-container {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
}

.phantom-carousel-track {
	display: flex;
	transition: transform 0.3s ease;
}

.phantom-carousel-slide {
	flex: 0 0 auto;
	width: 300px;
	margin-right: 20px;
}

.phantom-carousel-controls {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.9);
	border: none;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.phantom-carousel-prev {
	left: 10px;
}

.phantom-carousel-next {
	right: 10px;
}

/* ========================================
   FAVORITES LIST STYLES
   ======================================== */

.phantom-favorites-list {
	background: white;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.phantom-favorites-item {
	display: flex;
	align-items: center;
	padding: 16px;
	border-bottom: 1px solid #e5e7eb;
	transition: background 0.2s ease;
}

.phantom-favorites-item:hover {
	background: #f8fafc;
}

.phantom-favorites-item:last-child {
	border-bottom: none;
}

/* ========================================
   ADMIN STYLES
   ======================================== */

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

.phantom-admin-header {
	background: white;
	padding: 24px;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
}

.phantom-admin-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
	gap: 20px;
}

.phantom-admin-card {
	background: white;
	border-radius: 8px;
	padding: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   EMAIL TEMPLATE STYLES
   ======================================== */

.phantom-email-container {
	max-width: 600px;
	margin: 0 auto;
	font-family: Arial, sans-serif;
	background: #ffffff;
}

.phantom-email-header {
	background: #2563eb;
	color: white;
	padding: 30px;
	text-align: center;
}

.phantom-email-content {
	padding: 30px;
	line-height: 1.6;
}

.phantom-email-button {
	display: inline-block;
	background: #2563eb;
	color: white;
	padding: 12px 24px;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	margin: 20px 0;
}

.phantom-email-footer {
	background: #f8fafc;
	padding: 20px;
	text-align: center;
	font-size: 14px;
	color: #6b7280;
}

/* ========================================
   TEMPLATE SELECTOR STYLES
   ======================================== */

.phantom-template-selector {
	max-width: 1000px;
	margin: 20px 0;
}

.phantom-template-categories {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.phantom-category-btn {
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	padding: 8px 16px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
}

.phantom-category-btn.active,
.phantom-category-btn:hover {
	background: #2563eb;
	color: white;
	border-color: #2563eb;
}

.phantom-template-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
}

.phantom-template-card {
	background: white;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.2s ease;
}

.phantom-template-card:hover {
	border-color: #2563eb;
	box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.1);
}

.phantom-template-preview {
	position: relative;
	height: 200px;
	background: #f9fafb;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.phantom-template-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.phantom-template-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.phantom-template-card:hover .phantom-template-overlay {
	opacity: 1;
}

.phantom-preview-btn {
	background: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}

.phantom-template-info {
	padding: 20px;
}

.phantom-template-info h3 {
	font-size: 1.125rem;
	font-weight: 700;
	color: #1f2937;
	margin: 0 0 8px 0;
}

.phantom-template-info p {
	color: #6b7280;
	margin: 0 0 16px 0;
	font-size: 0.875rem;
	line-height: 1.5;
}

.phantom-template-features {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
}

.phantom-feature-tag {
	background: #eff6ff;
	color: #2563eb;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 500;
}

.phantom-template-actions {
	display: flex;
	justify-content: flex-end;
}

.phantom-template-actions input[type="radio"] {
	display: none;
}

.phantom-select-btn {
	background: #2563eb;
	color: white;
	border: none;
	padding: 10px 24px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.phantom-template-actions input[type="radio"]:checked + .phantom-select-btn {
	background: #059669;
}

.phantom-select-btn:hover {
	background: #1d4ed8;
}

.phantom-template-card[data-category]:not([data-category="all"]) {
	display: block;
}

.phantom-template-card.hidden {
	display: none;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.phantom-text-center {
	text-align: center;
}

.phantom-mb-4 {
	margin-bottom: 1rem;
}

.phantom-mt-4 {
	margin-top: 1rem;
}

.phantom-hidden {
	display: none;
}

.phantom-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ========================================
   CUSTOM PROPERTY DEFINITIONS
   ======================================== */

:root {
	--phantom-primary: #2563eb;
	--phantom-secondary: #64748b;
	--phantom-accent: #f8fafc;
	--phantom-success: #10b981;
	--phantom-warning: #f59e0b;
	--phantom-error: #ef4444;
	--phantom-border-radius: 8px;
	--phantom-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
