/* WP Barcode Price Match — frontend
   Renkleri değiştirmek için yalnızca .wpbpm altındaki değişkenleri düzenleyin. */

.wpbpm {
	--wpbpm-accent: #0b7a4b;
	--wpbpm-accent-hover: #09663e;
	--wpbpm-accent-soft: #e6f5ed;
	--wpbpm-ink: #1b2430;
	--wpbpm-muted: #667085;
	--wpbpm-line: #e6e9ee;
	--wpbpm-soft: #f5f6f8;
	--wpbpm-card: #ffffff;
	--wpbpm-bad: #b42318;
	--wpbpm-bad-soft: #fdecea;
	--wpbpm-radius: 22px;
	--wpbpm-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 16px 36px -18px rgba(16, 24, 40, .22);

	max-width: 760px;
	margin: 0 auto;
	color: var(--wpbpm-ink);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	text-align: left;
}

.wpbpm *, .wpbpm *::before, .wpbpm *::after { box-sizing: border-box; }
.wpbpm [hidden] { display: none !important; }

/* ---------- Kart iskeleti ---------- */
.wpbpm .wpbpm__panel,
.wpbpm .wpbpm__card {
	background: var(--wpbpm-card);
	border: 1px solid var(--wpbpm-line);
	border-radius: var(--wpbpm-radius);
	box-shadow: var(--wpbpm-shadow);
	padding: 20px;
}

/* ---------- Başlık ---------- */
.wpbpm .wpbpm__head { display: flex; align-items: center; gap: 14px; }
.wpbpm .wpbpm__logo {
	flex: none; display: grid; place-items: center;
	width: 48px; height: 48px; border-radius: 15px;
	background: var(--wpbpm-accent); color: #fff;
}
.wpbpm .wpbpm__title { margin: 0; padding: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; color: var(--wpbpm-ink); }
.wpbpm .wpbpm__sub { margin: 4px 0 0; font-size: .925rem; color: var(--wpbpm-muted); }

/* ---------- Eylem kutuları ---------- */
.wpbpm .wpbpm__actions { display: grid; gap: 12px; margin-top: 20px; }

