
/* =========================================================
   GROOKFIT REFERRAL ENHANCEMENTS
   Persistent referral + checkout code + account management
   Scoped to enhancement components only.
   ========================================================= */

.grookfit-referral-code-box {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 0 14px !important;
	padding: 16px !important;
	box-sizing: border-box !important;
	border: 1px solid rgba(255,255,255,.09) !important;
	border-radius: 14px !important;
	background: linear-gradient(145deg,#131313,#0b0b0b) !important;
	color: #eee !important;
	box-shadow: 0 12px 32px rgba(0,0,0,.16) !important;
}

.grookfit-referral-code-box *,
.grookfit-my-referral-card *,
.grookfit-referral-code-box *::before,
.grookfit-my-referral-card *::before,
.grookfit-referral-code-box *::after,
.grookfit-my-referral-card *::after {
	box-sizing: border-box !important;
}

.grookfit-referral-code-header {
	margin: 0 0 12px !important;
}

.grookfit-referral-code-header strong {
	display: block !important;
	margin: 0 !important;
	color: #f5f5f5 !important;
	font-size: 12px !important;
	font-weight: 750 !important;
	line-height: 1.35 !important;
}

.grookfit-referral-code-header small {
	display: block !important;
	margin-top: 4px !important;
	color: #666 !important;
	font-size: 9px !important;
	line-height: 1.45 !important;
}

.grookfit-referral-code-row {
	display: flex !important;
	align-items: stretch !important;
	width: 100% !important;
	gap: 7px !important;
	margin: 0 !important;
	padding: 0 !important;
}

.grookfit-referral-code-row input {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	width: auto !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 1px solid rgba(255,255,255,.12) !important;
	border-radius: 9px !important;
	outline: none !important;
	background: #050505 !important;
	color: #fff !important;
	-webkit-text-fill-color: #fff !important;
	box-shadow: none !important;
	font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace !important;
	font-size: 11px !important;
	letter-spacing: .04em !important;
	text-transform: uppercase !important;
}

.grookfit-referral-code-row input:focus {
	border-color: rgba(255,255,255,.28) !important;
}

.grookfit-referral-code-row input::placeholder {
	color: #505050 !important;
	opacity: 1 !important;
}

.grookfit-referral-code-row button {
	flex: 0 0 78px !important;
	width: 78px !important;
	min-width: 78px !important;
	height: 42px !important;
	margin: 0 !important;
	padding: 0 10px !important;
	border: 1px solid #fff !important;
	border-radius: 9px !important;
	background: #fff !important;
	color: #050505 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-size: 10px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
}

.grookfit-referral-code-row button:hover {
	background: #ddd !important;
	border-color: #ddd !important;
	color: #050505 !important;
}

.grookfit-referral-code-form > small {
	display: block !important;
	margin: 6px 0 0 !important;
	color: #555 !important;
	font-size: 8px !important;
	line-height: 1.4 !important;
}

.grookfit-referral-active {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 12px 13px !important;
	border: 1px solid rgba(184,255,207,.14) !important;
	border-radius: 10px !important;
	background: rgba(184,255,207,.035) !important;
}

.grookfit-referral-active span {
	display: block !important;
	margin: 0 0 3px !important;
	color: #777 !important;
	font-size: 8px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: .08em !important;
}

.grookfit-referral-active strong {
	color: #b8ffcf !important;
	font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace !important;
	font-size: 11px !important;
	letter-spacing: .04em !important;
}

.grookfit-referral-active em {
	flex: 0 0 auto !important;
	margin: 0 !important;
	padding: 5px 8px !important;
	border: 1px solid rgba(184,255,207,.15) !important;
	border-radius: 999px !important;
	color: #b8ffcf !important;
	font-size: 8px !important;
	font-style: normal !important;
	font-weight: 800 !important;
	white-space: nowrap !important;
}

.grookfit-referral-notice {
	margin: 10px 0 0 !important;
	padding: 9px 11px !important;
	border-radius: 8px !important;
	font-size: 9px !important;
	line-height: 1.45 !important;
}

.grookfit-referral-notice-success {
	border: 1px solid rgba(184,255,207,.14) !important;
	background: rgba(184,255,207,.035) !important;
	color: #b8ffcf !important;
}

.grookfit-referral-notice-error {
	border: 1px solid rgba(255,155,155,.14) !important;
	background: rgba(255,155,155,.035) !important;
	color: #ff9b9b !important;
}


/* =========================================================
   MY ACCOUNT — REFERRAL MANAGEMENT CARD
   ========================================================= */

.grookfit-my-referral-card {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 0 20px !important;
	padding: 20px !important;
	border: 1px solid rgba(255,255,255,.09) !important;
	border-radius: 16px !important;
	background: linear-gradient(145deg,#141414,#0b0b0b) !important;
	color: #eee !important;
	box-shadow: 0 14px 40px rgba(0,0,0,.18) !important;
}

.grookfit-my-referral-card-heading {
	display: flex !important;
	align-items: flex-start !important;
	justify-content: space-between !important;
	gap: 12px !important;
	margin: 0 0 16px !important;
	padding: 0 0 13px !important;
	border-bottom: 1px solid rgba(255,255,255,.07) !important;
}

.grookfit-my-referral-card-heading span {
	color: #b8ffcf !important;
	font-size: 8px !important;
	font-weight: 850 !important;
	letter-spacing: .16em !important;
}

.grookfit-my-referral-card-heading strong {
	color: #eee !important;
	font-size: 13px !important;
	font-weight: 750 !important;
}

.grookfit-my-referral-current {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 15px !important;
	padding: 14px !important;
	border: 1px solid rgba(255,255,255,.07) !important;
	border-radius: 11px !important;
	background: #070707 !important;
}

.grookfit-my-referral-current small {
	display: block !important;
	margin: 0 0 5px !important;
	color: #666 !important;
	font-size: 8px !important;
}

.grookfit-my-referral-current strong {
	display: block !important;
	color: #b8ffcf !important;
	font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace !important;
	font-size: 14px !important;
	letter-spacing: .05em !important;
}

.grookfit-my-referral-status {
	text-align: right !important;
}

.grookfit-my-referral-status span {
	display: inline-flex !important;
	padding: 5px 8px !important;
	border: 1px solid rgba(184,255,207,.14) !important;
	border-radius: 999px !important;
	background: rgba(184,255,207,.035) !important;
	color: #b8ffcf !important;
	font-size: 8px !important;
	font-weight: 800 !important;
}

.grookfit-my-referral-status small {
	margin-top: 5px !important;
	margin-bottom: 0 !important;
}

.grookfit-my-referral-description {
	margin: 12px 0 !important;
	color: #777 !important;
	font-size: 10px !important;
	line-height: 1.55 !important;
}

.grookfit-referral-change-details {
	margin-top: 10px !important;
}

.grookfit-referral-change-details summary {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 36px !important;
	padding: 0 12px !important;
	border: 1px solid rgba(255,255,255,.14) !important;
	border-radius: 8px !important;
	background: #101010 !important;
	color: #ddd !important;
	cursor: pointer !important;
	list-style: none !important;
	font-size: 9px !important;
	font-weight: 700 !important;
}

.grookfit-referral-change-details summary::-webkit-details-marker {
	display: none !important;
}

.grookfit-referral-change-details summary:hover {
	background: #181818 !important;
	color: #fff !important;
}

.grookfit-referral-change-form {
	margin-top: 12px !important;
	padding: 13px !important;
	border: 1px solid rgba(255,255,255,.07) !important;
	border-radius: 10px !important;
	background: #090909 !important;
}

.grookfit-referral-change-form label,
.grookfit-my-referral-card > form > label {
	display: block !important;
	margin: 0 0 7px !important;
	color: #aaa !important;
	font-size: 9px !important;
	font-weight: 700 !important;
}

@media (max-width: 600px) {
	.grookfit-referral-code-box {
		padding: 14px !important;
		border-radius: 13px !important;
	}

	.grookfit-referral-active {
		align-items: flex-start !important;
		flex-direction: column !important;
	}

	.grookfit-my-referral-card {
		padding: 16px !important;
		border-radius: 14px !important;
	}

	.grookfit-my-referral-current {
		align-items: flex-start !important;
		flex-direction: column !important;
	}

	.grookfit-my-referral-status {
		text-align: left !important;
	}

	.grookfit-referral-code-row button {
		flex-basis: 76px !important;
		width: 76px !important;
		min-width: 76px !important;
	}
}

@media (max-width: 360px) {
	.grookfit-referral-code-row {
		flex-direction: column !important;
	}

	.grookfit-referral-code-row input,
	.grookfit-referral-code-row button {
		width: 100% !important;
		min-width: 0 !important;
		flex: none !important;
	}
}


/* =========================================================
   SHORTCODE OUTPUT + REFERRAL HISTORY CUSTOMER
   ========================================================= */
.grookfit-shortcode-stat {
	display: inline-flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	justify-content: center !important;
	gap: 4px !important;
	min-width: 150px !important;
	padding: 15px 16px !important;
	box-sizing: border-box !important;
	border: 1px solid rgba(255,255,255,.09) !important;
	border-radius: 12px !important;
	background: linear-gradient(145deg,#141414,#0b0b0b) !important;
	color: #eee !important;
}
.grookfit-shortcode-stat .grookfit-shortcode-label {
	color: #666 !important;
	font-size: 8px !important;
	font-weight: 800 !important;
	letter-spacing: .12em !important;
	line-height: 1.3 !important;
	text-transform: uppercase !important;
}
.grookfit-shortcode-stat strong {
	color: #fff !important;
	font-size: 22px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	letter-spacing: -.03em !important;
}
.grookfit-shortcode-stat small {
	color: #666 !important;
	font-size: 9px !important;
	line-height: 1.3 !important;
}
.grookfit-shortcode-stat a {
	margin-top: 3px !important;
	color: #b8ffcf !important;
	font-size: 9px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}
.grookfit-shortcode-stat a:hover { color: #fff !important; }
.grookfit-history-customer { display:flex !important; flex-direction:column !important; gap:3px !important; min-width:140px !important; }
.grookfit-history-customer strong { color:#eee !important; font-size:10px !important; font-weight:700 !important; line-height:1.3 !important; }
.grookfit-history-customer small { color:#5f5f5f !important; font-size:8px !important; line-height:1.3 !important; overflow-wrap:anywhere !important; }
.grookfit-history-customer em { width:max-content !important; padding:3px 6px !important; border:1px solid rgba(255,255,255,.08) !important; border-radius:999px !important; color:#666 !important; background:#101010 !important; font-size:7px !important; font-style:normal !important; font-weight:700 !important; text-transform:uppercase !important; letter-spacing:.06em !important; }
@media (max-width:560px) {
	.grookfit-shortcode-stat { width:100% !important; min-width:0 !important; }
	.grookfit-history-customer { min-width:125px !important; }
}


/* =========================================================
   REFERRAL ELIGIBILITY MESSAGE
   Explains why referral benefits are not unlocked.
   ========================================================= */
.grookfit-referral-eligibility-message{
	display:block !important;
	width:100% !important;
	margin:10px 0 0 !important;
	padding:10px 12px !important;
	box-sizing:border-box !important;
	border-radius:9px !important;
	font-size:9px !important;
	line-height:1.5 !important;
}
.grookfit-referral-eligibility-warning{
	border:1px solid rgba(255,214,126,.16) !important;
	background:rgba(255,214,126,.035) !important;
	color:#e6d6a8 !important;
}
.grookfit-referral-eligibility-success{
	border:1px solid rgba(184,255,207,.14) !important;
	background:rgba(184,255,207,.035) !important;
	color:#b8ffcf !important;
}
.grookfit-referral-active-saved{
	border-color:rgba(255,214,126,.12) !important;
	background:rgba(255,214,126,.025) !important;
}
.grookfit-referral-active-saved em{
	border-color:rgba(255,214,126,.14) !important;
	color:#e6d6a8 !important;
	background:rgba(255,214,126,.025) !important;
}
@media(max-width:600px){
	.grookfit-referral-eligibility-message{
		padding:9px 10px !important;
		font-size:8.5px !important;
	}
}

/* Default GROOKFIT referral suggestion */
.grookfit-default-referral{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:14px;
	width:100%;
	margin:10px 0;
	padding:12px;
	box-sizing:border-box;
	border:1px solid rgba(184,255,207,.12);
	border-radius:11px;
	background:rgba(184,255,207,.025);
}
.grookfit-default-referral-copy{min-width:0}
.grookfit-default-referral-copy span{
	display:block;
	margin-bottom:4px;
	color:#9dffb8;
	font-size:8px;
	font-weight:800;
	letter-spacing:.14em;
}
.grookfit-default-referral-copy strong{
	display:block;
	color:#fff;
	font-size:11px;
}
.grookfit-default-referral-copy small{
	display:block;
	margin-top:4px;
	color:#777;
	font-size:8.5px;
	line-height:1.45;
}
.grookfit-default-referral-button{
	flex:0 0 auto;
	min-height:38px;
	padding:0 13px;
	border:1px solid rgba(184,255,207,.22);
	border-radius:8px;
	background:#101411;
	color:#b8ffcf;
	font-size:9px;
	font-weight:800;
	cursor:pointer;
}
.grookfit-default-referral-button:hover{background:#18211b;border-color:#9dffb8}
.grookfit-default-referral-button.is-loading{opacity:.6;pointer-events:none}
@media(max-width:600px){
	.grookfit-default-referral{align-items:stretch;flex-direction:column;gap:9px;padding:11px}
	.grookfit-default-referral-button{width:100%}
}

/* wallet-adjustment-v046: keep manual wallet updates clear in history */
.grookfit-wallet-transaction.credit .grookfit-transaction-icon{
  color:#9dffb8;
}
.grookfit-wallet-transaction.debit .grookfit-transaction-icon{
  color:#ff9a9a;
}
.grookfit-wallet-transaction.credit .grookfit-transaction-amount strong{
  color:#9dffb8;
}
.grookfit-wallet-transaction.debit .grookfit-transaction-amount strong{
  color:#ff9a9a;
}

/* v048-public-referral: configurable public referral offer */
.grookfit-default-referral-copy span{
  letter-spacing:.12em!important;
}
.grookfit-default-referral-copy small{
  display:block!important;
  line-height:1.55!important;
}
.grookfit-default-referral-button{
  white-space:nowrap!important;
}
@media(max-width:650px){
  .grookfit-default-referral{
    gap:12px!important;
  }
  .grookfit-default-referral-button{
    width:100%!important;
  }
}


/* 1.4.6 account action fallback */
.gf-rd-sidebar-close{display:none!important;}
.gf-rd-account-link{color:#f2f2f2!important;text-decoration:none!important;}


/* v1.5.0 — checkout referral code controls */
.grookfit-referral-code-actions{display:flex;align-items:flex-start;gap:10px;margin-top:12px;flex-wrap:wrap}
.grookfit-referral-code-actions .grookfit-referral-change-details{margin:0;flex:1 1 260px}
.grookfit-referral-code-actions .grookfit-referral-change-details summary{cursor:pointer;display:inline-flex;align-items:center;min-height:42px;padding:0 16px;border:1px solid rgba(255,255,255,.14);border-radius:10px;color:#f3f3f3;background:#111;list-style:none;font-weight:700;font-size:13px}
.grookfit-referral-code-actions .grookfit-referral-change-details summary::-webkit-details-marker{display:none}
.grookfit-referral-inline-change-form{margin-top:10px}
.grookfit-referral-inline-change-form .grookfit-referral-code-row{display:flex;gap:8px}
.grookfit-referral-inline-change-form input{flex:1;min-width:0}
.grookfit-referral-inline-change-form button,.grookfit-referral-clear-form button{min-height:42px;padding:0 15px;border-radius:10px;border:1px solid rgba(255,255,255,.14);font-weight:700;cursor:pointer}
.grookfit-referral-inline-change-form button{background:#fff;color:#111}
.grookfit-referral-clear-form{margin:0}
.grookfit-referral-clear-form button{background:transparent;color:#d8d8d8}
.grookfit-referral-clear-form button:hover{background:#171717;color:#fff}
@media(max-width:600px){
 .grookfit-referral-code-actions{display:block}
 .grookfit-referral-code-actions .grookfit-referral-change-details{display:block}
 .grookfit-referral-code-actions .grookfit-referral-change-details summary{width:100%;justify-content:center;box-sizing:border-box}
 .grookfit-referral-inline-change-form .grookfit-referral-code-row{display:grid;grid-template-columns:1fr;gap:8px}
 .grookfit-referral-inline-change-form button,.grookfit-referral-clear-form button{width:100%}
 .grookfit-referral-clear-form{margin-top:8px}
}

/* =========================================================
   v1.5.1 — Premium dark text selection
   Keeps selected text readable on the dark GROOKFIT UI.
   ========================================================= */
.grookfit-referral-code-box ::selection,
.grookfit-referral-code-box *::selection,
.grookfit-my-referral-card ::selection,
.grookfit-my-referral-card *::selection,
.grookfit-referral-dashboard ::selection,
.grookfit-referral-dashboard *::selection,
.grookfit-referral-page ::selection,
.grookfit-referral-page *::selection,
.grookfit-wallet ::selection,
.grookfit-wallet *::selection,
.grookfit-checkout-referral ::selection,
.grookfit-checkout-referral *::selection,
.grookfit-referral-checkout ::selection,
.grookfit-referral-checkout *::selection {
	background: #ffffff !important;
	color: #111111 !important;
	-webkit-text-fill-color: #111111 !important;
}

.grookfit-referral-code-box ::-moz-selection,
.grookfit-referral-code-box *::-moz-selection,
.grookfit-my-referral-card ::-moz-selection,
.grookfit-my-referral-card *::-moz-selection,
.grookfit-referral-dashboard ::-moz-selection,
.grookfit-referral-dashboard *::-moz-selection,
.grookfit-referral-page ::-moz-selection,
.grookfit-referral-page *::-moz-selection,
.grookfit-wallet ::-moz-selection,
.grookfit-wallet *::-moz-selection,
.grookfit-checkout-referral ::-moz-selection,
.grookfit-checkout-referral *::-moz-selection,
.grookfit-referral-checkout ::-moz-selection,
.grookfit-referral-checkout *::-moz-selection {
	background: #ffffff !important;
	color: #111111 !important;
}



/* v1.5.6 — integrated checkout referral + buyer cashback panel. */
.grookfit-referral-code-box .grookfit-referral-active {
	align-items: center !important;
	gap: 14px !important;
	padding: 13px 14px !important;
	border-color: rgba(184,255,207,.16) !important;
	background: linear-gradient(135deg,rgba(184,255,207,.045),rgba(255,255,255,.012)) !important;
}
.grookfit-referral-active-copy {
	min-width: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 3px !important;
}
.grookfit-referral-active-copy span { margin: 0 !important; font-size: 8px !important; line-height: 1.2 !important; }
.grookfit-referral-active-copy strong { font-size: 12px !important; line-height: 1.3 !important; }
.grookfit-referral-active-copy small {
	margin: 0 !important;
	color: #777 !important;
	font-size: 9px !important;
	font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace !important;
	letter-spacing: .03em !important;
}
.grookfit-referral-code-box .grookfit-referral-active > em {
	margin-left: auto !important;
	padding: 7px 10px !important;
	font-size: 9px !important;
	background: rgba(184,255,207,.035) !important;
}
.grookfit-referral-code-box .grookfit-referral-eligibility-message { margin-top: 9px !important; font-size: 9px !important; }
.grookfit-referral-cashback {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	width: 100% !important;
	margin-top: 9px !important;
	padding: 10px 11px !important;
	border: 1px solid rgba(255,196,76,.14) !important;
	border-radius: 10px !important;
	background: linear-gradient(135deg,rgba(255,196,76,.045),rgba(255,255,255,.012)) !important;
}
.grookfit-referral-cashback-icon {
	flex: 0 0 30px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 30px !important;
	height: 30px !important;
	border: 1px solid rgba(255,196,76,.15) !important;
	border-radius: 9px !important;
	background: rgba(255,196,76,.045) !important;
	font-size: 14px !important;
}
.grookfit-referral-cashback-copy {
	min-width: 0 !important;
	flex: 1 1 auto !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 2px !important;
}
.grookfit-referral-cashback-copy span {
	color: #9a8458 !important;
	font-size: 7px !important;
	font-weight: 800 !important;
	letter-spacing: .11em !important;
	text-transform: uppercase !important;
}
.grookfit-referral-cashback-copy strong { color: #f4f4f4 !important; font-size: 11px !important; font-weight: 800 !important; line-height: 1.25 !important; }
.grookfit-referral-cashback-copy small { color: #777 !important; font-size: 8px !important; line-height: 1.35 !important; }
.grookfit-referral-cashback-value { flex: 0 0 auto !important; color: #f1c75a !important; font-size: 9px !important; font-weight: 800 !important; white-space: nowrap !important; }
.grookfit-referral-cashback-muted { border-color: rgba(255,255,255,.08) !important; background: rgba(255,255,255,.015) !important; }
.grookfit-referral-cashback-muted small { color: #777 !important; font-size: 8px !important; }
@media (max-width: 600px) {
	.grookfit-referral-code-box .grookfit-referral-active { align-items: flex-start !important; padding: 11px !important; gap: 9px !important; }
	.grookfit-referral-active-copy strong { font-size: 11px !important; }
	.grookfit-referral-active-copy small { font-size: 8px !important; }
	.grookfit-referral-code-box .grookfit-referral-active > em { font-size: 8px !important; padding: 6px 8px !important; }
	.grookfit-referral-cashback { align-items: flex-start !important; padding: 9px 10px !important; }
	.grookfit-referral-cashback-value { font-size: 8px !important; padding-top: 3px !important; }
}


/* =========================================================
   v3.0.6 — COMPACT CHECKOUT REFERRAL + WALLET LAYOUT
   Desktop: two widgets share one row.
   Mobile: widgets stack, with referral actions kept on one row.
   ========================================================= */
.woocommerce-checkout .grookfit-referral-code-box,
.woocommerce-cart .grookfit-referral-code-box {
	display: inline-block !important;
	vertical-align: top !important;
	width: calc(50% - 7px) !important;
	max-width: calc(50% - 7px) !important;
	margin: 0 10px 16px 0 !important;
	padding: 12px !important;
}

.woocommerce-checkout .grookfit-checkout-wallet,
.woocommerce-cart .grookfit-checkout-wallet {
	display: inline-block !important;
	vertical-align: top !important;
	width: calc(50% - 7px) !important;
	max-width: calc(50% - 7px) !important;
	margin: 0 0 16px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-code-header,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-code-header {
	margin: 0 0 8px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-code-header strong,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-code-header strong {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 11px !important;
	line-height: 1.25 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-code-header strong i,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-code-header strong i {
	color: #d6c28a !important;
	font-size: 11px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-code-header small,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-code-header small {
	margin-top: 3px !important;
	font-size: 8px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active {
	min-height: 0 !important;
	padding: 9px 10px !important;
	gap: 8px !important;
	border-radius: 9px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy {
	gap: 2px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy span,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy span {
	font-size: 7px !important;
	line-height: 1.15 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy strong,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy strong {
	font-size: 10px !important;
	line-height: 1.2 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy small,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy small {
	font-size: 7px !important;
	line-height: 1.15 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active > em,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active > em {
	padding: 6px 8px !important;
	font-size: 8px !important;
	line-height: 1 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-eligibility-message,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-eligibility-message {
	margin-top: 6px !important;
	padding: 6px 8px !important;
	font-size: 7px !important;
	line-height: 1.3 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-code-actions,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-code-actions {
	display: grid !important;
	grid-template-columns: minmax(0,1fr) 42px !important;
	align-items: center !important;
	gap: 6px !important;
	margin-top: 7px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-change-details,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-change-details {
	min-width: 0 !important;
	width: 100% !important;
	margin: 0 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-change-details summary,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-change-details summary {
	justify-content: center !important;
	width: 100% !important;
	min-height: 34px !important;
	padding: 0 8px !important;
	border-radius: 8px !important;
	font-size: 8px !important;
	line-height: 1 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-clear-form,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-clear-form {
	width: 42px !important;
	margin: 0 !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-clear-form button,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-clear-form button,
.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-remove-button,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-remove-button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 42px !important;
	min-width: 42px !important;
	height: 34px !important;
	min-height: 34px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(255,255,255,.14) !important;
	border-radius: 8px !important;
	background: transparent !important;
	color: #b9b9b9 !important;
	font-size: 11px !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-remove-button span,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-remove-button span {
	display: none !important;
}

.woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-remove-button:hover,
.woocommerce-cart .grookfit-referral-code-box .grookfit-referral-remove-button:hover {
	border-color: rgba(255,130,130,.35) !important;
	background: rgba(255,90,90,.05) !important;
	color: #ff9a9a !important;
}

.woocommerce-checkout .grookfit-checkout-wallet .grookfit-wallet-panel,
.woocommerce-cart .grookfit-checkout-wallet .grookfit-wallet-panel {
	padding: 12px !important;
	border-radius: 14px !important;
}

.woocommerce-checkout .grookfit-checkout-wallet .grookfit-wallet-heading,
.woocommerce-cart .grookfit-checkout-wallet .grookfit-wallet-heading {
	margin-bottom: 9px !important;
	padding-bottom: 9px !important;
}

.woocommerce-checkout .grookfit-checkout-wallet .grookfit-wallet-heading strong,
.woocommerce-cart .grookfit-checkout-wallet .grookfit-wallet-heading strong {
	display: inline-flex !important;
	align-items: center !important;
	gap: 5px !important;
	font-size: 11px !important;
}

.woocommerce-checkout .grookfit-checkout-wallet .grookfit-wallet-heading strong i,
.woocommerce-cart .grookfit-checkout-wallet .grookfit-wallet-heading strong i {
	color: #d6c28a !important;
}

.woocommerce-checkout .grookfit-checkout-wallet .grookfit-wallet-balance,
.woocommerce-cart .grookfit-checkout-wallet .grookfit-wallet-balance {
	padding: 10px 11px !important;
	border-radius: 9px !important;
}

.woocommerce-checkout .grookfit-checkout-wallet .grookfit-wallet-form,
.woocommerce-cart .grookfit-checkout-wallet .grookfit-wallet-form {
	margin-top: 10px !important;
}

@media (max-width: 767px) {
	.woocommerce-checkout .grookfit-referral-code-box,
	.woocommerce-cart .grookfit-referral-code-box,
	.woocommerce-checkout .grookfit-checkout-wallet,
	.woocommerce-cart .grookfit-checkout-wallet {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-right: 0 !important;
	}

	.woocommerce-checkout .grookfit-referral-code-box,
	.woocommerce-cart .grookfit-referral-code-box {
		margin-bottom: 10px !important;
		padding: 10px !important;
	}

	.woocommerce-checkout .grookfit-checkout-wallet,
	.woocommerce-cart .grookfit-checkout-wallet {
		margin-bottom: 12px !important;
	}
}


/* v3.0.7 — mobile checkout referral reward alignment
 * Keep the applied referral information compact and vertically balanced.
 * The discount badge is anchored to the true middle of the card so it never
 * drops to a second visual row or creates dead space above/below it.
 */
@media (max-width: 767px) {
  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active {
    position: relative !important;
    display: block !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 8px 88px 8px 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy {
    width: 100% !important;
    min-width: 0 !important;
    gap: 1px !important;
  }

  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy span,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy span {
    margin: 0 !important;
    line-height: 1.1 !important;
  }

  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy strong,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy strong {
    display: block !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active-copy small,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active-copy small {
    display: block !important;
    margin: 0 !important;
    line-height: 1.1 !important;
  }

  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-active > em,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-active > em {
    position: absolute !important;
    top: 50% !important;
    right: 10px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 78px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-eligibility-message,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-eligibility-message {
    margin-top: 5px !important;
    padding: 6px 8px !important;
    line-height: 1.25 !important;
  }

  .woocommerce-checkout .grookfit-referral-code-box .grookfit-referral-code-actions,
  .woocommerce-cart .grookfit-referral-code-box .grookfit-referral-code-actions {
    margin-top: 6px !important;
  }
}


/* =========================================================
   v3.0.8 — CHECKOUT REWARDS ROW
   Keep the GROOKFIT referral and wallet widgets together in
   their own dedicated row. This prevents the Quick Buy notice
   or other checkout elements from occupying one of their grid
   columns and leaving an awkward half-empty layout.
   ========================================================= */
.woocommerce-checkout .grookfit-checkout-rewards-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  align-items: stretch !important;
  clear: both !important;
}

.woocommerce-checkout .grookfit-checkout-rewards-row > .grookfit-referral-code-box,
.woocommerce-checkout .grookfit-checkout-rewards-row > .grookfit-checkout-wallet {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.woocommerce-checkout .grookfit-checkout-rewards-row > .grookfit-referral-code-box {
  padding: 12px !important;
}

.woocommerce-checkout .grookfit-checkout-rewards-row .grookfit-referral-eligibility-success {
  display: none !important;
}

@media (max-width: 767px) {
  .woocommerce-checkout .grookfit-checkout-rewards-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }

  .woocommerce-checkout .grookfit-checkout-rewards-row > .grookfit-referral-code-box {
    padding: 9px !important;
  }
}
