@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Premium Theme */
:root {
	--cb-bg-gradient: radial-gradient(circle at 50% 0%, #202630 0%, #0a0b0e 100%);
	--cb-surface-glass: rgba(255, 255, 255, 0.07);
	--cb-surface-card: rgba(255, 255, 255, 0.03);
	--cb-border-glass: rgba(255, 255, 255, 0.09);
	--cb-border-glass-active: rgba(226, 33, 38, 0.4);
	
	--cb-primary: #e22126; /* Brand Red */
	--cb-primary-hover: #ef4444; /* Vibrant Brand Red */
	--cb-primary-glow: rgba(226, 33, 38, 0.25);
	
	--cb-secondary: #8294ad;
	--cb-secondary-hover: #5e6f85;
	
	--cb-success: #10b981; /* Emerald Green */
	--cb-success-glow: rgba(16, 185, 129, 0.3);
	
	--cb-text-main: #ffffff;
	--cb-text-muted: #cbd5e1;
	
	--cb-font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--cb-radius-lg: 24px;
	--cb-radius-md: 12px;
	
	--cb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Form Container */
.convite-bao-container {
	font-family: var(--cb-font-family);
	max-width: 600px;
	margin: 40px auto;
	padding: 40px;
	background: var(--cb-bg-gradient);
	border: 1px solid var(--cb-border-glass);
	border-radius: var(--cb-radius-lg);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(226, 33, 38, 0.06);
	color: var(--cb-text-main);
	box-sizing: border-box;
	overflow: hidden;
	position: relative;
}

.convite-bao-container * {
	box-sizing: border-box;
}

/* Progress Bar */
.convite-progress-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 40px;
	position: relative;
}

.convite-progress-bar .progress-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 2;
	position: relative;
}

.convite-progress-bar .progress-step span {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--cb-surface-card);
	border: 2px solid var(--cb-border-glass);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--cb-text-muted);
	transition: var(--cb-transition);
}

.convite-progress-bar .progress-step label {
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--cb-text-muted);
	margin-top: 8px;
	transition: var(--cb-transition);
}

.convite-progress-bar .progress-line {
	flex: 1;
	height: 2px;
	background: var(--cb-border-glass);
	margin: 0 10px;
	margin-top: -18px;
	z-index: 1;
	transition: var(--cb-transition);
}

/* Progress Active and Completed States */
.convite-progress-bar .progress-step.active span {
	background: var(--cb-primary);
	border-color: var(--cb-primary);
	color: #0f172a;
	box-shadow: 0 0 15px var(--cb-primary-glow);
}

.convite-progress-bar .progress-step.active label {
	color: var(--cb-primary);
	font-weight: 600;
}

.convite-progress-bar .progress-step.completed span {
	background: var(--cb-success);
	border-color: var(--cb-success);
	color: #ffffff;
}

.convite-progress-bar .progress-step.completed label {
	color: var(--cb-success);
}

