/*
 * Rank benefits on /my-account/account-rank/, rendered under the rank card.
 * Deliberately the same visual language as assets/account-ranks.css in
 * sst-account-ranks: white card, hairline border, accent rule on the left.
 */

.sst-rb-card {
	--sst-rb-accent: #7d5ba6;
	background: #fff;
	border: 1px solid #e2e5e9;
	border-left: 6px solid var(--sst-rb-accent);
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
	margin: 1.5rem 0;
	padding: clamp(1rem, 3vw, 1.75rem);
}

.sst-rb-card__heading {
	align-items: flex-start;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
}

.sst-rb-card__heading h2 {
	font-size: 1.15rem;
	margin: 0.15rem 0 0;
}

.sst-rb-card__eyebrow {
	color: var(--sst-rb-accent);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sst-rb-status {
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 0.25rem 0.7rem;
	text-transform: uppercase;
	white-space: nowrap;
}

.sst-rb-status--available {
	background: #e7f5ec;
	color: #1f7a4d;
}

.sst-rb-status--used {
	background: #eef0f2;
	color: #5a626b;
}

.sst-rb-code {
	margin: 1rem 0 0.75rem;
}

.sst-rb-code code {
	background: #faf8fd;
	border: 1px dashed var(--sst-rb-accent);
	border-radius: 6px;
	display: inline-block;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 0.5rem 0.9rem;
	word-break: break-all;
}

.sst-rb-meta {
	display: grid;
	gap: 0.5rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0 0 0.9rem;
}

.sst-rb-meta div {
	background: #f7f8fa;
	border-radius: 5px;
	padding: 0.65rem 0.8rem;
}

.sst-rb-meta dt {
	font-size: 0.78rem;
	font-weight: 700;
}

.sst-rb-meta dd {
	margin: 0.2rem 0 0;
}

.sst-rb-card__note {
	color: #4f555c;
	font-size: 0.9rem;
	line-height: 1.55;
	margin: 0 0 0.4rem;
}

/* The rank gift coupons the account holds, under the Regular coupon card.
   Deliberately quieter than that card: a compact list, one row per code. */
.sst-rb-card--codes {
	--sst-rb-accent: #a16207;
}

.sst-rb-codes {
	list-style: none;
	margin: 0.9rem 0 0.9rem;
	padding: 0;
}

.sst-rb-codes__item {
	align-items: center;
	border-top: 1px solid #eef0f2;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin: 0;
	padding: 0.55rem 0;
}

.sst-rb-codes__item:first-child {
	border-top: 0;
}

.sst-rb-codes__item code {
	background: #fdfaf3;
	border: 1px dashed var(--sst-rb-accent);
	border-radius: 5px;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 0.3rem 0.6rem;
	word-break: break-all;
}

.sst-rb-codes__until {
	color: #6b7178;
	font-size: 0.85rem;
}

/* The claim call to action (0.4.0). The theme's own .button supplies the shape;
   only the accent and the full-width behaviour on a phone are set here, so the
   button still reads as one of the shop's. */
.sst-rb-claim {
	margin: 1rem 0 0.6rem;
}

.sst-rb-claim__button {
	background: var(--sst-rb-accent);
	border-radius: 6px;
	color: #fff;
	display: inline-block;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.7rem 1.4rem;
	text-decoration: none;
}

.sst-rb-claim__button:hover,
.sst-rb-claim__button:focus {
	background: #7a4a05;
	color: #fff;
}

.sst-rb-benefits {
	margin: 1.5rem 0;
}

.sst-rb-benefits h2 {
	font-size: 1.15rem;
	margin: 0 0 0.75rem;
}

.sst-rb-table-wrap {
	overflow-x: auto;
}

.sst-rb-row.is-current {
	background: #f6f2fb;
	font-weight: 600;
}

.sst-rb-you {
	background: var(--sst-rb-accent, #7d5ba6);
	border-radius: 999px;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	margin-left: 0.4rem;
	padding: 0.1rem 0.5rem;
	text-transform: uppercase;
	vertical-align: middle;
}

.sst-rb-benefits__note {
	color: #6b7178;
	font-size: 0.85rem;
	line-height: 1.55;
	margin: 0.5rem 0 0;
}

/* The trial-period line sits above the table and introduces it, so it reads as
   part of the table rather than as a footnote. */
.sst-rb-benefits__note--trial {
	color: #4f555c;
	margin: 0 0 0.6rem;
}

/* The "coming soon" line under a live rate in the Benefit cell. */
.sst-rb-benefit-extra {
	color: #6b7178;
	display: block;
	font-size: 0.85em;
	margin-top: 0.2rem;
}

@media (max-width: 600px) {
	.sst-rb-card__heading {
		display: block;
	}

	.sst-rb-status {
		display: inline-block;
		margin-top: 0.75rem;
	}

	.sst-rb-meta {
		grid-template-columns: 1fr;
	}

	.sst-rb-claim__button {
		display: block;
		text-align: center;
	}
}
