/**
 * ROUGH Rewards – Customer-Facing Stylesheet
 * Brand Aesthetic: ROUGH Clothing Monochromatic Obsidian Black (#111111),
 * Crisp White (#FFFFFF), and Metallic Gold Accent (#C5A059).
 */

:root {
	--rr-primary: #111111;
	--rr-secondary: #ffffff;
	--rr-accent: #c5a059;
	--rr-surface: #f7f7f7;
	--rr-border: #e4e4e7;
	--rr-text: #18181b;
	--rr-muted: #71717a;
	--rr-success: #15803d;
	--rr-danger: #b91c1c;
	--rr-radius: 10px;
}

.rough-rewards-app {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	color: var(--rr-text);
	max-width: 1140px;
	margin: 20px auto 64px;
	box-sizing: border-box;
}

.rough-rewards-app *,
.rough-rewards-app *::before,
.rough-rewards-app *::after {
	box-sizing: border-box;
}

/* Header */
.rr-app-header {
	background: var(--rr-primary);
	color: #ffffff;
	padding: 28px 32px;
	border-radius: var(--rr-radius);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	margin-bottom: 20px;
}

.rr-brand-kicker {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--rr-accent);
	font-weight: 700;
	display: block;
	margin-bottom: 6px;
}

.rr-app-header h2 {
	color: #ffffff;
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 700;
}

.rr-tier-pill {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.25);
	margin: 0;
}

.rr-header-wallet-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

.rr-main-balance-box {
	background: rgba(255, 255, 255, 0.08);
	padding: 14px 22px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	text-align: right;
}

.rr-balance-label {
	display: block;
	font-size: 10px;
	letter-spacing: 0.12em;
	color: #d4d4d8;
}

.rr-balance-value {
	display: block;
	font-size: 32px;
	line-height: 1.15;
	color: var(--rr-accent);
	font-weight: 800;
}

.rr-balance-worth {
	font-size: 12px;
	color: #e4e4e7;
}

.rr-header-quick-btns {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Navigation Tabs */
.rr-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	border-bottom: 2px solid var(--rr-border);
	margin-bottom: 24px;
	padding-bottom: 8px;
}

.rr-tab-btn {
	background: transparent;
	border: 1px solid transparent;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--rr-muted);
	cursor: pointer;
	transition: all 0.15s ease;
}

.rr-tab-btn:hover {
	color: var(--rr-primary);
	background: var(--rr-surface);
}

.rr-tab-btn.is-active {
	background: var(--rr-primary);
	color: #ffffff;
}

/* Cards & Grids */
.rr-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.rr-cards-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 18px;
	margin-bottom: 24px;
}

.rr-card {
	background: #ffffff;
	border: 1px solid var(--rr-border);
	border-radius: var(--rr-radius);
	padding: 22px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.rr-card-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--rr-muted);
	margin-bottom: 6px;
}

.rr-card-stat {
	display: block;
	font-size: 28px;
	font-weight: 800;
	color: var(--rr-primary);
	margin-bottom: 4px;
}

/* Progress Bars */
.rr-progress-track {
	width: 100%;
	height: 10px;
	background: #e4e4e7;
	border-radius: 999px;
	overflow: hidden;
	margin: 12px 0;
}

.rr-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--rr-primary), var(--rr-accent));
	border-radius: 999px;
	transition: width 0.35s ease;
}

/* Buttons */
.rr-btn-primary,
.rr-btn-gold,
.rr-btn-outline,
.rr-btn-outline-light,
.rr-btn-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

.rr-btn-primary {
	background: var(--rr-primary);
	color: #ffffff;
	border: 1px solid var(--rr-primary);
}

.rr-btn-gold {
	background: var(--rr-accent);
	color: #111111;
	border: 1px solid var(--rr-accent);
}

.rr-btn-outline {
	background: #ffffff;
	color: var(--rr-primary);
	border: 1px solid var(--rr-primary);
}

.rr-btn-outline-light {
	background: transparent;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.35);
}

.rr-btn-ghost {
	background: transparent;
	color: var(--rr-muted);
	border: none;
}

.rr-btn-primary:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Product Badge & Cart/Checkout Redemption Box */
.rough-rewards-product-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #111111;
	color: #ffffff;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 13px;
	margin: 12px 0;
}

.rr-badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--rr-accent);
}

.rough-rewards-cart-box {
	background: #fafafa;
	border: 1px solid #d4d4d8;
	border-left: 4px solid #111111;
	border-radius: 8px;
	padding: 18px 20px;
	margin: 18px 0;
}

.rr-cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}

.rr-cart-title {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: #111111;
}

.rr-cart-balance-pill {
	background: #111111;
	color: #ffffff;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
}

.rr-slider-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 10px 0;
}

.rr-points-slider {
	flex: 1;
	min-width: 140px;
	accent-color: #111111;
}

.rr-points-number-input {
	width: 90px;
	padding: 6px 10px;
	border: 1px solid #d4d4d8;
	border-radius: 6px;
}

/* Tables */
.rr-table-responsive {
	overflow-x: auto;
}

