/* =============================================================================
   Hefner Coins — Frontend Styles
   ============================================================================= */

/* ── Balance display ─────────────────────────────────────────────────────── */

.hc-balance-display {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 0.95em;
	font-weight: 600;
	color: #ffd86b;
	background: rgba(35, 33, 58, 0.85);
	border: 1px solid rgba(255, 216, 107, 0.25);
	border-radius: 20px;
	padding: 8px 18px;
	margin: 10px auto 14px;
	width: fit-content;
	box-shadow: 0 2px 10px rgba(255, 216, 107, 0.1);
}

.hc-balance-display--clickable {
	cursor: pointer;
	transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hc-balance-display--clickable:hover,
.hc-balance-display--clickable:focus-visible {
	transform: translateY(-1px);
	border-color: rgba(255, 216, 107, 0.55);
	box-shadow: 0 5px 16px rgba(255, 216, 107, 0.2);
	outline: none;
}

.hc-coin-icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
	vertical-align: middle;
	flex-shrink: 0;
}

/* ── Promoted suggestion ─────────────────────────────────────────────────── */

#patreon-suggestions-list li.hc-promoted {
	box-shadow: 0 0 0 2px #f59e0b, 0 0 22px rgba(245, 158, 11, 0.45) !important;
	border-radius: 8px;
	animation: hc-pulse 2.5s ease-in-out infinite;
	position: relative;
	overflow: hidden;
}

@keyframes hc-pulse {
	0%,  100% { box-shadow: 0 0 0 2px #f59e0b, 0 0 18px rgba(245, 158, 11, 0.40); }
	50%        { box-shadow: 0 0 0 3px #fbbf24, 0 0 28px rgba(251, 191, 36, 0.65); }
}

/*
 * Theme uses li::before for a thin vertical accent bar. We hijacked that pseudo-element
 * for the watermark and merged with its gradient — causing a stray "colour bar".
 * Promoted cards: hide ::before; put a full-card repeating watermark on ::after.
 */
#patreon-suggestions-list li.hc-promoted::before {
	content: none !important;
	display: none !important;
	width: 0 !important;
	background: none !important;
	opacity: 0 !important;
}

/*
 * Repeating "PROMOTED" watermark:
 * - inset 0, flush with the inner card.
 * - Wider pattern tile with several diagonal copies per row so each repeat spans
 *   left→right (no big empty margin from centering one word).
 * - background-position: left 50% — first tile flush to the left border, vertically centred.
 * - Touch devices: watermark always visible. Mouse / fine pointer: hidden until hover (or focus-within).
 */
#patreon-suggestions-list li.hc-promoted::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 1;
	opacity: 1;
	transition: opacity 0.28s ease;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='360' viewBox='0 0 720 360'%3E%3Cdefs%3E%3Cpattern id='hcwm' patternUnits='userSpaceOnUse' width='720' height='360'%3E%3Cg transform='translate(88 108) rotate(-20)'%3E%3Ctext x='0' y='0' dy='0.35em' text-anchor='middle' font-family='system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif' font-size='22' font-weight='900' fill='rgba(255,216,107,0.12)' letter-spacing='0.22em'%3EPROMOTED%3C/text%3E%3C/g%3E%3Cg transform='translate(360 108) rotate(-20)'%3E%3Ctext x='0' y='0' dy='0.35em' text-anchor='middle' font-family='system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif' font-size='22' font-weight='900' fill='rgba(255,216,107,0.12)' letter-spacing='0.22em'%3EPROMOTED%3C/text%3E%3C/g%3E%3Cg transform='translate(600 108) rotate(-20)'%3E%3Ctext x='0' y='0' dy='0.35em' text-anchor='middle' font-family='system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif' font-size='22' font-weight='900' fill='rgba(255,216,107,0.12)' letter-spacing='0.22em'%3EPROMOTED%3C/text%3E%3C/g%3E%3Cg transform='translate(240 248) rotate(-20)'%3E%3Ctext x='0' y='0' dy='0.35em' text-anchor='middle' font-family='system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif' font-size='22' font-weight='900' fill='rgba(255,216,107,0.12)' letter-spacing='0.22em'%3EPROMOTED%3C/text%3E%3C/g%3E%3Cg transform='translate(480 248) rotate(-20)'%3E%3Ctext x='0' y='0' dy='0.35em' text-anchor='middle' font-family='system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif' font-size='22' font-weight='900' fill='rgba(255,216,107,0.12)' letter-spacing='0.22em'%3EPROMOTED%3C/text%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23hcwm)'/%3E%3C/svg%3E");
	background-size: 360px 180px;
	background-repeat: repeat;
	background-position: left 50%;
}