.convite-progress-bar .progress-line.completed {
	background: var(--cb-success);
	box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* Panels */
.convite-step-panel {
	display: none;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.convite-step-panel.active {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

/* Step Header */
.step-header {
	text-align: center;
	margin-bottom: 30px;
}

.step-header h2 {
	font-size: 26px;
	font-weight: 700;
	margin: 0 0 10px 0;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.step-header p {
	font-size: 15px;
	color: var(--cb-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* Inputs & Form Elements */
.input-group {
	position: relative;
	margin-bottom: 20px;
}

#cb-cnpj-input {
	width: 100%;
	background: var(--cb-surface-card);
	border: 2px solid var(--cb-border-glass);
	padding: 16px 20px;
	font-size: 20px;
	font-family: var(--cb-font-family);
	color: #ffffff;
	border-radius: var(--cb-radius-md);
	outline: none;
	text-align: center;
	letter-spacing: 0.05em;
	transition: var(--cb-transition);
}

#cb-cnpj-input:focus {
	border-color: var(--cb-primary);
	box-shadow: 0 0 0 4px var(--cb-primary-glow);
}

/* Error Messages */
.error-message {
	color: #ef4444;
	font-size: 14px;
	text-align: center;
	margin-bottom: 20px;
	min-height: 20px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-action {
	font-family: var(--cb-font-family);
	border-radius: var(--cb-radius-md);
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
	transition: var(--cb-transition);
	border: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.btn-primary {
	width: 100%;
	background: var(--cb-primary);
	color: #ffffff;
	padding: 16px 32px;
	box-shadow: 0 4px 14px rgba(226, 33, 38, 0.3);
	position: relative;
}

.btn-primary:hover:not(:disabled) {
	background: var(--cb-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(226, 33, 38, 0.4);
}

.btn-primary:active:not(:disabled) {
	transform: translateY(0);
}

.btn-primary:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	box-shadow: none;
}

.btn-secondary {
	background: rgba(255, 255, 255, 0.05);
	color: var(--cb-text-main);
	border: 1px solid var(--cb-border-glass);
	padding: 12px 24px;
}

.btn-secondary:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
}

.btn-large {
	font-size: 18px;
	padding: 20px 40px;
}

/* Step Navigation */
.step-navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
	gap: 15px;
}

.step-navigation.flex-column {
	flex-direction: column;
	width: 100%;
}

.margin-top-md {
	margin-top: 15px !important;
}

/* Names selection container */
.names-selection-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 250px;
	overflow-y: auto;
	padding: 5px;
	margin-bottom: 20px;
}

/* Custom Scrollbar for Name Selection */
.names-selection-container::-webkit-scrollbar {
	width: 6px;
}
.names-selection-container::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.02);
}
.names-selection-container::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
}

/* Name card option */
.name-option-card {
	background: var(--cb-surface-card);
	border: 2px solid var(--cb-border-glass);
	border-radius: var(--cb-radius-md);
	padding: 16px 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: var(--cb-transition);
}

.name-option-card:hover {
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.05);
	transform: translateX(4px);
}

.name-option-card.selected {
	border-color: var(--cb-primary);
	background: rgba(226, 33, 38, 0.08);
	box-shadow: 0 0 15px rgba(226, 33, 38, 0.1);
}

.name-option-card .guest-details {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.name-option-card .guest-name-text {
	font-size: 16px;
	font-weight: 600;
	color: #ffffff;
}

.name-option-card .guest-location-text {
	font-size: 13px;
	color: var(--cb-text-muted);
	margin-top: 4px;
}

.name-option-card .checkbox-circle {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid var(--cb-border-glass);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: var(--cb-transition);
}

.name-option-card.selected .checkbox-circle {
	border-color: var(--cb-primary);
	background: var(--cb-primary);
}

.name-option-card.selected .checkbox-circle::after {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #0f172a;
}

/* STEP 3: Invitation Card Design */
.invitation-card {
	background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	padding: 30px;
	position: relative;
	box-shadow: 0 20px 40px rgba(0,0,0,0.4);
	margin-bottom: 25px;
	text-align: center;
	overflow: hidden;
}

.invitation-card::before {
	content: '';
	position: absolute;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle, rgba(226, 33, 38, 0.05) 0%, transparent 70%);
	pointer-events: none;
}

.invitation-badge {
	position: absolute;
	top: 15px;
	right: 15px;
	background: rgba(226, 33, 38, 0.15);
	border: 1px solid var(--cb-primary);
	color: var(--cb-primary);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 30px;
	letter-spacing: 0.1em;
}

.invitation-event-title {
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
	margin: 15px 0 5px 0;
}

.invitation-desc {
	font-size: 14px;
	color: var(--cb-text-muted);
	margin: 0 auto;
	max-width: 80%;
	line-height: 1.4;
}

.invitation-divider {
	height: 1px;
	background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 80%, transparent);
	margin: 20px 0;
}

.invitation-guest-info {
	padding: 5px 0;
}

.guest-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--cb-primary);
	display: block;
	margin-bottom: 6px;
}

.guest-name {
	font-size: 22px;
	font-weight: 700;
	color: #ffffff;
	display: block;
}

.guest-location {
	font-size: 14px;
	color: var(--cb-text-muted);
	display: block;
	margin-top: 4px;
}

.invitation-details {
	display: flex;
	justify-content: space-around;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 10px;
}

.detail-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--cb-text-muted);
	font-size: 14px;
}

.detail-item svg {
	color: var(--cb-primary);
}

