/**
 * BestyBlog CMS - Public Styles
 *
 * Registered by BestyBlog_CMS_Assets and auto-enqueued on Store/Coupon
 * single & archive pages, and on any page/post containing the
 * [bestyblog_stores] / [bestyblog_coupons] shortcodes.
 */

/* ---------------------------------------------------------------------
 * Badges (Top Store, Editor's Choice, Featured, Trending, New Arrival)
 * ------------------------------------------------------------------ */
.bbc-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	padding: 4px 10px;
	border-radius: 999px;
	background: #f0f0f1;
	color: #1d2327;
	margin: 0 6px 6px 0;
}

.bbc-badge--top {
	background: #2271b1;
	color: #fff;
}

.bbc-badge--editor {
	background: #8c5eff;
	color: #fff;
}

.bbc-badge--featured {
	background: #d63638;
	color: #fff;
}

.bbc-badge--trending {
	background: #dba617;
	color: #1d2327;
}

.bbc-badge--new {
	background: #00a32a;
	color: #fff;
}

/* ---------------------------------------------------------------------
 * Grids (shortcodes + archive templates)
 * ------------------------------------------------------------------ */
.bbc-stores-grid,
.bbc-coupons-grid {
	display: grid;
	grid-template-columns: repeat( var( --bbc-columns, 3 ), minmax( 0, 1fr ) );
	gap: 20px;
	margin: 20px 0;
}

@media ( max-width: 782px ) {
	.bbc-stores-grid,
	.bbc-coupons-grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}
}

@media ( max-width: 480px ) {
	.bbc-stores-grid,
	.bbc-coupons-grid {
		grid-template-columns: 1fr;
	}
}

.bbc-store-card,
.bbc-coupon-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bbc-store-card__link,
.bbc-coupon-card__link {
	text-decoration: none;
	color: inherit;
}

.bbc-store-card__image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.bbc-store-card__title,
.bbc-coupon-card__title {
	margin: 8px 0 0;
	font-size: 16px;
}

.bbc-store-card__excerpt,
.bbc-coupon-card__offer {
	font-size: 14px;
	color: #50575e;
	margin: 0;
}

.bbc-coupon-card__code {
	display: inline-block;
	font-family: monospace;
	font-weight: 700;
	letter-spacing: 0.05em;
	border: 1px dashed #2271b1;
	color: #2271b1;
	padding: 6px 10px;
	border-radius: 4px;
	align-self: flex-start;
}

.bbc-coupon-card__expiry {
	font-size: 12px;
	color: #787c82;
	margin: 0;
}

.bbc-shortcode-empty {
	color: #787c82;
}

/* ---------------------------------------------------------------------
 * Single Store / Single Coupon templates
 * ------------------------------------------------------------------ */
.bbc-store__header,
.bbc-coupon__header {
	margin-bottom: 16px;
}

.bbc-store__logo img {
	max-width: 200px;
	height: auto;
}

.bbc-store__categories {
	margin-bottom: 16px;
}

.bbc-store__category {
	display: inline-block;
	margin-right: 8px;
	font-size: 13px;
	text-decoration: none;
}

.bbc-coupon-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bbc-coupon-list__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #dcdcde;
}

.bbc-coupon__code-value {
	font-family: monospace;
	font-weight: 700;
	letter-spacing: 0.05em;
	border: 1px dashed #2271b1;
	color: #2271b1;
	padding: 6px 10px;
	border-radius: 4px;
	display: inline-block;
}

.bbc-archive__pagination {
	margin-top: 24px;
}

/* ---------------------------------------------------------------------
 * Coupon Popup (#bbc-coupon-modal, printed once in the footer -- see
 * BestyBlog_CMS_Assets::print_coupon_modal() and assets/js/public.js)
 * ------------------------------------------------------------------ */
.bbc-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100000;
}

.bbc-modal.is-open {
	display: block;
}

.bbc-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba( 0, 0, 0, 0.6 );
}

.bbc-modal__dialog {
	position: relative;
	max-width: 420px;
	width: calc( 100% - 32px );
	margin: 10vh auto 0;
	background: #fff;
	border-radius: 8px;
	padding: 32px 24px 24px;
	box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.2 );
}

.bbc-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	line-height: 1;
	font-size: 22px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #50575e;
}

.bbc-modal__panel {
	display: none;
}

.bbc-modal__panel.is-active {
	display: block;
}

.bbc-modal__title {
	margin: 0 0 8px;
	font-size: 18px;
}

.bbc-modal__offer {
	margin: 0 0 16px;
	color: #50575e;
}

.bbc-modal__code-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.bbc-modal__code-row .bbc-modal__code-value {
	flex: 1;
	text-align: center;
	font-size: 16px;
}

.bbc-modal__copy-btn {
	flex-shrink: 0;
	padding: 8px 14px;
	border-radius: 4px;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
	cursor: pointer;
}

.bbc-modal__copied-msg {
	display: none;
	margin: 0 0 16px;
	font-size: 13px;
	color: #00a32a;
}

.bbc-modal__copied-msg.is-visible {
	display: block;
}

.bbc-modal__deal-msg {
	margin: 0 0 16px;
	font-size: 14px;
	color: #50575e;
}

.bbc-modal__cta {
	display: block;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

body.bbc-modal-open {
	overflow: hidden;
}
