/* =========================================================
   ACE Member Benefits — My Account tab styles
   Palette: ACE dark teal #1c3a2f · gold #c9a227
   ========================================================= */

/* ── Wrapper ─────────────────────────────────────────────── */
.ace-member-benefits {
	max-width: 860px;
	font-family: inherit;
	color: #1a1a1a;
}

/* ── Page header ─────────────────────────────────────────── */
.ace-benefits-header h2 {
	font-size: 2rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #1c3a2f;
	margin: 0 0 4px;
}

.ace-benefits-subtitle {
	font-size: 0.85rem;
	color: #666;
	border-bottom: 3px solid #c9a227;
	padding-bottom: 16px;
	margin-bottom: 40px;
}

/* ── Sections ────────────────────────────────────────────── */
.ace-benefits-section { margin-bottom: 52px; }

.ace-section-title-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 6px;
}

.ace-section-title-row h3 {
	font-size: 1rem;
	font-weight: 700;
	text-transform: lowercase;
	letter-spacing: 0.04em;
	color: #1c3a2f;
	margin: 0;
}

.ace-section-intro {
	font-size: 0.85rem;
	color: #777;
	margin-bottom: 20px;
	font-style: italic;
}

/* ── Discount grid ───────────────────────────────────────── */
.ace-discount-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 20px;
}

/* ── Discount card ───────────────────────────────────────── */
.ace-discount-card {
	display: flex;
	flex-direction: column;
	gap: 12px;

	background: #faf8f3;
	border: 1.5px solid #e8e0cc;
	border-radius: 10px;
	padding: 20px 22px;

	cursor: pointer;
	transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
	position: relative;
}

/* Invisible full-card overlay link.
   Sits at z-index 1 inside the card div so the entire surface is clickable
   without wrapping block children in <a> (which triggers wpautop corruption). */
.ace-card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 10px;
}

/* Hover: lift + gold border */
.ace-discount-card:hover {
	border-color: #c9a227;
	box-shadow: 0 6px 20px rgba(201, 162, 39, 0.18);
	transform: translateY( -2px );
	text-decoration: none !important;
}

/* Small "↗" external link indicator in top-right corner */
.ace-discount-card::after {
	content: '↗';
	position: absolute;
	top: 12px;
	right: 14px;
	font-size: 0.75rem;
	color: #c9a227;
	opacity: 0;
	transition: opacity 0.18s;
}
.ace-discount-card:hover::after { opacity: 1; }

/* ── Card header ─────────────────────────────────────────── */
.ace-discount-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
	padding-right: 18px; /* room for the ↗ indicator */
}

.ace-partner-name {
	font-size: 1.05rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #1c3a2f;
	line-height: 1.2;
}

.ace-discount-badge {
	background: #fff;
	border: 1.5px solid #c9a227;
	color: #1a1a1a;
	font-size: 0.68rem;
	font-weight: 700;
	border-radius: 20px;
	padding: 3px 10px;
	white-space: nowrap;
	flex-shrink: 0;
}

.ace-partner-description {
	font-size: 0.82rem;
	color: #c9a227;
	font-weight: 600;
	margin: 0;
}

/* ── Code row — clickable, copies code ───────────────────── */
.ace-code-row {
	display: flex;
	align-items: center;
	border: 1.5px dashed #c9a227;
	border-radius: 6px;
	padding: 9px 14px;
	gap: 8px;
	background: #fff;

	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;

	/* Sit above the .ace-card-link overlay so its own click handler fires */
	position: relative;
	z-index: 2;
}

.ace-code-row:hover {
	background: #fdf3d4;
	border-color: #a6851e;
	border-style: solid;
}

/* "Copied!" flash state */
.ace-code-row.ace-copied {
	background: #eaf7ee;
	border-color: #3a8c5c;
	border-style: solid;
}

.ace-code-label {
	font-size: 0.78rem;
	font-weight: 700;
	color: #333;
	flex-shrink: 0;
}

.ace-code-value {
	flex: 1;
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	color: #1a1a1a;
	text-align: right;
	font-family: 'Courier New', monospace;
}

/* The small hint text shown on the right */
.ace-copy-hint {
	font-size: 0.72rem;
	color: #aaa;
	flex-shrink: 0;
	transition: color 0.15s;
}
.ace-code-row:hover .ace-copy-hint  { color: #a6851e; }
.ace-code-row.ace-copied .ace-copy-hint { color: #3a8c5c; }

/* ── Partner website link at bottom of card ──────────────── */
.ace-partner-website {
	font-size: 0.8rem;
	font-weight: 700;
	color: #1c3a2f;
	text-decoration: underline;
	text-underline-offset: 3px;
	margin-top: auto; /* push to bottom */
}

/* ── Empty state ─────────────────────────────────────────── */
.ace-no-partners {
	color: #999;
	font-style: italic;
	font-size: 0.9rem;
}

/* ── Badge grid ──────────────────────────────────────────── */
.ace-badge-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 20px;
}

.ace-badge-card {
	background: #faf8f3;
	border: 1px solid #e8e0cc;
	border-radius: 10px;
	padding: 24px 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ace-badge-card h4 {
	font-size: 0.95rem;
	font-weight: 700;
	color: #1c3a2f;
	margin: 0;
}

.ace-badge-card p { font-size: 0.85rem; color: #555; margin: 0; }

.ace-download-btn {
	display: inline-flex;
	align-items: center;
	height: auto;
	min-height: 0;
	padding: 6px 14px;
	background: #c9a227;
	color: #fff;
	font-size: 0.83rem;
	font-weight: 600;
	line-height: 1;
	border-radius: 4px;
	text-decoration: none;
}
.ace-download-btn:hover { background: #a6851e; color: #fff; }

/* ── Copy toast notification ─────────────────────────────── */
#ace-copy-toast {
	position: fixed;
	bottom: 28px;
	left: 50%;
	transform: translateX( -50% ) translateY( 20px );
	background: #1c3a2f;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 10px 22px;
	border-radius: 24px;
	box-shadow: 0 4px 16px rgba(0,0,0,.25);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
	z-index: 9999;
}

#ace-copy-toast.ace-toast-visible {
	opacity: 1;
	transform: translateX( -50% ) translateY( 0 );
}

/* ── Responsive ──────────────────────────────────────────── */
@media ( max-width: 600px ) {
	.ace-benefits-header h2   { font-size: 1.4rem; }
	.ace-discount-grid,
	.ace-badge-grid { grid-template-columns: 1fr; }
}
