/**
 * Shop Core – Structural Overrides
 *
 * Tailwind utility classes are applied directly in widget markup.
 * This file only covers cases Tailwind cannot reach at scan time:
 *  - Elementor editor UI (admin context, no Tailwind sheet)
 *  - Review List widget (sc-rw-*)
 *
 * @package ShopCore
 */

/* ── Elementor editor placeholder ─────────────────────────────────────────
   Shown inside the Elementor panel before a product ID is set.
   Admin context: Tailwind content stylesheet is NOT loaded here. */
.sc-widget-placeholder {
	padding: 1rem;
	background: #f8f8f8;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	color: #646970;
	font-size: 0.8125rem;
	text-align: center;
	width: 100%;
}

/* ── Menu Icons ──────────────────────────────────────────────────────────── */
.sc-menu-item-icon {
	margin-inline-end: 0.5rem;
	vertical-align: middle;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sc-menu-item-text {
	vertical-align: middle;
}

/* ── Smart Search Component ──────────────────────────────────────────────── */
[data-sc-search-results] {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 9999;
}

[data-sc-search-results].is-active {
	display: block;
	animation: scSearchFadeIn 0.25s ease-out;
}

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

.sc-search-section-title {
	display: block;
	padding: 0.75rem 1rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #9ca3af;
	border-bottom: 1px solid #f3f4f6;
	margin-bottom: 0.25rem;
}

.sc-search-item {
	display: flex;
	align-items: center;
	padding: 0.75rem;
	border-radius: 0.75rem;
	transition: all 0.2s ease;
	text-decoration: none !important;
}

.sc-search-item:hover {
	background-color: #f9fafb;
}

.sc-search-item-thumb {
	flex-shrink: 0;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 0.5rem;
	object-fit: cover;
	background-color: #f3f4f6;
	margin-inline-end: 1rem;
}

.sc-search-item-content {
	flex-grow: 1;
	min-width: 0;
}

.sc-search-item-title {
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	color: #111827;
	margin-bottom: 0.125rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sc-search-item-meta {
	display: block;
	font-size: 0.75rem;
	color: #6b7280;
}

.sc-search-item-price {
	font-weight: 700;
	color: #b45309; /* Gold/Amber */
}

.sc-search-no-results {
	padding: 2rem;
	text-align: center;
	color: #9ca3af;
	font-size: 0.875rem;
}

.sc-search-view-all {
	display: block;
	padding: 0.75rem;
	text-align: center;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #4b5563;
	background-color: #f9fafb;
	border-top: 1px solid #f3f4f6;
	transition: color 0.2s;
}

.sc-search-view-all:hover {
	color: #b45309;
}

/* ── Review List Widget ──────────────────────────────────────────────────── */

.sc-rw {
	width: 100%;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color: #374151;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.sc-rw-header {
	width: 100%;
	background: #f6ebd4;
	border: 1px solid #ebd09e;
	border-radius: 6px;
	padding: 0.75rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.sc-rw-header__title {
	font-size: 1.125rem;
	font-weight: 700;
	color: #b59444;
}

.sc-rw-header__count {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #b59444;
	opacity: 0.75;
	direction: ltr;
}

/* ── Sorting Bar ─────────────────────────────────────────────────────────── */

.sc-rw-sort {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 1.5rem;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 0.75rem;
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
}

.sc-rw-sort__label {
	font-weight: 700;
	color: #374151;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.sc-rw-sort__icon {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.sc-rw-sort__tab {
	color: #6b7280;
	cursor: pointer;
	transition: color 0.2s ease;
}

.sc-rw-sort__tab:hover {
	color: #111827;
}

/* ── Main Grid ───────────────────────────────────────────────────────────── */

.sc-rw-grid {
	width: 100%;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	align-items: start;
}

@media (min-width: 768px) {
	.sc-rw-grid {
		grid-template-columns: 3fr 7fr;
	}
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.sc-rw-sidebar {
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sc-rw-sidebar__score {
	font-size: 2.25rem;
	font-weight: 800;
	color: #111827;
	margin-bottom: 0.5rem;
}

.sc-rw-sidebar__stars {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	font-size: 1.25rem;
	margin-bottom: 0.25rem;
}

.sc-rw-sidebar__stars .sc-star {
	width: 1.5rem;
	height: 1.5rem;
}

.sc-rw-sidebar__count {
	font-size: 0.75rem;
	color: #9ca3af;
	margin-bottom: 1.5rem;
}

.sc-rw-sidebar__desc {
	font-size: 0.75rem;
	color: #6b7280;
	line-height: 1.625;
	max-width: 220px;
	margin-bottom: 1.5rem;
}

.sc-rw-sidebar__btn {
	width: 100%;
	background: #dca838;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	padding: 0.625rem 1rem;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sc-rw-sidebar__btn:hover {
	background: #c9952b;
}

/* ── Reviews List ────────────────────────────────────────────────────────── */

.sc-rw-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* ── Review Card ─────────────────────────────────────────────────────────── */

.sc-rw-card {
	width: 100%;
	background: #fff;
	border: 1px solid #f3f4f6;
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	position: relative;
}

.sc-rw-card__meta {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 1rem;
}

.sc-rw-card__info {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.sc-rw-card__name {
	font-size: 0.875rem;
	font-weight: 700;
	color: #111827;
}

.sc-rw-card__stars {
	display: flex;
	align-items: center;
	gap: 0.125rem;
}

.sc-rw-card__stars .sc-star {
	width: 0.875rem;
	height: 0.875rem;
}

.sc-rw-card__date {
	font-size: 0.75rem;
	color: #9ca3af;
	font-weight: 500;
	white-space: nowrap;
}

/* ── Star Styles ─────────────────────────────────────────────────────────── */

.sc-star {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

.sc-star--filled {
	fill: #eab308;
	color: #eab308;
}

.sc-star--empty {
	fill: #d1d5db;
	color: #d1d5db;
}

/* ── Image Gallery ───────────────────────────────────────────────────────── */

.sc-rw-card__gallery {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
	margin-top: 0.5rem;
}

.sc-rw-card__thumb {
	width: 5rem;
	height: 3.5rem;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	background: #f9fafb;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.sc-rw-card__thumb:hover {
	opacity: 0.9;
}

.sc-rw-card__thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Review Text ─────────────────────────────────────────────────────────── */

.sc-rw-card__text {
	font-size: 0.75rem;
	color: #4b5563;
	line-height: 1.75;
	text-align: justify;
	letter-spacing: 0.025em;
	transition: all 0.3s ease;
}

.sc-rw-card__text.is-truncated {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Toggle Button ───────────────────────────────────────────────────────── */

.sc-rw-card__toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: #059669;
	cursor: pointer;
	margin-top: 0.75rem;
	padding-top: 0.5rem;
	transition: color 0.2s ease;
}

.sc-rw-card__toggle:hover {
	color: #047857;
}

.sc-rw-card__toggle-icon {
	width: 0.875rem;
	height: 0.875rem;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.sc-rw-card__toggle-icon.is-rotated {
	transform: rotate(180deg);
}

.sc-rw-sort__tab.is-active {
	color: #111827;
	font-weight: 700;
}

.sc-rw-list__empty {
	text-align: center;
	padding: 2rem;
	color: #9ca3af;
	font-size: 0.875rem;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */

.sc-toast-container {
	position: fixed;
	top: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	pointer-events: none;
}

.sc-toast {
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	animation: scToastIn 0.3s ease;
	min-width: 280px;
	text-align: center;
	pointer-events: auto;
	line-height: 1.5;
}

.sc-toast--success { background: #059669; color: #fff; }
.sc-toast--error   { background: #dc2626; color: #fff; }
.sc-toast--info    { background: #2563eb; color: #fff; }

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

/* ── Review Modal ────────────────────────────────────────────────────────── */

.sc-review-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.sc-review-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	animation: scFadeIn 0.2s ease;
}

.sc-review-modal__body {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	padding: 2rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
	animation: scModalIn 0.25s ease;
}

.sc-review-modal__close {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: #f3f4f6;
	border-radius: 50%;
	font-size: 1.25rem;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.2s;
}

.sc-review-modal__close:hover {
	background: #e5e7eb;
	color: #111827;
}

.sc-review-modal__title {
	font-size: 1.125rem;
	font-weight: 700;
	color: #111827;
	margin: 0 0 1.5rem;
	text-align: center;
}

@keyframes scModalIn {
	from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

/* ── Review Form ─────────────────────────────────────────────────────────── */

.sc-review-form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.sc-review-form__field {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sc-review-form__label {
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
}

.sc-review-form__textarea {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 0.875rem;
	font-family: inherit;
	line-height: 1.625;
	color: #374151;
	background: #fff;
	resize: vertical;
	transition: border-color 0.2s;
}

.sc-review-form__textarea:focus {
	outline: none;
	border-color: #dca838;
	box-shadow: 0 0 0 3px rgba(220, 168, 56, 0.15);
}

.sc-review-form__upload {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.sc-review-form__file {
	display: none;
}

.sc-review-form__file-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	border: 2px dashed #d1d5db;
	border-radius: 8px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.2s;
}

.sc-review-form__file-label:hover {
	border-color: #dca838;
	color: #dca838;
}

.sc-review-form__file-label svg {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

.sc-review-form__preview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
}

.sc-review-form__preview-item {
	width: 4rem;
	height: 4rem;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #e5e7eb;
}

.sc-review-form__preview-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sc-review-form__submit {
	width: 100%;
	padding: 0.75rem;
	border: none;
	border-radius: 8px;
	background: #dca838;
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s;
}

.sc-review-form__submit:hover {
	background: #c9952b;
}

.sc-review-form__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ── Star Input ──────────────────────────────────────────────────────────── */

.sc-star-input {
	display: flex;
	flex-direction: row;
	gap: 0.25rem;
	direction: ltr;
}

.sc-star-input__star {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}

.sc-star-input__star:hover {
	transform: scale(1.15);
}

.sc-star-input__star svg {
	width: 1.75rem;
	height: 1.75rem;
	fill: #d1d5db;
	color: #d1d5db;
	transition: fill 0.15s ease, color 0.15s ease;
}

.sc-star-input__star.is-active svg,
.sc-star-input__star.is-hover svg {
	fill: #eab308;
	color: #eab308;
}

/* ── Lightbox ─────────────────────────────────────────────────────────────── */

.sc-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.85);
	animation: scFadeIn 0.2s ease;
	cursor: zoom-out;
}

.sc-lightbox.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

.sc-lightbox__img {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
	animation: scLightboxIn 0.25s ease;
	cursor: default;
}

.sc-lightbox__close {
	position: absolute;
	top: 1rem;
	left: 1rem;
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	font-size: 1.5rem;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s;
}

.sc-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.sc-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	font-size: 1.25rem;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s;
}

.sc-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.3);
}

.sc-lightbox__nav--prev {
	right: 1rem;
}

.sc-lightbox__nav--next {
	left: 1rem;
}

@keyframes scLightboxIn {
	from { opacity: 0; transform: scale(0.92); }
	to   { opacity: 1; transform: scale(1); }
}


