/* MyLayover Flight Search - Main Styles */

.mylayover-flight-search-wrapper {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 40px 20px;
	border-radius: 12px;
	margin: 20px 0;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.mylayover-flight-search-container {
	max-width: 1000px;
	margin: 0 auto;
	background: white;
	border-radius: 12px;
	padding: 40px;
	box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}

/* Title */
.mylayover-search-title {
	text-align: center;
	color: #333;
	margin-bottom: 30px;
	font-size: 28px;
	font-weight: 600;
	letter-spacing: -0.5px;
}

/* Form Styles */
.mylayover-flight-search-form {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

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

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

.form-group {
	display: flex;
	flex-direction: column;
}

.form-group label {
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
	font-size: 14px;
	letter-spacing: 0.3px;
}

.label-icon {
	margin-right: 6px;
	font-size: 16px;
}

.form-input {
	padding: 12px 16px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 14px;
	transition: all 0.3s ease;
	font-family: inherit;
}

.form-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
	background-color: #f9f9ff;
}

.form-input::placeholder {
	color: #999;
}

.form-hint {
	font-size: 12px;
	color: #999;
	margin-top: 4px;
}

/* Buttons */
.form-actions {
	display: flex;
	justify-content: center;
	margin-top: 15px;
}

.btn {
	padding: 14px 40px;
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 10px;
}

.btn-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
	min-width: 200px;
	justify-content: center;
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
	transform: translateY(0);
}

.btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.btn-text {
	display: inline;
}

.btn-loader {
	font-size: 14px;
}

/* Alerts */
.alert {
	padding: 16px 20px;
	border-radius: 8px;
	margin: 20px 0;
	display: flex;
	align-items: center;
	gap: 12px;
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.alert-error {
	background-color: #fee;
	border: 1px solid #fcc;
	color: #c33;
}

.alert-error::before {
	content: "⚠️";
	font-size: 18px;
}

.alert-success {
	background-color: #efe;
	border: 1px solid #cfc;
	color: #3c3;
}

.alert-success::before {
	content: "✓";
	font-size: 18px;
}

/* Results */
.mylayover-results-container {
	margin-top: 40px;
	animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.results-header {
	margin-bottom: 25px;
	border-bottom: 2px solid #f0f0f0;
	padding-bottom: 15px;
}

.results-title {
	font-size: 20px;
	font-weight: 600;
	color: #333;
	margin: 0 0 8px 0;
}

.results-summary {
	color: #666;
	font-size: 14px;
	margin: 0;
}

.results-table-wrapper {
	overflow-x: auto;
	margin-bottom: 25px;
	border-radius: 8px;
	border: 1px solid #e0e0e0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.results-table thead {
	background-color: #f8f9fa;
	border-bottom: 2px solid #e0e0e0;
}

.results-table th {
	padding: 16px;
	text-align: left;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
}

.results-table th.sortable {
	cursor: pointer;
	user-select: none;
	position: relative;
	padding-right: 25px;
}

.results-table th.sortable:hover {
	background-color: #eef0ff;
}

.sort-indicator {
	position: absolute;
	right: 8px;
	color: #ccc;
	font-size: 12px;
}

.results-table th.sorted .sort-indicator {
	color: #667eea;
}

.results-table th.sort-asc .sort-indicator::after {
	content: "↑";
}

.results-table th.sort-desc .sort-indicator::after {
	content: "↓";
}

.results-table td {
	padding: 14px 16px;
	border-bottom: 1px solid #f0f0f0;
	color: #555;
}

.results-table tbody tr {
	transition: background-color 0.2s ease;
}

.results-table tbody tr:hover {
	background-color: #f9f9ff;
}

.results-table tbody tr:last-child td {
	border-bottom: none;
}

.price-cell {
	font-weight: 600;
	color: #667eea;
	font-size: 16px;
}

.price-currency {
	font-size: 12px;
	color: #999;
	margin-left: 2px;
}

.airline-cell {
	font-weight: 500;
	color: #333;
}

.airline-code {
	font-size: 12px;
	color: #999;
	margin-left: 6px;
}

.time-cell {
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 13px;
	color: #333;
	font-weight: 500;
}

.duration-cell {
	color: #666;
	font-weight: 500;
}

.stops-cell {
	text-align: center;
	padding: 14px 16px;
}

.stops-badge {
	display: inline-block;
	background-color: #eef0ff;
	color: #667eea;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
}

.stops-badge.nonstop {
	background-color: #efe;
	color: #3c3;
}

.btn-view {
	padding: 8px 14px;
	font-size: 12px;
	background-color: #667eea;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: all 0.2s ease;
}

.btn-view:hover {
	background-color: #764ba2;
	transform: scale(1.05);
}

.btn-view:active {
	transform: scale(0.98);
}

.btn-view.external {
	background-color: #666;
}

.btn-view.external:hover {
	background-color: #333;
}

/* Results Footer */
.results-footer {
	text-align: center;
	padding-top: 20px;
	border-top: 1px solid #f0f0f0;
	color: #999;
	font-size: 13px;
}

.results-note {
	margin: 0;
}

.new-search-link {
	color: #667eea;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
}

.new-search-link:hover {
	color: #764ba2;
}

/* Empty State */
.empty-state {
	text-align: center;
	padding: 60px 40px;
	color: #999;
}

.empty-state-icon {
	font-size: 48px;
	margin-bottom: 20px;
	opacity: 0.5;
}

.empty-state h4 {
	font-size: 18px;
	color: #666;
	margin: 15px 0;
}

.empty-state p {
	margin: 0;
	font-size: 14px;
}

/* Loading State */
.loading-state {
	text-align: center;
	padding: 40px;
	color: #667eea;
}

.loading-spinner {
	display: inline-block;
	width: 30px;
	height: 30px;
	border: 3px solid rgba(102, 126, 234, 0.2);
	border-top-color: #667eea;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-right: 10px;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.mylayover-flight-search-container {
		padding: 25px;
	}
	
	.mylayover-search-title {
		font-size: 22px;
		margin-bottom: 20px;
	}
	
	.form-row {
		gap: 15px;
	}
	
	.results-table {
		font-size: 12px;
	}
	
	.results-table th,
	.results-table td {
		padding: 10px 8px;
	}
	
	.btn {
		padding: 12px 30px;
		font-size: 14px;
	}
	
	.btn-primary {
		min-width: 100%;
	}
}

@media (max-width: 480px) {
	.mylayover-flight-search-wrapper {
		padding: 20px 10px;
	}
	
	.mylayover-flight-search-container {
		padding: 20px;
		border-radius: 8px;
	}
	
	.mylayover-search-title {
		font-size: 18px;
		margin-bottom: 15px;
	}
	
	.form-row {
		gap: 10px;
	}
	
	.results-table-wrapper {
		border-radius: 6px;
	}
	
	.results-table th,
	.results-table td {
		padding: 8px 6px;
		font-size: 11px;
	}
	
	.price-cell {
		font-size: 14px;
	}
	
	.btn-view {
		padding: 6px 10px;
		font-size: 11px;
	}
}