@media (hover: hover) and (pointer: fine) {
	#patreon-suggestions-list li.hc-promoted::after {
		opacity: 0;
	}

	#patreon-suggestions-list li.hc-promoted:hover::after,
	#patreon-suggestions-list li.hc-promoted:focus-within::after {
		opacity: 1;
	}
}

#patreon-suggestions-list li.hc-promoted > * {
	position: relative;
	z-index: 2;
}

.hc-promotion-timer {
	font-size: 0.78em;
	color: #f59e0b;
	font-weight: 600;
	margin-left: 8px;
	white-space: nowrap;
}

/* ── Promote button on suggestion cards ─────────────────────────────────── */

.hc-promote-btn {
	background: transparent;
	border: 1px solid rgba(245, 158, 11, 0.4);
	border-radius: 6px;
	cursor: pointer;
	padding: 4px 10px;
	font-size: 0.82em;
	color: #f59e0b;
	transition: background 0.18s, border-color 0.18s;
	margin-left: 4px;
	vertical-align: middle;
}

.hc-promote-btn:hover {
	background: rgba(245, 158, 11, 0.15);
	border-color: #f59e0b;
}

/* ── Modal overlay ───────────────────────────────────────────────────────── */

.hc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hc-modal-box {
	position: relative;
	background: #1e1c36;
	border: 1px solid #f59e0b;
	border-radius: 14px;
	padding: 30px 34px 26px;
	max-width: 440px;
	width: 92%;
	color: #e2e8f0;
	box-shadow: 0 0 40px rgba(245, 158, 11, 0.28);
	text-align: center;
}

.hc-modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: transparent;
	border: none;
	color: #9ca3af;
	font-size: 1.4em;
	cursor: pointer;
	line-height: 1;
	padding: 0;
}

.hc-modal-close:hover {
	color: #f9fafb;
}

.hc-modal-box h3 {
	margin: 0 0 10px;
	color: #ffd86b;
	font-size: 1.15em;
}

.hc-modal-suggestion-title {
	font-size: 0.95em;
	color: #cbd5e1;
	margin: 0 0 14px;
	font-weight: 600;
	word-break: break-word;
}

.hc-modal-balance-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 0.9em;
	margin-bottom: 16px;
	color: #94a3b8;
}

.hc-modal-balance-row strong {
	color: #ffd86b;
}

.hc-coin-icon-sm {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.hc-modal-label {
	display: block;
	font-size: 0.9em;
	color: #94a3b8;
	margin-bottom: 12px;
	text-align: center;
}

.hc-duration-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 6px;
}

.hc-duration-input {
	width: 80px;
	padding: 5px 8px;
	border-radius: 6px;
	border: 1px solid #4a4777;
	background: #2d2b4e;
	color: #e2e8f0;
	font-size: 1em;
}

.hc-modal-cost-row {
	font-size: 0.9em;
	color: #94a3b8;
	margin: 0 0 10px;
}

.hc-modal-cost-row strong {
	color: #ffd86b;
}

.hc-modal-error {
	min-height: 1.2em;
	font-size: 0.88em;
	color: transparent;
	margin: 0 0 8px;
	transition: color 0.2s;
	text-align: center;
}

.hc-modal-error--visible {
	color: #f87171;
}

.hc-modal-actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 16px;
}

/* ── Suggestion selector modal ───────────────────────────────────────────── */

.hc-selector-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.72);
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.hc-selector-box {
	position: relative;
	width: min(920px, 96vw);
	max-height: 85vh;
	overflow: hidden;
	background: #1e1c36;
	border: 1px solid #f59e0b;
	border-radius: 14px;
	box-shadow: 0 0 40px rgba(245, 158, 11, 0.28);
	padding: 22px 20px 16px;
	color: #e2e8f0;
}

.hc-selector-box h3 {
	margin: 0 0 12px;
	color: #ffd86b;
	text-align: center;
}

.hc-selector-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: transparent;
	border: none;
	color: #9ca3af;
	font-size: 1.4em;
	cursor: pointer;
}

.hc-selector-close:hover {
	color: #f9fafb;
}

/* ── Hefner Coins guide (slot wallet / help) ─────────────────────────────── */

.hc-info-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
	z-index: 100005;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.hc-info-box {
	position: relative;
	width: min(560px, 96vw);
	max-height: min(88vh, 720px);
	display: flex;
	flex-direction: column;
	background: #1e1c36;
	border: 1px solid rgba(255, 216, 107, 0.45);
	border-radius: 14px;
	box-shadow: 0 0 48px rgba(255, 216, 107, 0.22);
	color: #e2e8f0;
	overflow: hidden;
}

