/*
 * ShokolBazar Core styles: chatbot widget, account pages, checkout extras.
 */

/* ====================================================== CHATBOT (floating, bottom-right) */

.sbz-chatbot { position: fixed; right: 18px; bottom: 84px; z-index: 9997; }
@media (max-width: 860px) { .sbz-chatbot { bottom: 74px; right: 12px; } }

.sbz-chat-fab {
	width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer;
	background: linear-gradient(135deg, var(--sbz-primary-dark, #0288d1), var(--sbz-primary, #4fc3f7));
	color: #fff; box-shadow: 0 10px 26px rgba(2, 136, 209, .45);
	display: flex; align-items: center; justify-content: center;
	transition: transform .2s ease;
}
.sbz-chat-fab:hover { transform: scale(1.08); }
.sbz-chat-fab.open { background: var(--sbz-dark, #10314b); }
.sbz-chat-fab-ico { font-size: 24px; }
.sbz-chat-fab-badge {
	position: absolute; top: -4px; right: -4px; background: #e0245e; color: #fff;
	font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
	display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.sbz-chat-panel {
	position: absolute; right: 0; bottom: 74px; width: 340px; max-width: calc(100vw - 24px);
	background: #fff; border-radius: 16px; overflow: hidden;
	box-shadow: 0 18px 50px rgba(16, 49, 75, .28);
	display: none; flex-direction: column;
}
.sbz-chat-panel.open { display: flex; animation: sbz-chat-pop .25s ease; }
@keyframes sbz-chat-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

.sbz-chat-head {
	display: flex; align-items: center; gap: 10px; padding: 12px 14px;
	background: linear-gradient(135deg, var(--sbz-primary-dark, #0288d1), var(--sbz-primary, #4fc3f7));
	color: #fff;
}
.sbz-chat-avatar { font-size: 24px; }
.sbz-chat-titles { flex: 1; min-width: 0; }
.sbz-chat-titles strong { display: block; font-size: 14px; }
.sbz-chat-titles small { font-size: 11px; opacity: .9; display: flex; align-items: center; gap: 4px; }
.sbz-chat-dot { width: 7px; height: 7px; border-radius: 50%; background: #7cf29c; display: inline-block; }
.sbz-chat-close { background: transparent; border: 0; color: #fff; font-size: 15px; cursor: pointer; }

.sbz-chat-body { height: 320px; max-height: 44vh; overflow-y: auto; padding: 12px; background: var(--sbz-bg, #f3fbff); }
.sbz-chat-msg {
	max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.5;
	margin-bottom: 8px; width: fit-content; word-wrap: break-word;
}
.sbz-chat-msg.bot { background: #fff; color: var(--sbz-text, #233645); border-bottom-left-radius: 4px; box-shadow: 0 2px 6px rgba(16,49,75,.06); }
.sbz-chat-msg.user { background: var(--sbz-primary, #4fc3f7); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.sbz-chat-typing { color: var(--sbz-muted, #5c7385); letter-spacing: 2px; }

.sbz-chat-quicks { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--sbz-border, #dbeefb); }
.sbz-chat-quick {
	border: 1px solid var(--sbz-primary, #4fc3f7); background: #fff; color: var(--sbz-primary-dark, #0288d1);
	border-radius: 999px; font-size: 11.5px; padding: 5px 10px; cursor: pointer; font-family: inherit;
}
.sbz-chat-quick:hover { background: var(--sbz-primary, #4fc3f7); color: #fff; }

.sbz-chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--sbz-border, #dbeefb); }
.sbz-chat-input input {
	flex: 1; border: 1.5px solid var(--sbz-border, #dbeefb); border-radius: 999px;
	padding: 9px 14px; font-size: 13px; outline: none; font-family: inherit; min-width: 0;
}
.sbz-chat-input input:focus { border-color: var(--sbz-primary, #4fc3f7); }
.sbz-chat-input button {
	width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--sbz-primary, #4fc3f7); color: #fff; font-size: 15px; flex-shrink: 0;
}

/* ====================================================== ACCOUNT EXTRAS */

.sbz-account-head { margin-bottom: 18px; }
.sbz-account-head h2 { margin: 0 0 4px; }
.sbz-muted { color: var(--sbz-muted, #5c7385); font-size: 13.5px; }

.sbz-account-dashboard {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 22px;
}
.sbz-id-card {
	background: linear-gradient(135deg, var(--sbz-dark, #10314b), var(--sbz-primary-dark, #0288d1));
	color: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 3px;
}
.sbz-id-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; opacity: .8; }
.sbz-id-value { font-size: 21px; letter-spacing: 1.5px; }
.sbz-id-card .sbz-muted { color: rgba(255,255,255,.75); font-size: 11px; }

.sbz-dash-tile {
	background: #fff; border: 1px solid var(--sbz-border, #dbeefb); border-radius: 14px;
	padding: 14px; display: flex; flex-direction: column; gap: 3px; color: var(--sbz-dark, #10314b);
	transition: all .2s ease;
}
.sbz-dash-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,49,75,.1); color: var(--sbz-dark, #10314b); }
.sbz-dash-tile strong { font-size: 21px; }
.sbz-dash-tile code { font-size: 13px; background: var(--sbz-bg, #f3fbff); padding: 2px 6px; border-radius: 6px; }
.sbz-dash-tile span { font-size: 11.5px; color: var(--sbz-muted, #5c7385); }

/* Four different colours for the four dashboard blocks (owner's request):
 * Customer ID stays dark blue; points gold, gift cards green, referral
 * violet — each with white text so they read at a glance. */
.sbz-dash-tile.sbz-dash-points {
	background: linear-gradient(135deg, #f6a609, #e07b00);
	color: #fff; border-color: transparent;
}
.sbz-dash-tile.sbz-dash-wallet {
	background: linear-gradient(135deg, #21a366, #147a4b);
	color: #fff; border-color: transparent;
}
.sbz-dash-tile.sbz-dash-ref {
	background: linear-gradient(135deg, #7c5cd6, #5b3fb8);
	color: #fff; border-color: transparent;
}
.sbz-dash-tile.sbz-dash-points:hover,
.sbz-dash-tile.sbz-dash-wallet:hover,
.sbz-dash-tile.sbz-dash-ref:hover { color: #fff; }
.sbz-dash-tile.sbz-dash-points span,
.sbz-dash-tile.sbz-dash-wallet span,
.sbz-dash-tile.sbz-dash-ref span { color: rgba(255,255,255,.85); }
.sbz-dash-tile.sbz-dash-ref code { background: rgba(255,255,255,.18); color: #fff; }

/* Dashboard overview panels: orders, wishlist, demand, returns. */
.sbz-dash-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .sbz-dash-panels { grid-template-columns: 1fr; } }
.sbz-dash-panel { background: #fff; border: 1px solid var(--sbz-border, #dbeefb); border-radius: 14px; padding: 18px; min-width: 0; }
.sbz-dash-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.sbz-dash-panel-head h3 { margin: 0; font-size: 15px; }
.sbz-dash-panel-head a { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.sbz-dash-panel p { margin: 8px 0 0; }
.sbz-dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sbz-dash-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.sbz-dash-list li a { font-weight: 600; }
.sbz-dash-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.sbz-dash-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--sbz-border, #dbeefb); }

/* Wishlist card for an item with a saved variation: shows the exact
 * colour/size and adds that variation straight to the cart. */
.sbz-wishlist-var-card { background: #fff; border: 1px solid var(--sbz-border, #dbeefb); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sbz-wishlist-var-card img { width: 100%; height: auto; border-radius: 10px; }
.sbz-wishlist-var-card h3 { font-size: 15px; margin: 0; }
.sbz-wishlist-var-card h3 a { color: inherit; }
.sbz-wcard-var { font-size: 13px; color: var(--sbz-muted, #5c7385); margin: 0; }
.sbz-wcard-price { font-size: 15px; margin: 0; }
.sbz-wcard-price del { color: var(--sbz-muted, #5c7385); margin-right: 6px; }
.sbz-wishlist-var-card .sbz-btn { text-align: center; }
.sbz-wcard-remove { background: none; border: none; color: var(--sbz-muted, #5c7385); cursor: pointer; font-size: 13px; padding: 6px 0 0; }
.sbz-wcard-remove:hover { color: #d33; }

/* Mobile: account tables become stacked cards so nothing overflows the
 * screen (the wallet table used to run off the right edge on phones).
 * Each row is a card; each cell shows its column name from data-label. */
@media (max-width: 640px) {
	.sbz-account-table thead { display: none; }
	.sbz-account-table, .sbz-account-table tbody, .sbz-account-table tr, .sbz-account-table td { display: block; width: 100%; }
	.sbz-account-table { border: none; background: transparent; }
	.sbz-account-table tr { background: #fff; border: 1px solid var(--sbz-border, #dbeefb); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
	.sbz-account-table td { border: none; padding: 5px 0; text-align: left; }
	.sbz-account-table td::before {
		content: attr(data-label);
		display: block;
		font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
		color: var(--sbz-muted, #5c7385);
		margin-bottom: 2px;
	}
	.sbz-account-table td[data-label=""]::before,
	.sbz-account-table td:not([data-label])::before { display: none; }
	.sbz-account-table td .sbz-btn { width: 100%; text-align: center; margin-top: 6px; }
}

/* 1.0.19 — the dashboard tiles stayed 4-across on phones (referral tile
 * cut off, horizontal scrollbar): the old 640px breakpoint was too low
 * for the widths phones and the Customizer preview actually report.
 * Stack 2×2 from 860px, matching the panels below. */
@media (max-width: 860px) { .sbz-account-dashboard { grid-template-columns: 1fr 1fr !important; } }

/* Points */
.sbz-points-hero {
	background: linear-gradient(135deg, var(--sbz-primary, #4fc3f7), var(--sbz-primary-dark, #0288d1));
	color: #fff; border-radius: 14px; padding: 22px; text-align: center; margin-bottom: 18px;
	display: flex; flex-direction: column; gap: 2px;
}
.sbz-points-value { font-size: 40px; font-weight: 700; line-height: 1; }
.sbz-points-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 2px; opacity: .85; }
.sbzs-green, .sbz-green { color: var(--sbz-green, #21a366); }
.sbz-red { color: var(--sbz-red, #e04b4b); }

/* Referral */
.sbz-ref-box { background: #fff; border: 1.5px dashed var(--sbz-primary, #4fc3f7); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.sbz-ref-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--sbz-muted, #5c7385); font-weight: 700; display: block; margin-bottom: 8px; }
.sbz-ref-code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sbz-ref-code { font-size: 21px; font-weight: 700; letter-spacing: 2px; color: var(--sbz-primary-dark, #0288d1); background: var(--sbz-bg, #f3fbff); padding: 8px 14px; border-radius: 8px; }
.sbz-ref-regen { margin-top: 10px; }
.sbz-ref-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.sbz-ref-stats div { background: #fff; border: 1px solid var(--sbz-border, #dbeefb); border-radius: 12px; padding: 14px; text-align: center; }
.sbz-ref-stats strong { display: block; font-size: 24px; color: var(--sbz-dark, #10314b); }
.sbz-ref-stats span { font-size: 12px; color: var(--sbz-muted, #5c7385); }

/* Generic */
.sbz-btn-ghost { background: transparent; border: 1.5px solid var(--sbz-primary-dark, #0288d1); color: var(--sbz-primary-dark, #0288d1); }
.sbz-btn-ghost:hover { background: var(--sbz-bg, #f3fbff); }
.sbz-pill { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.sbz-pill-ok { background: rgba(33, 163, 102, .12); color: var(--sbz-green, #21a366); }
.sbz-pill-muted { background: rgba(92, 115, 133, .12); color: var(--sbz-muted, #5c7385); }
.sbz-notice { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.sbz-notice-ok { background: rgba(33, 163, 102, .1); color: #156d47; border: 1px solid rgba(33, 163, 102, .3); }
.sbz-notice-error { background: rgba(224, 75, 75, .08); color: #a33; border: 1px solid rgba(224, 75, 75, .3); }
.sbz-empty-box { text-align: center; background: var(--sbz-bg, #f3fbff); border-radius: 14px; padding: 30px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.sbz-form p { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.sbz-form label { font-weight: 700; font-size: 12.5px; }
.sbz-form input[type="text"], .sbz-form input[type="number"], .sbz-form input[type="email"],
.sbz-form textarea, .sbz-form select {
	border: 1.5px solid var(--sbz-border, #dbeefb); border-radius: 8px; padding: 10px 12px;
	font-family: inherit; font-size: 14px; outline: none; background: #fff;
}
.sbz-form input:focus, .sbz-form textarea:focus, .sbz-form select:focus { border-color: var(--sbz-primary, #4fc3f7); }
.sbz-radio { display: inline-flex !important; align-items: center; gap: 6px; margin-right: 14px; font-weight: 400 !important; }

/* Track order */
.sbzs-track-steps, .sbz-track-steps { list-style: none; margin: 18px 0; padding: 0; display: flex; justify-content: space-between; position: relative; }
.sbz-track-steps::before { content: ''; position: absolute; top: 17px; left: 8%; right: 8%; height: 3px; background: var(--sbz-border, #dbeefb); border-radius: 3px; }
.sbz-track-steps li { position: relative; z-index: 1; flex: 1; text-align: center; }
.sbz-step-dot {
	width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 3px solid var(--sbz-border, #dbeefb);
	display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-size: 16px;
}
.sbz-track-steps li.done .sbz-step-dot { border-color: var(--sbz-green, #21a366); background: rgba(33,163,102,.08); }
.sbz-step-label { font-size: 11.5px; font-weight: 700; display: block; color: var(--sbz-dark, #10314b); }
.sbz-step-now { font-size: 10px; color: var(--sbz-primary-dark, #0288d1); font-weight: 700; }
.sbz-track-form .form-row { display: flex; gap: 8px; }
.sbz-track-form input[type="text"], .sbz-track-form input[type="email"] {
	flex: 1; border: 1.5px solid var(--sbz-border, #dbeefb); border-radius: 8px; padding: 10px 12px; font-family: inherit;
}
.sbz-track-notes { list-style: none; padding: 0; font-size: 13px; }
.sbz-track-notes li { padding: 6px 0; border-bottom: 1px dashed var(--sbz-border, #dbeefb); }
.sbz-track-notes li span { color: var(--sbz-muted, #5c7385); margin-right: 8px; }

/* Checkout wallet coupons */
.sbz-checkout-wallet { background: var(--sbz-bg, #f3fbff); border: 1.5px dashed var(--sbz-primary, #4fc3f7); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.sbz-checkout-wallet ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sbz-checkout-wallet li { display: flex; align-items: center; gap: 8px; }
.sbz-checkout-wallet code { background: #fff; padding: 4px 8px; border-radius: 6px; font-size: 13px; letter-spacing: 1px; }

/* Wishlist wish button busy */
.sbz-wish-btn.sbz-busy { opacity: .6; pointer-events: none; }

/* Wishlist button on the single product page (1.0.19) — the theme only
 * puts hearts on product cards, so this one carries its own styling. */
.sbz-wish-btn-single {
	display: inline-flex; align-items: center; gap: 6px;
	margin: 8px 0 0 8px; padding: 10px 16px;
	background: #fff; border: 1.5px solid var(--sbz-border, #dbeefb);
	border-radius: 10px; color: var(--sbz-dark, #10314b);
	font-size: 14px; font-weight: 600; cursor: pointer; vertical-align: middle;
}
.sbz-wish-btn-single.active { background: #fff1f2; border-color: #f43f5e; color: #e11d48; }

/* Wishlist grid on the My Account page. The theme's shop grid is too
 * narrow inside the account content area, so the cards came out small
 * with the Buy button clipped and empty space beside them. A roomy
 * grid that fills the content area instead: 2 columns on desktop,
 * 1 column on small phones. */
/* The wishlist grid must fill the My Account content area: two roomy
 * columns on desktop, one on phones. The theme's own product-grid rules
 * beat the plain version of this (verified 17 Nov 2026 — cards stayed
 * ~145px narrow with the Buy button cut off), so the grid properties
 * carry !important and the items are freed from any theme width cap. */
ul.products.sbz-wishlist-grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 20px !important;
	margin: 0;
	padding: 0;
	width: 100%;
}
ul.products.sbz-wishlist-grid > li {
	min-width: 0;
	width: auto !important;
	max-width: none !important;
}
@media (max-width: 640px) {
	ul.products.sbz-wishlist-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
/* Keep the card buttons inside the card. */
ul.products.sbz-wishlist-grid .button { max-width: 100%; white-space: normal; }
/* 1.0.19 — the desktop wishlist came out staggered (first card high on
 * the right, second a full row lower on the left, empty first cell)
 * even though the grid itself was right: something in the theme's
 * product-grid rules or JS fights it — a masonry sizer or spacer element
 * can occupy the first cell, and nth-child margins or absolute
 * positioning can shove cards out of their row. Neutralise all of that
 * so the cards sit side by side in aligned rows. (Owner's screenshot
 * 17 Nov 2026; Round A's DOM check to confirm the exact culprit.) */
ul.products.sbz-wishlist-grid > :not(li) { display: none !important; }
ul.products.sbz-wishlist-grid > li:empty { display: none !important; }
ul.products.sbz-wishlist-grid > li {
	margin: 0 !important;
	transform: none !important;
	position: relative !important;
	left: auto !important;
	top: auto !important;
}
ul.products.sbz-wishlist-grid { align-items: start !important; }
/* 1.0.19 — the stagger's actual cause (Round A DOM check 17 Nov 2026):
 * WooCommerce's clearfix ::before/::after on ul.products become grid
 * items once the list is a grid, and the ::before silently occupies the
 * first cell — invisible in the accessibility tree, which is why no
 * sizer or spacer element could be found. A single item lands in column
 * 2 for the same reason. Remove both pseudos (scoped to this grid only)
 * and pin the grid to the full content width. */
ul.products.sbz-wishlist-grid::before,
ul.products.sbz-wishlist-grid::after { content: none !important; display: none !important; }
ul.products.sbz-wishlist-grid {
	width: 100% !important; max-width: none !important;
	margin-left: 0 !important; margin-right: 0 !important;
	justify-content: stretch !important;
}

/* ====================================================== REWARDS HUB */

/* Gift cards, points and referral side by side on one page (stacked on
 * mobile, where most customers are). */
.sbz-rewards-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	align-items: stretch;
}
@media (max-width: 860px) {
	.sbz-rewards-grid { grid-template-columns: 1fr; }
}
.sbz-reward-panel {
	background: #fff; border: 1px solid var(--sbz-border, #dbeefb); border-radius: 14px;
	padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.sbz-reward-panel h3 { margin: 0; font-size: 16px; }
.sbz-reward-panel p { margin: 0; }
.sbz-reward-big { font-size: 36px; font-weight: 700; color: var(--sbz-primary-dark, #0288d1); line-height: 1; }
.sbz-reward-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sbz-reward-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; }
.sbz-reward-list code { background: var(--sbz-bg, #f3fbff); padding: 3px 7px; border-radius: 6px; font-size: 12.5px; word-break: break-all; }
.sbz-reward-more { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 700; }

/* ====================================================== DEMAND PHOTOS */

.sbz-form input[type="file"] {
	border: 1.5px dashed var(--sbz-border, #dbeefb); border-radius: 8px;
	padding: 10px; background: #fff; font-size: 13.5px; width: 100%; box-sizing: border-box;
}
.sbz-demand-photos, .sbz-rma-photos { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sbz-demand-photos img, .sbz-rma-photos img {
	width: 48px; height: 48px; object-fit: cover; border-radius: 8px;
	border: 1px solid var(--sbz-border, #dbeefb);
}