/* STEP 4: Confirm RSVP */
.confirm-screen-content {
	text-align: center;
}

.confirm-summary-box {
	background: var(--cb-surface-card);
	border: 1px solid var(--cb-border-glass);
	border-radius: var(--cb-radius-md);
	padding: 24px;
	margin-bottom: 30px;
}

.confirm-summary-box p {
	font-size: 14px;
	color: var(--cb-text-muted);
	margin: 0 0 10px 0;
}

.confirm-summary-box strong {
	font-size: 20px;
	color: #ffffff;
	display: block;
}

.confirm-summary-box span {
	font-size: 14px;
	color: var(--cb-text-muted);
	display: block;
	margin-top: 6px;
}

/* STEP 5: Success & QR Code Screen */
.success-icon-container {
	width: 72px;
	height: 72px;
	background: var(--cb-success-glow);
	border: 3px solid var(--cb-success);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px auto;
}

.success-checkmark {
	color: var(--cb-success);
}

.animate-scale {
	animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleIn {
	0% { transform: scale(0); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}

.qr-screen-content {
	text-align: center;
}

.qr-code-wrapper {
	background: #ffffff;
	padding: 24px;
	border-radius: var(--cb-radius-md);
	display: inline-block;
	margin-bottom: 25px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.qrcode-canvas-container {
	display: flex;
	justify-content: center;
	align-items: center;
}

/* QR Code elements should match properly */
.qrcode-canvas-container canvas, 
.qrcode-canvas-container img {
	display: block;
	max-width: 250px;
	max-height: 250px;
}

.qrcode-caption {
	color: #0f172a;
	font-family: monospace;
	font-size: 13px;
	font-weight: 700;
	margin-top: 15px;
	letter-spacing: 0.1em;
}

.action-buttons-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 30px;
}

.btn-action {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--cb-border-glass);
	color: #ffffff;
	padding: 14px;
	gap: 8px;
	font-size: 14px;
	width: 100%;
}

.btn-action:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
}

.btn-action svg {
	color: var(--cb-primary);
	transition: var(--cb-transition);
}

.btn-action:hover svg {
	transform: scale(1.1);
}

.final-instructions {
	font-size: 13px;
	color: var(--cb-text-muted);
	line-height: 1.5;
	margin: 0;
}

/* Loading Spinners */
.btn-loader {
	display: none;
	width: 20px;
	height: 20px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -10px;
	margin-top: -10px;
}

.btn-primary.loading .btn-text {
	visibility: hidden;
}

.btn-primary.loading .btn-loader {
	display: block;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

/* Loading Overlay for Invite Pre-loading */
.cb-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.95);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	font-size: 18px;
	font-weight: 600;
	color: #ffffff;
	z-index: 100;
	gap: 15px;
	backdrop-filter: blur(8px);
}

.overlay-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.1);
	border-top-color: var(--cb-primary);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* Print Screen Hint Tooltip */
.cb-qr-tip {
	font-size: 13px;
	color: var(--cb-primary);
	background: rgba(226, 33, 38, 0.07);
	border: 1px solid rgba(226, 33, 38, 0.25);
	padding: 12px 18px;
	border-radius: var(--cb-radius-md);
	margin-bottom: 25px;
	display: inline-block;
	max-width: 90%;
	line-height: 1.5;
	text-align: center;
	box-sizing: border-box;
	animation: cbPulse 2.5s infinite ease-in-out;
}

@keyframes cbPulse {
	0% {
		transform: scale(1);
		border-color: rgba(226, 33, 38, 0.25);
		box-shadow: 0 0 0 0 rgba(226, 33, 38, 0.05);
	}
	50% {
		transform: scale(1.02);
		border-color: rgba(226, 33, 38, 0.50);
		box-shadow: 0 0 12px 2px rgba(226, 33, 38, 0.15);
	}
	100% {
		transform: scale(1);
		border-color: rgba(226, 33, 38, 0.25);
		box-shadow: 0 0 0 0 rgba(226, 33, 38, 0.05);
	}
}

/* Google Maps Button Styling */
.cb-btn-maps {
	grid-column: span 2;
}

/* Ensure white background for QR Code canvas container */
.qrcode-canvas-container {
	background: #ffffff;
	padding: 10px;
	border-radius: 8px;
}