.hc-info-box > h3 {
	flex-shrink: 0;
	margin: 0;
	padding: 22px 48px 12px 22px;
	color: #ffd86b;
	font-size: 1.25em;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hc-info-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: transparent;
	border: none;
	color: #9ca3af;
	font-size: 1.5em;
	cursor: pointer;
	line-height: 1;
	padding: 4px;
	z-index: 2;
}

.hc-info-close:hover {
	color: #f9fafb;
}

.hc-info-body {
	overflow-y: auto;
	padding: 16px 22px 10px;
	font-size: 0.92em;
	line-height: 1.55;
	text-align: left;
}

.hc-info-body h4 {
	margin: 1.1em 0 0.45em;
	color: #fbbf24;
	font-size: 1em;
	font-weight: 700;
}

.hc-info-body h4:first-child {
	margin-top: 0;
}

.hc-info-lead {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 16px;
	padding: 10px 12px;
	background: rgba(0, 0, 0, 0.22);
	border-radius: 10px;
	text-align: center;
	font-size: 0.98em;
	color: #cbd5e1;
}

.hc-info-lead strong {
	color: #ffd86b;
	font-size: 1.05em;
}

.hc-info-list {
	margin: 0 0 10px 1em;
	padding: 0;
	list-style: disc;
	color: #cbd5e1;
}

.hc-info-list li {
	margin: 0.35em 0;
}

.hc-info-list strong {
	color: #e2e8f0;
}

.hc-info-note {
	font-size: 0.88em;
	color: #94a3b8;
	margin: 0 0 12px;
	font-style: italic;
}

.hc-info-actions {
	flex-shrink: 0;
	padding: 14px 22px 20px;
	display: flex;
	justify-content: center;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hc-info-promote-btn {
	background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.12));
	border: 1px solid rgba(245, 158, 11, 0.55);
	border-radius: 10px;
	color: #ffd86b;
	cursor: pointer;
	font-size: 0.95em;
	font-weight: 600;
	padding: 10px 18px;
	transition: background 0.18s, border-color 0.18s;
}

.hc-info-promote-btn:hover {
	background: rgba(245, 158, 11, 0.22);
	border-color: #f59e0b;
}

.hc-info-promote-btn:disabled {
	cursor: not-allowed;
	opacity: 0.55;
	background: rgba(55, 65, 81, 0.45);
	border-color: rgba(148, 163, 184, 0.4);
	color: #94a3b8;
}

.hc-info-promote-btn:disabled:hover {
	background: rgba(55, 65, 81, 0.45);
	border-color: rgba(148, 163, 184, 0.4);
}

.hc-selector-search {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid #4a4777;
	background: #2d2b4e;
	color: #e2e8f0;
	padding: 10px 12px;
	margin-bottom: 14px;
}

.hc-selector-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 10px;
	max-height: calc(85vh - 150px);
	overflow: auto;
	padding-right: 4px;
}

.hc-selector-card {
	border: 1px solid #403e6d;
	background: rgba(22, 20, 42, 0.92);
	color: #e2e8f0;
	border-radius: 10px;
	padding: 10px 11px;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, transform 0.15s ease;
}

.hc-selector-card:hover {
	border-color: #f59e0b;
	background: rgba(34, 31, 63, 0.96);
	transform: translateY(-1px);
}

.hc-selector-title {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
	color: #f8fafc;
}

.hc-selector-meta {
	display: block;
	color: #94a3b8;
	font-size: 0.82em;
}

.hc-selector-empty {
	text-align: center;
	color: #94a3b8;
	padding: 14px 8px 6px;
}

.hc-modal-confirm {
	background: linear-gradient(135deg, #f59e0b, #fbbf24);
	color: #1a1200;
	border: none;
	padding: 10px 24px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 700;
	font-size: 1em;
	transition: filter 0.15s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 6px;
}

.hc-modal-confirm:hover:not(:disabled) {
	filter: brightness(1.1);
}

.hc-modal-confirm:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.hc-modal-cancel {
	background: transparent;
	border: 1px solid #4a4777;
	color: #94a3b8;
	padding: 10px 18px;
	border-radius: 8px;
	cursor: pointer;
	font-size: 1em;
	transition: background 0.15s;
}

.hc-modal-cancel:hover {
	background: rgba(255, 255, 255, 0.05);
}
