/*
© 2026 Deseo Developers LLC. All rights reserved.
Credit Card Compass guided tour — purple theme spotlight overlay.
*/

html {
	--ccc-safe-bottom: env(safe-area-inset-bottom, 0px);
	--ccc-safe-left: env(safe-area-inset-left, 0px);
	--ccc-safe-right: env(safe-area-inset-right, 0px);
}

html.ccc-tutorial-scroll-lock,
body.ccc-tutorial-scroll-lock,
html.ccc-help-scroll-lock,
body.ccc-help-scroll-lock {
	overflow: hidden !important;
	overscroll-behavior: none;
}

#ccc-tutorial-root {
	position: fixed;
	inset: 0;
	z-index: 75;
	pointer-events: none;
}

.ccc-tutorial-shade {
	position: fixed;
	display: none;
	background: rgba(15, 23, 42, 0.52);
	pointer-events: auto;
	z-index: 1;
}

#ccc-tutorial-card {
	position: fixed;
	z-index: 85;
	width: min(22rem, calc(100vw - 2rem));
	max-width: 22rem;
	overflow: visible;
	pointer-events: auto;
	--ccc-tutorial-arrow: rgba(168, 85, 247, 0.92);
	border-radius: 1rem;
}

#ccc-tutorial-card .ccc-tutorial-card-body {
	overflow-y: auto;
	max-height: min(85dvh, calc(100dvh - 2rem));
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	border-radius: inherit;
	background: inherit;
	position: relative;
	z-index: 1;
}

/* Light app → dark tutorial card for contrast */
body:not(.dark-mode) #ccc-tutorial-card {
	background: #1e293b;
	border: 1px solid rgba(192, 132, 252, 0.85);
	color: #e2e8f0;
	--ccc-tutorial-arrow: #a855f7;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-section,
body:not(.dark-mode) #ccc-tutorial-card .ccc-tutorial-section-label {
	color: #a78bfa !important;
}

body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-title {
	color: #ffffff !important;
}

body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-body {
	color: #94a3b8;
}

body:not(.dark-mode) #ccc-tutorial-card .ccc-tutorial-step-label {
	color: #64748b;
}

body:not(.dark-mode) #ccc-tutorial-card .ccc-tutorial-card-body > .flex {
	border-color: rgba(148, 163, 184, 0.35);
}

body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-back,
body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-skip,
body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-dismiss {
	border-color: rgba(148, 163, 184, 0.45);
	color: #e2e8f0;
	background: transparent;
}

body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-back:hover,
body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-skip:hover,
body:not(.dark-mode) #ccc-tutorial-card #ccc-tutorial-dismiss:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* Dark app → light tutorial card for contrast */
body.dark-mode #ccc-tutorial-card {
	background: #ffffff;
	border: 1px solid rgba(124, 58, 237, 0.85);
	color: #0f172a;
	--ccc-tutorial-arrow: #a855f7;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body:not(.dark-mode) #ccc-tutorial-card.ccc-tutorial-card--header-arrow {
	--ccc-tutorial-arrow: #1e293b;
}

body.dark-mode #ccc-tutorial-card #ccc-tutorial-section,
body.dark-mode #ccc-tutorial-card .ccc-tutorial-section-label {
	color: #6d28d9 !important;
}

body.dark-mode #ccc-tutorial-card #ccc-tutorial-title {
	color: #0f172a !important;
}

body.dark-mode #ccc-tutorial-card #ccc-tutorial-body {
	color: #475569;
}

body.dark-mode #ccc-tutorial-card .ccc-tutorial-step-label {
	color: #64748b;
}

body.dark-mode #ccc-tutorial-card .ccc-tutorial-card-body > .flex {
	border-color: #e2e8f0;
}

body.dark-mode #ccc-tutorial-card #ccc-tutorial-back,
body.dark-mode #ccc-tutorial-card #ccc-tutorial-skip,
body.dark-mode #ccc-tutorial-card #ccc-tutorial-dismiss {
	border-color: #cbd5e1;
	color: #334155;
	background: transparent;
}

body.dark-mode #ccc-tutorial-card #ccc-tutorial-back:hover,
body.dark-mode #ccc-tutorial-card #ccc-tutorial-skip:hover,
body.dark-mode #ccc-tutorial-card #ccc-tutorial-dismiss:hover {
	background: #f8fafc;
}

#ccc-tutorial-card #ccc-tutorial-back.hidden {
	display: none !important;
}

#ccc-tutorial-next {
	background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
	color: #ffffff;
	border: none;
}

#ccc-tutorial-next:hover,
#ccc-tutorial-next:focus {
	background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
	color: #ffffff;
}