.wpbpm .wpbpm__tile {
	position: relative; display: flex; align-items: center; gap: 14px; width: 100%;
	margin: 0; padding: 16px; border: 1px solid var(--wpbpm-line); border-radius: 18px;
	background: var(--wpbpm-soft); color: var(--wpbpm-ink);
	font: inherit; text-align: left; text-transform: none; letter-spacing: normal;
	cursor: pointer; -webkit-tap-highlight-color: transparent;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.wpbpm .wpbpm__tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(16, 24, 40, .35); border-color: #d5dae2; }
.wpbpm .wpbpm__tile:active { transform: scale(.985); }
.wpbpm .wpbpm__tile:focus-visible,
.wpbpm .wpbpm__tile:focus-within { outline: 3px solid rgba(11, 122, 75, .35); outline-offset: 2px; }
.wpbpm .wpbpm__tile.is-drag { border-color: var(--wpbpm-accent); border-style: dashed; background: var(--wpbpm-accent-soft); }

.wpbpm .wpbpm__tile-ico {
	flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
	background: #fff; color: var(--wpbpm-accent); border: 1px solid var(--wpbpm-line);
}
.wpbpm .wpbpm__tile-text { display: flex; flex-direction: column; min-width: 0; }
.wpbpm .wpbpm__tile-title { font-weight: 650; font-size: 1rem; line-height: 1.3; }
.wpbpm .wpbpm__tile-desc { font-size: .85rem; color: var(--wpbpm-muted); }

.wpbpm .wpbpm__tile--primary { background: var(--wpbpm-accent); border-color: var(--wpbpm-accent); color: #fff; box-shadow: 0 14px 26px -16px rgba(11, 122, 75, .85); }
.wpbpm .wpbpm__tile--primary:hover { background: var(--wpbpm-accent-hover); border-color: var(--wpbpm-accent-hover); }
.wpbpm .wpbpm__tile--primary .wpbpm__tile-ico { background: rgba(255, 255, 255, .16); border-color: transparent; color: #fff; }
.wpbpm .wpbpm__tile--primary .wpbpm__tile-desc { color: rgba(255, 255, 255, .82); }

/* Dosya girdisi / ekran okuyucu metni: görsel olarak gizli ama erişilebilir */
.wpbpm .wpbpm__file, .wpbpm .wpbpm__sr {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Kamera ---------- */
.wpbpm .wpbpm__camera { margin-top: 16px; }
.wpbpm .wpbpm__reader { position: relative; min-height: 220px; overflow: hidden; border-radius: 18px; background: #101828; }
.wpbpm .wpbpm__reader video { display: block; width: 100% !important; height: auto; }
.wpbpm .wpbpm__reader::after {
	content: ""; position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; border-radius: 2px;
	background: linear-gradient(90deg, transparent, #4ade80, transparent);
	box-shadow: 0 0 12px rgba(74, 222, 128, .8);
	animation: wpbpm-scan 2.2s ease-in-out infinite; pointer-events: none;
}
.wpbpm .wpbpm__camera-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.wpbpm .wpbpm__hint { font-size: .875rem; color: var(--wpbpm-muted); }

/* ---------- Butonlar & girdi ---------- */
.wpbpm .wpbpm__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0;
	min-height: 46px; padding: 0 18px; border: 1px solid var(--wpbpm-accent); border-radius: 13px;
	background: var(--wpbpm-accent); color: #fff; font: inherit; font-weight: 650; line-height: 1;
	text-transform: none; letter-spacing: normal; text-decoration: none; cursor: pointer;
	transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.wpbpm .wpbpm__btn:hover { background: var(--wpbpm-accent-hover); }
.wpbpm .wpbpm__btn:active { transform: scale(.97); }
.wpbpm .wpbpm__btn:focus-visible { outline: 3px solid rgba(11, 122, 75, .35); outline-offset: 2px; }
.wpbpm .wpbpm__btn--ghost { background: var(--wpbpm-soft); border-color: var(--wpbpm-line); color: var(--wpbpm-ink); }
.wpbpm .wpbpm__btn--ghost:hover { background: #eceef2; }

.wpbpm .wpbpm__manual { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--wpbpm-line); }
.wpbpm .wpbpm__manual-label { display: block; margin: 0 0 8px; font-size: .875rem; color: var(--wpbpm-muted); }
.wpbpm .wpbpm__manual-row { display: flex; gap: 8px; }
.wpbpm .wpbpm__input {
	flex: 1; min-width: 0; height: 46px; margin: 0; padding: 0 14px; border: 1px solid var(--wpbpm-line); border-radius: 13px;
	background: #fff; color: var(--wpbpm-ink); font: inherit; font-size: 16px; /* iOS yakınlaştırmasını önler */
	font-variant-numeric: tabular-nums; letter-spacing: .04em; box-shadow: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.wpbpm .wpbpm__input:focus { outline: none; border-color: var(--wpbpm-accent); box-shadow: 0 0 0 4px rgba(11, 122, 75, .15); }
.wpbpm .wpbpm__manual-row .wpbpm__btn { flex: none; }

/* ---------- Sonuçlar ---------- */
.wpbpm .wpbpm__results { margin-top: 20px; scroll-margin-top: 16px; }
.wpbpm .wpbpm__results:empty { margin-top: 0; }
.wpbpm .wpbpm__card { animation: wpbpm-in .32s ease both; }

.wpbpm .wpbpm__top { display: flex; gap: 16px; align-items: flex-start; }
.wpbpm .wpbpm__media {
	flex: none; display: grid; place-items: center; width: 92px; height: 92px; overflow: hidden;
	border-radius: 16px; background: var(--wpbpm-soft); border: 1px solid var(--wpbpm-line); color: #98a2b3;
}
.wpbpm .wpbpm__media img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.wpbpm .wpbpm__info { flex: 1; min-width: 0; }
.wpbpm .wpbpm__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.wpbpm .wpbpm__chip { padding: 3px 10px; border-radius: 999px; background: var(--wpbpm-soft); color: var(--wpbpm-muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.wpbpm .wpbpm__chip--demo { background: #fff4e5; color: #9a5b00; }
.wpbpm .wpbpm__name {
	margin: 0 0 12px; padding: 0; font-size: 1.1rem; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; color: var(--wpbpm-ink);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.wpbpm .wpbpm__badge {
	display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 8px 14px;
	border-radius: 14px; background: var(--wpbpm-accent-soft); color: var(--wpbpm-accent);
}
.wpbpm .wpbpm__badge small { font-size: .8rem; font-weight: 500; }
.wpbpm .wpbpm__badge strong { font-size: 1.3rem; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.wpbpm .wpbpm__subhead { margin: 20px 0 10px; font-size: .9rem; font-weight: 650; color: var(--wpbpm-muted); }
.wpbpm .wpbpm__offers { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.wpbpm .wpbpm__offer {
	display: grid; grid-template-columns: 1fr auto; grid-template-areas: "store price" "go go";
	align-items: center; gap: 10px 12px; margin: 0; padding: 12px; border: 1px solid var(--wpbpm-line); border-radius: 16px; background: #fff;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.wpbpm .wpbpm__offer:hover { border-color: #d5dae2; box-shadow: 0 8px 20px -16px rgba(16, 24, 40, .4); }
.wpbpm .wpbpm__offer.is-best { border-color: rgba(11, 122, 75, .4); background: #fafdfb; }
.wpbpm .wpbpm__store { grid-area: store; display: flex; align-items: center; gap: 10px; min-width: 0; }
.wpbpm .wpbpm__avatar { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--wpbpm-soft); color: var(--wpbpm-ink); font-weight: 700; }
.wpbpm .wpbpm__offer.is-best .wpbpm__avatar { background: var(--wpbpm-accent-soft); color: var(--wpbpm-accent); }
.wpbpm .wpbpm__store-meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.wpbpm .wpbpm__store-name { font-weight: 600; overflow-wrap: anywhere; }
.wpbpm .wpbpm__tag { margin-top: 1px; padding: 1px 8px; border-radius: 999px; background: var(--wpbpm-accent); color: #fff; font-size: .72rem; font-weight: 600; }
.wpbpm .wpbpm__price { grid-area: price; font-size: 1.08rem; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wpbpm .wpbpm__go {
	grid-area: go; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
	border-radius: 13px; background: var(--wpbpm-ink); color: #fff; font-weight: 650; text-decoration: none; box-shadow: none; border: 0;
	transition: background-color .18s ease, transform .18s ease;
}
.wpbpm .wpbpm__go:hover { background: var(--wpbpm-accent); color: #fff; }
.wpbpm .wpbpm__go:active { transform: scale(.97); }
.wpbpm .wpbpm__go:focus-visible { outline: 3px solid rgba(11, 122, 75, .35); outline-offset: 2px; }
.wpbpm .wpbpm__note { margin: 16px 2px 0; font-size: .8rem; color: var(--wpbpm-muted); }

/* ---------- Hata kartı ---------- */
.wpbpm .wpbpm__error { display: flex; gap: 14px; align-items: flex-start; }
.wpbpm .wpbpm__error-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--wpbpm-bad-soft); color: var(--wpbpm-bad); }
.wpbpm .wpbpm__error-title { margin: 0 0 2px; padding: 0; font-size: 1rem; font-weight: 700; color: var(--wpbpm-ink); }
.wpbpm .wpbpm__error-text { margin: 0; color: var(--wpbpm-muted); font-size: .925rem; }

/* ---------- Skeleton ---------- */
.wpbpm .wpbpm__sk {
	border-radius: 12px;
	background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%);
	background-size: 400% 100%; animation: wpbpm-shimmer 1.4s ease infinite;
}
.wpbpm .wpbpm__sk--img { width: 92px; height: 92px; border-radius: 16px; }
.wpbpm .wpbpm__sk--pill { width: 90px; height: 20px; margin-bottom: 12px; border-radius: 999px; }
.wpbpm .wpbpm__sk--line { height: 16px; margin-bottom: 10px; }
.wpbpm .wpbpm__sk--short { width: 60%; }
.wpbpm .wpbpm__sk--row { height: 64px; border-radius: 16px; }
.wpbpm .wpbpm__sk-card .wpbpm__offers { margin-top: 20px; }

/* ---------- Reklam ---------- */
.wpbpm .wpbpm__ad { margin: 16px 0; text-align: center; overflow: hidden; }
.wpbpm .wpbpm__ad::before { content: "Reklam"; display: block; margin-bottom: 4px; font-size: .72rem; color: var(--wpbpm-muted); }

/* ---------- Animasyonlar ---------- */
@keyframes wpbpm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes wpbpm-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes wpbpm-scan { 0%, 100% { top: 30%; } 50% { top: 70%; } }

/* ---------- Geniş ekran ---------- */
@media (min-width: 600px) {
	.wpbpm .wpbpm__panel, .wpbpm .wpbpm__card { padding: 28px; }
	.wpbpm .wpbpm__title { font-size: 1.5rem; }
	.wpbpm .wpbpm__actions { grid-template-columns: 1fr 1fr; }
	.wpbpm .wpbpm__media, .wpbpm .wpbpm__sk--img { width: 120px; height: 120px; }
	.wpbpm .wpbpm__name { font-size: 1.25rem; }
	.wpbpm .wpbpm__offer { grid-template-columns: 1fr auto auto; grid-template-areas: "store price go"; gap: 16px; padding: 12px 12px 12px 16px; }
	.wpbpm .wpbpm__go { min-height: 42px; }
}

/* ---------- Hareketi azalt ---------- */
@media (prefers-reduced-motion: reduce) {
	.wpbpm *, .wpbpm *::before, .wpbpm *::after { animation: none !important; transition: none !important; }
}


/* ---------- v1.1: durum satırı, uyarılar, bağlantı çipleri ---------- */
.wpbpm .wpbpm__offscreen { position: absolute; left: -9999px; top: 0; width: 640px; height: 480px; overflow: hidden; visibility: hidden; }

.wpbpm .wpbpm__status { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--wpbpm-soft); font-size: .9rem; color: var(--wpbpm-ink); }
.wpbpm .wpbpm__status-text { flex: 1; min-width: 0; }
.wpbpm .wpbpm__thumb { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--wpbpm-line); }
.wpbpm .wpbpm__btn--small { min-height: 36px; padding: 0 12px; border-radius: 11px; font-size: .85rem; }

.wpbpm .wpbpm__alert { margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff7e6; color: #7a4b00; font-size: .875rem; }
.wpbpm .wpbpm__alert--admin { background: #eef4ff; color: #1d3f8f; }

.wpbpm .wpbpm__links { display: flex; flex-wrap: wrap; gap: 8px; }
.wpbpm .wpbpm__link {
	display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--wpbpm-line); border-radius: 999px;
	background: #fff; color: var(--wpbpm-ink); font-size: .9rem; font-weight: 600; text-decoration: none; box-shadow: none;
	transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.wpbpm .wpbpm__link:hover { border-color: var(--wpbpm-accent); background: var(--wpbpm-accent-soft); color: var(--wpbpm-accent); }
.wpbpm .wpbpm__link:active { transform: scale(.97); }
.wpbpm .wpbpm__link:focus-visible { outline: 3px solid rgba(11, 122, 75, .35); outline-offset: 2px; }

.wpbpm .wpbpm__store-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.wpbpm .wpbpm__label { margin-top: 1px; max-width: 100%; font-size: .8rem; color: var(--wpbpm-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wpbpm .wpbpm__store-meta { align-items: stretch; }


/* ---------- v1.2: kendi video elemanımız ---------- */
.wpbpm .wpbpm__reader { min-height: 240px; }
.wpbpm .wpbpm__video { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: cover; background: #101828; }
.wpbpm .wpbpm__reader::before {
	content: ""; position: absolute; left: 8%; right: 8%; top: 28%; bottom: 28%; z-index: 1; pointer-events: none;
	border: 2px solid rgba(255, 255, 255, .85); border-radius: 14px; box-shadow: 0 0 0 9999px rgba(16, 24, 40, .38);
}
.wpbpm .wpbpm__camera-btns { display: inline-flex; gap: 8px; flex: none; }
.wpbpm .wpbpm__camera-bar { flex-wrap: wrap; }
.wpbpm .wpbpm__hint { flex: 1 1 160px; }


/* ---------- v1.5: çevrim içi mağaza satırları ---------- */
.wpbpm .wpbpm__stores { margin-top: 20px; }
.wpbpm .wpbpm__offer--store.is-loading .wpbpm__price { color: var(--wpbpm-muted); font-weight: 500; }
.wpbpm .wpbpm__offer--store.is-loading .wpbpm__label {
	width: 9em; height: 12px; border-radius: 6px; color: transparent;
	background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 37%, #eef0f3 63%); background-size: 400% 100%; animation: wpbpm-shimmer 1.4s ease infinite;
}
.wpbpm .wpbpm__price.is-muted { color: var(--wpbpm-muted); font-weight: 500; }
.wpbpm .wpbpm__go--ghost { background: #fff; color: var(--wpbpm-ink); border: 1px solid var(--wpbpm-line); }
.wpbpm .wpbpm__go--ghost:hover { background: var(--wpbpm-accent-soft); color: var(--wpbpm-accent); border-color: var(--wpbpm-accent); }
