/**
 * AVI AppSumo Redeem — style carte centré (aligné sur avision-auth.css + avision-btob-onboarding.css).
 * Design v1.5 : fond sombre uniquement sur la carte ; section wrapper transparente (thème).
 * Variables globales AVI : voir assets/css/main.css (:root). Jaune AVI = --accent: #f59e0b ; or foncé = --premium-gold: #d97706.
 */

.avision-appsumo-redeem-shortcode {
	/* Section centrée dans le flux normal de la page */
	padding: 4rem 1rem 6rem;
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Fond transparent : le thème gère la couleur de page */
	background: transparent;
	width: 100%;
	box-sizing: border-box;
}

.avision-appsumo-redeem-shortcode *,
.avision-appsumo-redeem-shortcode *::before,
.avision-appsumo-redeem-shortcode *::after {
	box-sizing: border-box;
}

/* Wrapper supprimé (FSE) : tout est porté par .avision-appsumo-redeem-shortcode */

/* ----- Carte centrale (glass, proche .avision-auth__card) ----- */
.avi-appsumo-card {
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	color: #e2e8f0;
	background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 20px;
	padding: clamp(2rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
	width: 100%;
	max-width: 460px;
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

/* ----- Logo ----- */
.avi-appsumo-logo {
	text-align: center;
	margin-bottom: 1.25rem;
}

.avi-appsumo-logo img {
	height: 48px;
	width: auto;
	object-fit: contain;
}

.avi-appsumo-logo-text {
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	letter-spacing: -0.5px;
}

.avi-appsumo-logo-link {
	display: inline-block;
	text-decoration: none;
	margin-bottom: 0.25rem;
}

/* ----- Badge AppSumo ----- */
.avi-appsumo-badge-wrap {
	text-align: center;
	margin-bottom: 1rem;
}

.avi-appsumo-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 165, 0, 0.12);
	border: 1px solid rgba(255, 165, 0, 0.3);
	color: #ffb347;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 20px;
}

/* ----- Titres ----- */
.avi-appsumo-title {
	font-size: clamp(1.15rem, 2.8vw, 1.35rem);
	font-weight: 700;
	color: #fff;
	text-align: center;
	margin: 0 0 0.5rem;
	line-height: 1.3;
}

.avi-appsumo-subtitle {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.55);
	text-align: center;
	margin: 0 0 1.5rem;
	line-height: 1.55;
}

/* ----- Messages (JS : #avi-appsumo-redeem-msg) ----- */
#avi-appsumo-redeem-msg {
	font-size: 13px;
	padding: 10px 14px;
	border-radius: 8px;
	margin-bottom: 1rem;
	min-height: 1.2em;
	text-align: center;
}

#avi-appsumo-redeem-msg:empty {
	display: none;
}

#avi-appsumo-redeem-loader {
	text-align: center;
	font-size: 14px;
	color: rgba(255, 255, 255, 0.55);
	margin-top: 0.5rem;
}

/* ----- Champs ----- */
.avi-appsumo-field {
	margin-bottom: 1rem;
}

.avi-appsumo-field label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	margin-bottom: 6px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.avi-appsumo-field input {
	width: 100%;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	padding: 12px 16px;
	font-size: 15px;
	color: #fff;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
}

.avi-appsumo-field input::placeholder {
	color: rgba(255, 255, 255, 0.25);
}

.avi-appsumo-field input:focus {
	border-color: rgba(99, 179, 237, 0.5);
	background: rgba(255, 255, 255, 0.09);
}