#ccc-tutorial-card.ccc-tutorial-card--docked {
	width: auto;
	max-width: none;
}

@media (orientation: landscape) and (max-height: 500px) {
	#ccc-tutorial-card,
	#ccc-tutorial-card.ccc-tutorial-card--docked {
		width: min(28rem, calc(100vw - 1.25rem - var(--ccc-safe-left, 0px) - var(--ccc-safe-right, 0px)));
		max-width: min(28rem, calc(100vw - 1.25rem - var(--ccc-safe-left, 0px) - var(--ccc-safe-right, 0px)));
		right: auto;
	}

	#ccc-tutorial-card .ccc-tutorial-card-body,
	#ccc-tutorial-card .ccc-tutorial-card-body.p-5 {
		display: flex;
		flex-direction: column;
		padding: 0.8rem 1rem 0.85rem;
		max-height: min(calc(100svh - var(--ccc-safe-bottom, 0px) - 0.75rem), calc(100dvh - 0.75rem));
		overflow: hidden;
	}

	#ccc-tutorial-card .ccc-tutorial-progress,
	#ccc-tutorial-card #ccc-tutorial-section,
	#ccc-tutorial-card #ccc-tutorial-title,
	#ccc-tutorial-card .ccc-tutorial-actions {
		flex-shrink: 0;
	}

	#ccc-tutorial-card .ccc-tutorial-progress {
		margin-bottom: 0.4rem;
	}

	#ccc-tutorial-card #ccc-tutorial-body {
		flex: 1 1 auto;
		min-height: 0;
		margin-top: 0.35rem;
		line-height: 1.4;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	#ccc-tutorial-card .ccc-tutorial-card-body > .flex,
	#ccc-tutorial-card .ccc-tutorial-actions {
		flex-wrap: wrap;
		gap: 0.4rem;
		margin-top: 0.7rem;
		padding-top: 0.5rem;
	}

	#ccc-tutorial-card #ccc-tutorial-back,
	#ccc-tutorial-card #ccc-tutorial-skip,
	#ccc-tutorial-card #ccc-tutorial-dismiss,
	#ccc-tutorial-card #ccc-tutorial-next {
		white-space: nowrap;
		flex-shrink: 0;
		padding-left: 0.65rem;
		padding-right: 0.65rem;
	}

	body.ccc-tutorial-active .is-tutorial-target {
		scroll-margin-top: 4.25rem;
		scroll-margin-bottom: min(58svh, 15rem);
	}
}

#ccc-tutorial-card.ccc-tutorial-card--center {
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
}

#ccc-tutorial-card:not(.ccc-tutorial-card--center) {
	transition: top 0.2s ease, left 0.2s ease;
}

#ccc-tutorial-card[data-placement]::after {
	content: '';
	position: absolute;
	border-width: 8px;
	border-style: solid;
	pointer-events: none;
	z-index: 2;
	filter: drop-shadow(0 0 3px rgba(168, 85, 247, 0.35))
	        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

body.dark-mode #ccc-tutorial-card[data-placement]::after {
	filter: drop-shadow(0 0 2px rgba(15, 23, 42, 0.2))
	        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

#ccc-tutorial-card[data-placement="bottom"]::after {
	bottom: 100%;
	left: var(--arrow-left, 50%);
	margin-left: -8px;
	border-color: transparent transparent var(--ccc-tutorial-arrow) transparent;
}

#ccc-tutorial-card[data-placement="top"]::after {
	top: 100%;
	left: var(--arrow-left, 50%);
	margin-left: -8px;
	border-color: var(--ccc-tutorial-arrow) transparent transparent transparent;
}

#ccc-tutorial-card[data-placement="left"]::after {
	right: 100%;
	left: auto;
	top: var(--arrow-top, 2.5rem);
	margin-top: -8px;
	border-color: transparent var(--ccc-tutorial-arrow) transparent transparent;
}

#ccc-tutorial-card[data-placement="right"]::after {
	left: 100%;
	right: auto;
	top: var(--arrow-top, 2.5rem);
	margin-top: -8px;
	border-color: transparent transparent transparent var(--ccc-tutorial-arrow);
}

.ccc-tutorial-progress {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-bottom: 0.85rem;
}

