/**
 * Popato Core — module styles.
 * Consumes the theme's design tokens, with fallbacks so the plugin still looks
 * right if it is ever activated on a different theme.
 */

.pop-announcement {
	background: var(--pop-ink, #000000);
	color: var(--pop-cream, #ffffff);
	font-size: 12.5px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	text-align: center;
	padding: 10px 16px;
}
.pop-announcement__inner { max-width: 1200px; margin-inline: auto; }
.pop-announcement p { margin: 0; }
.pop-announcement strong { color: var(--pop-sand, #e5e5e5); }

/* ==========================================================================
   USP list, urgency, trust
   ========================================================================== */

.pop-usp {
	list-style: none;
	margin: 18px 0;
	padding: 0;
	display: grid;
	gap: 9px;
}
.pop-usp__item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14.5px;
	color: var(--pop-body, #333333);
}
.pop-usp__icon {
	flex: 0 0 auto;
	width: 18px; height: 18px;
	border-radius: 50%;
	background: var(--pop-success-bg, #f7f7f7);
	position: relative;
}
.pop-usp__icon::after {
	content: "";
	position: absolute;
	left: 6px; top: 3px;
	width: 4px; height: 9px;
	border: solid var(--pop-success, #000000);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.pop-urgency {
	display: inline-block;
	margin: 4px 0 14px;
	padding: 6px 14px;
	border-radius: var(--pop-radius-pill, 999px);
	background: #f3f3f3;
	color: var(--pop-sale, #000000);
	font-weight: 650;
	font-size: 14px;
}

.pop-trust { margin-top: 16px; }
.pop-trust__list {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 8px;
}
.pop-trust__item {
	font-size: 12.5px;
	color: var(--pop-muted, #767676);
	background: var(--pop-bg-alt, #ffffff);
	border: 1px solid var(--pop-line, #e5e5e5);
	border-radius: var(--pop-radius-pill, 999px);
	padding: 6px 13px;
}

.pop-checkout-note {
	margin-top: 14px;
	font-size: 13px;
	color: var(--pop-muted, #767676);
	text-align: center;
}

/* ==========================================================================
   Pincode checker
   ========================================================================== */

.pop-pincode {
	margin: 20px 0;
	padding: 16px;
	border: 1px solid var(--pop-line, #e5e5e5);
	border-radius: var(--pop-radius, 14px);
	background: var(--pop-bg-alt, #ffffff);
}
.pop-pincode__label {
	display: block;
	font-weight: 650;
	font-size: 13px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--pop-ink, #000000);
	margin-bottom: 9px;
}
.pop-pincode__row { display: flex; gap: 8px; flex-wrap: wrap; }
.pop-pincode__input {
	flex: 1 1 180px;
	min-height: 46px;
	padding: 10px 14px;
	font-size: 16px; /* avoids iOS zoom */
	border: 1px solid var(--pop-line, #e5e5e5);
	border-radius: var(--pop-radius-sm, 9px);
	background: #fff;
}
.pop-pincode__result { margin: 10px 0 0; font-size: 14px; min-height: 1em; }
.pop-pincode__result.is-ok { color: var(--pop-success, #000000); }
.pop-pincode__result.is-error { color: var(--pop-sale, #000000); }

/* ==========================================================================
   Free shipping progress
   ========================================================================== */

.pop-freeship { margin: 0 0 8px; font-size: 14px; }
.pop-freeship--done { color: var(--pop-success, #000000); font-weight: 650; }
.pop-freeship__bar {
	display: block; height: 6px; border-radius: 3px;
	background: var(--pop-line, #e5e5e5); overflow: hidden;
}
.pop-freeship__bar > span {
	display: block; height: 100%;
	background: var(--pop-gold, #000000);
	transition: width .3s ease;
}

/* ==========================================================================
   Sticky add to cart
   ========================================================================== */

.pop-sticky-atc {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 900;
	background: rgba(255, 255, 255, .97);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--pop-line, #e5e5e5);
	box-shadow: 0 -4px 20px rgba(0, 0, 0, .1);
	transform: translateY(100%);
	transition: transform .25s var(--pop-ease, ease);
}
.pop-sticky-atc.is-visible { transform: translateY(0); }
.pop-sticky-atc__inner {
	max-width: 1200px;
	margin-inline: auto;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
}
.pop-sticky-atc__thumb {
	width: 48px; height: 48px;
	border-radius: var(--pop-radius-sm, 9px);
	object-fit: cover;
	flex: 0 0 auto;
}
.pop-sticky-atc__meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}
.pop-sticky-atc__title {
	font-weight: 650;
	color: var(--pop-ink, #000000);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pop-sticky-atc__price { font-size: 14px; color: var(--pop-body, #333333); }
.pop-sticky-atc__price del { opacity: .6; margin-right: 4px; }
.pop-sticky-atc__button { flex: 0 0 auto; }

@media (max-width: 600px) {
	.pop-sticky-atc__thumb { display: none; }
	.pop-sticky-atc__button { padding-inline: 20px; }
}

/* ==========================================================================
   OTP login
   ========================================================================== */

.pop-otp {
	margin: 18px 0;
	padding: 18px;
	border: 1px solid var(--pop-line, #e5e5e5);
	border-radius: var(--pop-radius, 14px);
	background: var(--pop-bg-alt, #ffffff);
}
.pop-otp__label {
	display: block;
	font-weight: 650;
	color: var(--pop-ink, #000000);
	margin-bottom: 4px;
}
.pop-otp__hint { margin: 0 0 12px; font-size: 13.5px; color: var(--pop-muted, #767676); }
.pop-otp__row { display: flex; gap: 8px; flex-wrap: wrap; }
.pop-otp__input {
	flex: 1 1 200px;
	min-height: 48px;
	padding: 12px 16px;
	font-size: 16px;
	border: 1px solid var(--pop-line, #e5e5e5);
	border-radius: var(--pop-radius-sm, 9px);
	background: #fff;
}
.pop-otp__input--code {
	letter-spacing: 8px;
	font-weight: 700;
	text-align: center;
	max-width: 220px;
	flex: 0 1 220px;
}
.pop-otp__actions { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.pop-otp__link {
	background: none; border: 0; padding: 0;
	font-size: 13.5px;
	color: var(--pop-muted, #767676);
	text-decoration: underline;
	cursor: pointer;
}
.pop-otp__link:disabled { cursor: default; text-decoration: none; opacity: .7; }
.pop-otp__message { margin: 12px 0 0; font-size: 14px; min-height: 1em; }
.pop-otp__message.is-ok { color: var(--pop-success, #000000); }
.pop-otp__message.is-error { color: var(--pop-sale, #000000); }

.pop-login-divider {
	position: relative;
	text-align: center;
	margin: 22px 0 6px;
	color: var(--pop-muted, #767676);
	font-size: 13px;
}
.pop-login-divider::before {
	content: "";
	position: absolute; left: 0; right: 0; top: 50%;
	border-top: 1px solid var(--pop-line, #e5e5e5);
}
.pop-login-divider span { position: relative; background: #fff; padding: 0 12px; }

/* ==========================================================================
   Chat widget
   ========================================================================== */

.pop-chat { position: fixed; right: 18px; bottom: 18px; z-index: 950; }

.pop-chat__launcher {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 13px 20px;
	border: 0;
	border-radius: var(--pop-radius-pill, 999px);
	background: var(--pop-ink, #000000);
	color: var(--pop-cream, #ffffff);
	font-size: 15px;
	font-weight: 650;
	cursor: pointer;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .28);
	transition: transform .2s ease;
}
.pop-chat__launcher:hover { transform: translateY(-2px); }
.pop-chat.is-open .pop-chat__launcher { display: none; }

.pop-chat__launcher-icon {
	width: 17px; height: 15px;
	border: 2px solid currentColor;
	border-radius: 5px 5px 5px 0;
}

/* display:flex below would otherwise override the [hidden] attribute, leaving
   the panel permanently open and stopping the open/close script from running. */
.pop-chat__panel[hidden],
.pop-sticky-atc[hidden] { display: none !important; }

.pop-chat__panel {
	width: min(370px, calc(100vw - 32px));
	height: min(560px, calc(100vh - 110px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--pop-line, #e5e5e5);
	border-radius: var(--pop-radius, 14px);
	box-shadow: 0 18px 50px rgba(0, 0, 0, .26);
	overflow: hidden;
}

.pop-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--pop-ink, #000000);
	color: var(--pop-cream, #ffffff);
}
.pop-chat__title { display: block; font-family: var(--pop-font-display, Georgia, serif); font-size: 16px; }
.pop-chat__subtitle { font-size: 12px; opacity: .75; }
.pop-chat__close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 30px; height: 30px;
	padding: 0;
	background: rgba(240, 240, 240, .12);
	border: 0;
	border-radius: 50%;
	color: var(--pop-cream, #ffffff);
	font-family: inherit;      /* stops the glyph rendering as a colour emoji */
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease;
}
.pop-chat__close:hover { background: rgba(240, 240, 240, .24); }

.pop-chat__log {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--pop-bg, #ffffff);
}

.pop-chat__msg {
	max-width: 86%;
	padding: 10px 14px;
	border-radius: 14px;
	font-size: 14.5px;
	line-height: 1.5;
	word-wrap: break-word;
}
.pop-chat__msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--pop-line, #e5e5e5);
	border-bottom-left-radius: 4px;
	color: var(--pop-body, #333333);
}
.pop-chat__msg--user {
	align-self: flex-end;
	background: var(--pop-ink, #000000);
	color: var(--pop-cream, #ffffff);
	border-bottom-right-radius: 4px;
}
.pop-chat__msg a { color: var(--pop-gold-dark, #474747); font-weight: 600; }
.pop-chat__msg--user a { color: var(--pop-sand, #e5e5e5); }

.pop-chat__handoff {
	display: inline-block;
	margin-top: 9px;
	padding: 7px 14px;
	border-radius: var(--pop-radius-pill, 999px);
	background: #a6a6a6;
	color: #272727 !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.pop-chat__typing { display: flex; gap: 4px; align-items: center; }
.pop-chat__typing span {
	width: 6px; height: 6px; border-radius: 50%;
	background: var(--pop-faint, #9b9b9b);
	animation: pop-bounce 1.2s infinite ease-in-out;
}
.pop-chat__typing span:nth-child(2) { animation-delay: .15s; }
.pop-chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes pop-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: .5; }
	30% { transform: translateY(-4px); opacity: 1; }
}

.pop-chat__quick {
	display: flex; flex-wrap: wrap; gap: 6px;
	padding: 0 12px 8px;
	background: var(--pop-bg, #ffffff);
}
.pop-chat__quick:empty { display: none; }
.pop-chat__chip {
	border: 1px solid var(--pop-line, #e5e5e5);
	background: #fff;
	border-radius: var(--pop-radius-pill, 999px);
	padding: 7px 12px;
	font-size: 12.5px;
	color: var(--pop-body, #333333);
	cursor: pointer;
}
.pop-chat__chip:hover { background: var(--pop-bg-alt, #ffffff); }

.pop-chat__form {
	display: flex;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid var(--pop-line, #e5e5e5);
	background: #fff;
}
.pop-chat__input {
	flex: 1 1 auto;
	min-height: 42px;
	padding: 9px 14px;
	font-size: 16px;
	border: 1px solid var(--pop-line, #e5e5e5);
	border-radius: var(--pop-radius-pill, 999px);
}
.pop-chat__send {
	flex: 0 0 auto;
	width: 42px; height: 42px;
	border: 0; border-radius: 50%;
	background: var(--pop-gold, #000000);
	color: var(--pop-ink, #000000);
	font-size: 19px;
	cursor: pointer;
}

.pop-chat__whatsapp {
	display: block;
	padding: 10px;
	text-align: center;
	font-size: 13px;
	font-weight: 650;
	color: #474747;
	background: #f4f4f4;
	text-decoration: none;
	border-top: 1px solid #e3e3e3;
}

@media (max-width: 480px) {
	.pop-chat { right: 12px; bottom: 12px; left: 12px; }
	.pop-chat__panel { width: 100%; height: min(72vh, 520px); }
	.pop-chat__launcher { float: right; }
	body.single-product .pop-chat { bottom: 84px; }
}