.avi-appsumo-code-input {
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ----- Bouton principal (garde #avi-appsumo-redeem-submit pour le JS) ----- */
.avi-appsumo-btn,
.avision-appsumo-redeem-shortcode .button.button-primary#avi-appsumo-redeem-submit {
	width: 100%;
	padding: 14px !important;
	/* Jaune AVI (main.css : --accent/#f59e0b) */
	background: linear-gradient(135deg, var(--accent, #f59e0b) 0%, var(--premium-gold, #d97706) 100%) !important;
	border: none !important;
	color: #0a0e1a !important;
	font-size: 15px;
	font-weight: 700;
	border-radius: 10px;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
	margin-top: 0.5rem;
	letter-spacing: 0.01em;
	text-align: center;
	line-height: 1.3;
}

.avi-appsumo-btn:hover,
.avision-appsumo-redeem-shortcode .button.button-primary#avi-appsumo-redeem-submit:hover {
	opacity: 0.9;
	box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.avi-appsumo-btn:active,
.avision-appsumo-redeem-shortcode .button.button-primary#avi-appsumo-redeem-submit:active {
	transform: scale(0.99);
}

.avi-appsumo-btn:disabled,
.avision-appsumo-redeem-shortcode .button.button-primary#avi-appsumo-redeem-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ----- Étape 2 — Guardian ----- */
.avi-trial-card {
	background: rgba(79, 156, 249, 0.08);
	border: 1px solid rgba(79, 156, 249, 0.22);
	border-radius: 14px;
	padding: 1.5rem;
	margin-bottom: 1.25rem;
	text-align: center;
}

.avi-trial-icon-big {
	font-size: 2.5rem;
	line-height: 1;
	margin-bottom: 0.75rem;
}

.avi-trial-title {
	font-size: 18px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.5rem;
}

.avi-trial-desc {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.55);
	margin: 0 0 1rem;
	line-height: 1.6;
}

.avi-trial-desc strong {
	color: rgba(255, 255, 255, 0.88);
}

.avi-appsumo-countdown-label {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.5);
	margin: 0 0 1rem;
}

.avi-appsumo-trial-countdown {
	font-weight: 700;
	color: #fff;
}

#avi-appsumo-trial-step .avi-trial-features {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-bottom: 1rem;
}

#avi-appsumo-trial-step .avi-trial-features > span {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.75);
	background: rgba(255, 255, 255, 0.05);
	padding: 6px 10px;
	border-radius: 6px;
	text-align: left;
}

.avi-trial-price {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
	margin: 0;
}

.avi-trial-price strong {
	color: rgba(255, 255, 255, 0.75);
}

/* Stripe */
#avi-card-element-wrap {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	padding: 13px 16px;
	margin-bottom: 0.75rem;
	transition: border-color 0.2s;
}

#avi-card-element-wrap:focus-within {
	border-color: rgba(99, 179, 237, 0.45);
}

#avi-card-element {
	min-height: 1.25rem;
}

#avi-card-errors {
	font-size: 12px;
	color: #fca5a5;
	margin-bottom: 0.5rem;
	min-height: 18px;
}

.avi-btn-trial,
.avision-appsumo-redeem-shortcode .button.button-primary#avi-start-trial-btn {
	width: 100%;
	padding: 13px !important;
	background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
	border: none !important;
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	border-radius: 10px;
	cursor: pointer;
	transition: opacity 0.2s;
	margin-bottom: 0.75rem;
}

.avi-btn-trial:hover,
.avision-appsumo-redeem-shortcode .button.button-primary#avi-start-trial-btn:hover {
	opacity: 0.9;
}

#avi-trial-loading {
	text-align: center;
	color: rgba(255, 255, 255, 0.65);
	padding: 1rem;
	font-size: 14px;
}

.avi-trial-skip-link,
#avi-skip-trial.avi-trial-skip-link {
	display: block;
	text-align: center;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.4);
	text-decoration: none;
	transition: color 0.2s;
	margin-top: 0.5rem;
}

.avi-trial-skip-link:hover,
#avi-skip-trial.avi-trial-skip-link:hover {
	color: rgba(255, 255, 255, 0.75);
}

/* Footer carte */
.avi-appsumo-footer {
	text-align: center;
	margin-top: 1.25rem;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.28);
}

.avi-appsumo-footer a {
	color: rgba(255, 255, 255, 0.45);
	text-decoration: none;
}

.avi-appsumo-footer a:hover {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: underline;
}

/* Sélecteur B2C / B2B (redeem AppSumo) */
.avi-account-type-selector {
	margin-bottom: 1.5rem;
}

.avi-type-question {
	font-size: 14px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
	margin: 0 0 10px;
	text-align: center;
}

.avi-type-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.avi-type-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1.5px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 14px 12px;
	color: rgba(255, 255, 255, 0.6);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-family: inherit;
}

.avi-type-btn span {
	font-size: 11px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.35);
}

.avi-type-btn.active {
	background: rgba(245, 158, 11, 0.1);
	border-color: rgba(245, 158, 11, 0.5);
	color: #f59e0b;
}

.avi-type-btn.active span {
	color: rgba(245, 158, 11, 0.6);
}

.avi-type-btn:hover:not(.active) {
	border-color: rgba(255, 255, 255, 0.25);
	color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 480px) {
	.avi-appsumo-card {
		padding: 2rem 1.25rem;
	}

	.avi-type-options {
		grid-template-columns: 1fr;
	}

	#avi-appsumo-trial-step .avi-trial-features {
		grid-template-columns: 1fr;
	}
}