.ccc-tutorial-bubbles {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
	gap: 0.35rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.ccc-tutorial-bubbles::-webkit-scrollbar {
	display: none;
}

.ccc-tutorial-bubble {
	box-sizing: border-box;
	flex: 0 0 0.5rem;
	width: 0.5rem;
	height: 0.5rem;
	min-width: 0.5rem;
	min-height: 0.5rem;
	max-width: 0.5rem;
	max-height: 0.5rem;
	padding: 0;
	margin: 0;
	border-radius: 999px;
	border: 1px solid rgba(168, 85, 247, 0.45);
	background: transparent;
	font-size: 0;
	line-height: 0;
	overflow: hidden;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, width 0.2s ease, flex-basis 0.2s ease;
}

.ccc-tutorial-bubble:hover:not(.is-active) {
	background: rgba(168, 85, 247, 0.15);
	transform: scale(1.15);
}

.ccc-tutorial-bubble:focus-visible {
	outline: 2px solid #a855f7;
	outline-offset: 2px;
}

.ccc-tutorial-bubble.is-active {
	width: 1.35rem;
	min-width: 1.35rem;
	max-width: 1.35rem;
	height: 0.5rem;
	min-height: 0.5rem;
	max-height: 0.5rem;
	flex: 0 0 1.35rem;
	border-radius: 999px;
	background: #a855f7;
	border-color: #a855f7;
	transform: none;
	box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
}

.ccc-tutorial-bubble.is-done {
	background: rgba(168, 85, 247, 0.35);
	border-color: rgba(168, 85, 247, 0.45);
}

.ccc-tutorial-step-label {
	margin-left: auto;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #64748b;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	flex-shrink: 0;
}

.ccc-tutorial-section-label {
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #7c3aed;
	margin-bottom: 0.25rem;
}

body.ccc-tutorial-active .ccc-tutorial-interactive-zone,
body.ccc-tutorial-active .ccc-tutorial-interactive-zone * {
	pointer-events: auto;
}

body.ccc-tutorial-active nav .nav-btn:not(.is-tutorial-target),
body.ccc-tutorial-active nav button.group:not(.is-tutorial-target),
body.ccc-tutorial-active nav [onclick*="setView"]:not(.is-tutorial-target) {
	pointer-events: none !important;
}

body.ccc-tutorial-active .ccc-tutorial-interactive-zone {
	position: relative;
	z-index: 78;
}

body.ccc-tutorial-active .ccc-tutorial-target-ancestor {
	position: relative;
	z-index: 76;
}

body.ccc-tutorial-active nav.ccc-tutorial-target-ancestor,
body.ccc-tutorial-active nav.glassmorphism.ccc-tutorial-target-ancestor {
	z-index: 76;
	overflow: visible;
}

@keyframes ccc-tutorial-beam-pulse {
	0%, 100% { opacity: 0.75; }
	50% { opacity: 1; }
}

body.ccc-tutorial-active .is-tutorial-target > .ccc-tutorial-field-beam {
	position: absolute;
	inset: -4px;
	border-radius: inherit;
	pointer-events: none;
	z-index: 0;
	animation: ccc-tutorial-beam-pulse 2.2s ease-in-out infinite;
}

body.ccc-tutorial-active .is-tutorial-target > .ccc-tutorial-field-beam::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 2px solid #a855f7;
	box-shadow: 0 0 12px rgba(168, 85, 247, 0.45), 0 0 24px rgba(124, 58, 237, 0.2);
}

body.ccc-tutorial-active .is-tutorial-target {
	position: relative;
	z-index: 77;
}

body.ccc-tutorial-active #card-modal,
body.ccc-tutorial-active #card-modal.ccc-tutorial-target-ancestor,
body.ccc-tutorial-active #card-modal.ccc-tutorial-interactive-zone,
body.ccc-tutorial-active #card-modal.is-tutorial-target {
	position: fixed !important;
}

body.ccc-tutorial-active .compare-bar.is-tutorial-target,
body.ccc-tutorial-active .compare-bar.ccc-tutorial-interactive-zone,
body.ccc-tutorial-active .compare-bar.ccc-tutorial-target-ancestor {
	position: fixed !important;
}

body.ccc-tutorial-active [data-tutorial="theme-toggle"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="header-help"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="nav-explorer"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="nav-profile"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="nav-auth"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="app-logo"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="footer-toggle"].is-tutorial-target {
	box-shadow: 0 0 0 2px #a855f7, 0 0 16px rgba(168, 85, 247, 0.45);
	border-radius: 9999px;
}

body.ccc-tutorial-active [data-tutorial="card-tile"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="explorer-filters"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="card-grid"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="compare-table"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="profile-presets"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="profile-spending"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="quiz-panel"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="modal-summary"].is-tutorial-target {
	box-shadow: 0 0 0 3px #a855f7, 0 0 20px rgba(168, 85, 247, 0.5);
	border-radius: 0.75rem;
}

body.ccc-tutorial-active #show-footer-btn.is-tutorial-target {
	position: fixed !important;
	bottom: 1.5rem !important;
	right: 1.5rem !important;
	left: auto !important;
	top: auto !important;
	z-index: 90;
}