.rr-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.rr-table th,
.rr-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--rr-border);
	text-align: left;
}

.rr-pts-pos {
	color: var(--rr-success);
}

.rr-pts-neg {
	color: var(--rr-danger);
}

/* Alert Banners & Toast */
.rr-alert-banner {
	background: #fefce8;
	border: 1px solid #fde047;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.rr-toast {
	padding: 12px 18px;
	border-radius: 8px;
	background: #111111;
	color: #ffffff;
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 600;
}

/* Modals & Birthday Popup */
.rr-popup-backdrop {
	position: fixed;
	inset: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.68);
	z-index: 999999 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.rr-popup-backdrop[hidden],
.rr-popup-panel[hidden],
.rough-rewards-app [hidden],
#rough-rewards-bday-popup[hidden],
#rough-rewards-custom-popup[hidden] {
	display: none !important;
}

.rr-popup-modal {
	background: #ffffff;
	color: #111111;
	max-width: 520px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 12px;
	padding: 26px 28px;
	position: relative;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.rr-popup-brand {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.14em;
	color: var(--rr-accent);
	text-transform: uppercase;
	margin-bottom: 4px;
}

.rr-popup-header-bar h3 {
	margin: 0 0 8px;
	font-size: 21px;
	color: #111111;
}

.rr-popup-member-strip {
	display: flex;
	gap: 14px;
	font-size: 12px;
	background: #f4f4f5;
	padding: 6px 12px;
	border-radius: 6px;
	margin-bottom: 12px;
}

.rr-popup-tabs {
	display: flex;
	gap: 6px;
	border-bottom: 1px solid var(--rr-border);
	padding-bottom: 10px;
	margin: 12px 0 16px;
}

.rr-popup-tab-btn {
	flex: 1;
	background: #f4f4f5;
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 12px;
	font-weight: 700;
	color: #52525b;
	cursor: pointer;
}

.rr-popup-tab-btn.is-active {
	background: #111111;
	color: #ffffff;
}

.rr-popup-bonus-pill {
	display: inline-block;
	background: #fef9c3;
	color: #854d0e;
	border: 1px solid #fde047;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	margin: 4px 0 10px;
}

.rr-popup-lead {
	font-size: 13px;
	line-height: 1.5;
	color: #52525b;
	margin: 0 0 12px;
}

.rr-ways-to-earn-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 220px;
	overflow-y: auto;
	margin-bottom: 14px;
	padding-right: 4px;
}

.rr-earn-way-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #fafafa;
	border: 1px solid var(--rr-border);
	border-radius: 8px;
}

.rr-earn-way-item strong {
	display: block;
	font-size: 13px;
	color: #111111;
}

.rr-earn-way-item small {
	font-size: 11px;
	color: var(--rr-muted);
}

.rr-earn-way-badge {
	background: #111111;
	color: var(--rr-accent);
	font-size: 11px;
	font-weight: 800;
	padding: 4px 9px;
	border-radius: 999px;
	white-space: nowrap;
}

.rr-popup-vip-strip {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 6px;
	margin-bottom: 14px;
}

.rr-mini-tier-chip {
	background: #f4f4f5;
	padding: 6px 10px;
	border-radius: 6px;
	display: flex;
	justify-content: space-between;
	font-size: 11px;
}

.rr-popup-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
}

.rr-custom-coupon-box {
	background: #fafafa;
	border: 1px dashed #111111;
	padding: 12px 14px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 12px 0;
}

.rr-floating-launcher {
	position: fixed !important;
	bottom: 24px !important;
	left: 24px !important;
	z-index: 999990 !important;
	background: #111111 !important;
	color: #ffffff !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	border-radius: 999px !important;
	padding: 12px 20px !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	cursor: pointer !important;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32) !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.rr-floating-launcher:hover {
	transform: translateY(-2px) !important;
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4) !important;
}

.rr-launcher-pts {
	background: var(--rr-accent);
	color: #111111;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 800;
}

.rr-form-grid input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--rr-border);
	border-radius: 6px;
}

.rr-popup-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: transparent;
	border: none;
	font-size: 26px;
	cursor: pointer;
}

.rr-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin: 14px 0;
}

.rr-form-grid select,
.rr-referral-share-box input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--rr-border);
	border-radius: 6px;
}

.rr-consent-label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12px;
	color: var(--rr-muted);
	margin: 12px 0 16px;
}

.rr-qr-visual-box {
	width: 190px;
	height: 190px;
	margin: 16px auto;
	padding: 12px;
	border: 2px solid #111111;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Mobile Bottom Nav */
.rr-mobile-bottom-nav {
	display: none;
}

@media (max-width: 768px) {
	.rr-app-header {
		padding: 20px;
	}
	.rr-mobile-bottom-nav {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background: #111111;
		display: flex;
		justify-content: space-around;
		padding: 8px 4px;
		z-index: 9990;
	}
	.rr-mob-nav-btn {
		background: transparent;
		border: none;
		color: #a1a1aa;
		font-size: 12px;
		font-weight: 600;
		padding: 6px 10px;
	}
	.rr-mob-nav-btn.is-active {
		color: var(--rr-accent);
	}
}

