/**
 * Orior Cosmetics - Live Search Stylesheet
 * Responsive search results dropdown and instant state cards.
 */

.orior-live-search-results {
	position: absolute;
	top: calc(100% + 12px);
	left: 0;
	right: 0;
	width: 100%;
	max-height: 70vh;
	overflow-y: auto;
	background: #ffffff;
	border-radius: var(--radius-md, 8px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(255, 255, 255, 0.1);
	z-index: 1001;
	display: none;
	scrollbar-width: thin;
	scrollbar-color: var(--color-accent-warm, #c8a882) #f1f1f1;
}

.orior-live-search-results.is-visible {
	display: block;
	animation: oriorSearchFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes oriorSearchFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Header bar */
.orior-search-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px;
	background-color: var(--color-tag-bg, #f5f0ea);
	border-bottom: 1px solid var(--color-border, #e8e8e8);
	font-size: 11px;
	color: var(--color-text-light, #666666);
}

.orior-search-header__left {
	display: flex;
	align-items: center;
	gap: 10px;
}

.orior-search-header__tag {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-primary, #1a1a1a);
}

.orior-search-header__count {
	background: rgba(0, 0, 0, 0.06);
	padding: 2px 8px;
	border-radius: 999px;
}

.orior-search-header__tip {
	font-size: 10px;
	opacity: 0.8;
}

/* Results list */
.orior-search-cards {
	display: flex;
	flex-direction: column;
}

.orior-search-card {
	display: flex;
	align-items: center;
	padding: 14px 18px;
	border-bottom: 1px solid var(--color-border, #e8e8e8);
	gap: 16px;
	transition: background-color 0.15s ease, transform 0.15s ease;
	text-decoration: none;
	color: var(--color-text-primary, #1a1a1a);
}

.orior-search-card:hover,
.orior-search-card.is-active {
	background-color: var(--color-tag-bg, #f5f0ea);
}

.orior-search-card__thumb {
	position: relative;
	width: 54px;
	height: 54px;
	flex-shrink: 0;
	border-radius: var(--radius-sm, 4px);
	overflow: hidden;
	background-color: #f0f0f0;
}

.orior-search-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.orior-search-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	color: var(--color-text-light, #666666);
}

.orior-search-card__sale-badge {
	position: absolute;
	top: 2px;
	left: 2px;
	background: var(--color-sale-badge, #d9534f);
	color: #ffffff;
	font-size: 9px;
	font-weight: 700;
	padding: 1px 4px;
	border-radius: 2px;
}

.orior-search-card__content {
	flex: 1;
	min-width: 0;
}

.orior-search-card__title {
	font-size: 14px;
	font-weight: 500;
	margin: 0 0 4px;
	color: var(--color-text-primary, #1a1a1a);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.orior-search-match {
	background-color: #ffe699;
	color: #1a1a1a;
	padding: 0 2px;
	border-radius: 2px;
}

.orior-search-card__meta {
	font-size: 11px;
	color: var(--color-text-light, #666666);
	margin-bottom: 4px;
}

.orior-search-card__excerpt {
	font-size: 12px;
	color: var(--color-text-light, #666666);
	margin: 0 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.orior-search-card__price {
	font-size: 13px;
	font-weight: 600;
	color: var(--color-accent-dark, #a0835f);
}

.orior-search-card__arrow {
	color: var(--color-text-light, #999999);
	transition: transform 0.2s ease, color 0.2s ease;
	flex-shrink: 0;
}

.orior-search-card:hover .orior-search-card__arrow,
.orior-search-card.is-active .orior-search-card__arrow {
	color: var(--color-accent-dark, #a0835f);
	transform: translateX(4px);
}

/* Footer "View all results" */
.orior-search-footer {
	padding: 12px 18px;
	background-color: var(--color-tag-bg, #f5f0ea);
	border-top: 1px solid var(--color-border, #e8e8e8);
	text-align: center;
}

.orior-search-view-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--color-text-primary, #1a1a1a);
	text-decoration: none;
	transition: color 0.15s ease;
}

.orior-search-view-all:hover {
	color: var(--color-accent-dark, #a0835f);
}

/* Loading & Empty States */
.orior-search-state {
	padding: 32px 20px;
	text-align: center;
	color: var(--color-text-light, #666666);
}

.orior-search-spinner {
	width: 24px;
	height: 24px;
	border: 2px solid var(--color-border, #e8e8e8);
	border-top-color: var(--color-accent-warm, #c8a882);
	border-radius: 50%;
	animation: oriorSearchSpin 0.7s linear infinite;
	margin: 0 auto 12px;
}

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

.orior-search-loading-text {
	font-size: 13px;
	margin: 0;
}

.orior-search-kw {
	color: var(--color-text-primary, #1a1a1a);
	font-weight: 600;
}

.orior-search-empty-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 14px;
}

.orior-search-suggestion-pill {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--color-tag-bg, #f5f0ea);
	color: var(--color-text-primary, #1a1a1a);
	font-size: 11px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid var(--color-border, #e8e8e8);
	transition: all 0.15s ease;
}

.orior-search-suggestion-pill:hover {
	background: var(--color-accent-warm, #c8a882);
	color: #ffffff;
	border-color: var(--color-accent-warm, #c8a882);
}

/* Clear button */
.search-clear-btn,
.orior-search-clear {
	position: absolute;
	right: 48px;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: none;
	font-size: 14px;
	line-height: 1;
	transition: background 0.15s ease;
}

.search-clear-btn:hover,
.orior-search-clear:hover {
	background: rgba(255, 255, 255, 0.4);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
	.orior-live-search-results {
		max-height: 60vh;
	}
	.orior-search-header__tip {
		display: none;
	}
	.orior-search-card {
		padding: 12px 14px;
		gap: 12px;
	}
	.orior-search-card__thumb {
		width: 46px;
		height: 46px;
	}
	.orior-search-card__title {
		font-size: 13px;
	}
}