body.ccc-tutorial-active.ccc-tutorial-compare-bar-phase #compare-bar,
body.ccc-tutorial-active.ccc-tutorial-compare-bar-phase #compare-bar-desktop,
body.ccc-tutorial-active.ccc-tutorial-compare-bar-phase #compare-bar-mobile {
	z-index: 80;
}

body.ccc-tutorial-active.ccc-tutorial-modal-phase #ccc-tutorial-root {
	z-index: 110;
}

body.ccc-tutorial-active.ccc-tutorial-modal-phase #ccc-tutorial-card {
	z-index: 120;
}

body.ccc-tutorial-active.ccc-tutorial-modal-phase #card-modal.active {
	z-index: 105;
}

body.ccc-tutorial-modal-scroll-lock #card-modal,
body.ccc-tutorial-modal-scroll-lock #card-modal .modal-panel {
	overflow: hidden !important;
	overscroll-behavior: none;
}

body.ccc-tutorial-active [data-tutorial="modal-tabs"].is-tutorial-target {
	overflow: visible;
	box-shadow: 0 0 0 3px #a855f7, 0 0 20px rgba(168, 85, 247, 0.5);
	border-radius: 0.75rem;
}

body.ccc-tutorial-active [data-tutorial="modal-tabs"].is-tutorial-target .modal-tab-nav {
	overflow-x: auto;
}

@media (orientation: portrait) {
	body.ccc-tutorial-active .nav-content-container {
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch;
		scroll-behavior: smooth;
		justify-content: flex-start !important;
		gap: 0.75rem;
	}
}

body.ccc-tutorial-active [data-tutorial="modal-overview"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="modal-rewards"].is-tutorial-target,
body.ccc-tutorial-active [data-tutorial="modal-rates"].is-tutorial-target {
	box-shadow: 0 0 0 3px #a855f7, 0 0 20px rgba(168, 85, 247, 0.5);
	border-radius: 0.5rem;
}

@media (max-width: 768px) {
	body.ccc-tutorial-active .is-tutorial-target {
		scroll-margin-top: 5rem;
		scroll-margin-bottom: min(45dvh, 14rem);
	}
}

.ccc-input-beam-wrap {
	position: relative;
}

#ccc-help-overlay .ccc-help-dialog {
	max-height: calc(100dvh - 2rem);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

body:not(.dark-mode) #ccc-help-overlay .ccc-help-dialog {
	background: #1e293b;
	border: 1px solid rgba(192, 132, 252, 0.85);
	color: #e2e8f0;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

body:not(.dark-mode) #ccc-help-overlay #ccc-help-title {
	color: #f8fafc;
}

body:not(.dark-mode) #ccc-help-overlay .ccc-help-body,
body:not(.dark-mode) #ccc-help-overlay .ccc-help-list {
	color: #94a3b8;
}

body:not(.dark-mode) #ccc-help-overlay .ccc-help-list strong {
	color: #e2e8f0;
}

body:not(.dark-mode) #ccc-help-overlay .ccc-help-close {
	color: #94a3b8;
}

body:not(.dark-mode) #ccc-help-overlay .ccc-help-btn-secondary {
	border-color: rgba(148, 163, 184, 0.45);
	color: #e2e8f0;
	background: transparent;
}

body:not(.dark-mode) #ccc-help-overlay .ccc-help-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.08);
}

body.dark-mode #ccc-help-overlay .ccc-help-dialog {
	background: #ffffff;
	border: 1px solid rgba(124, 58, 237, 0.85);
	color: #0f172a;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body.dark-mode #ccc-help-overlay #ccc-help-title {
	color: #0f172a;
}

body.dark-mode #ccc-help-overlay .ccc-help-body,
body.dark-mode #ccc-help-overlay .ccc-help-list {
	color: #475569;
}

body.dark-mode #ccc-help-overlay .ccc-help-list strong {
	color: #1e293b;
}

body.dark-mode #ccc-help-overlay .ccc-help-close {
	color: #64748b;
}

body.dark-mode #ccc-help-overlay .ccc-help-btn-secondary {
	border-color: #cbd5e1;
	color: #334155;
	background: transparent;
}

body.dark-mode #ccc-help-overlay .ccc-help-btn-secondary:hover {
	background: #f8fafc;
}

#ccc-help-overlay .ccc-help-heading {
	color: #c084fc;
	font-weight: 600;
}

body.dark-mode #ccc-help-overlay .ccc-help-heading {
	color: #7c3aed;
}

#ccc-help-overlay .ccc-help-btn-primary {
	background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
	color: #ffffff;
	border: none;
}

#ccc-help-overlay .ccc-help-btn-primary:hover {
	background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}
