/* ===== THOJA storefront picker — design tokens ===== */
.thoja-picker, .thoja-dynamic-fields {
	--thoja-accent: #3971b8;
	--thoja-accent-light: #eaf2fb;
	--thoja-accent-dark: #2c5990;
	--thoja-border: #e1e4ea;
	--thoja-text: #1a2333;
	--thoja-muted: #6b7385;
	--thoja-success: #15803d;
	--thoja-success-bg: #ecfdf3;
	--thoja-error: #b91c1c;
	--thoja-error-bg: #fef2f2;
	--thoja-radius: 14px;
}

/* ===== Step heading (shared "1. / 2." style) ===== */
.thoja-step-heading{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:15px;font-weight:700;color:var(--thoja-text);}
.thoja-step-num{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--thoja-accent);color:#fff;font-size:13px;font-weight:700;flex:none;}

/* ===== Dynamic fields (Player ID etc.) ===== */
.thoja-dynamic-fields{margin:0 0 20px;padding:20px;background:#fff;border:1px solid var(--thoja-border);border-radius:var(--thoja-radius);box-shadow:0 1px 3px rgba(31,26,46,.04);}
.thoja-dynamic-fields .thoja-field-row{margin:0 0 14px;}
.thoja-dynamic-fields .thoja-field-row:last-of-type{margin-bottom:4px;}
.thoja-dynamic-fields label{display:block;font-weight:600;font-size:13px;color:var(--thoja-text);margin-bottom:6px;}
.thoja-dynamic-fields label .required{color:var(--thoja-accent);margin-left:2px;}
.thoja-field-input{
	width:100%;max-width:100%;box-sizing:border-box;
	padding:12px 14px;font-size:15px;color:var(--thoja-text);
	background:#faf9fc;border:1.5px solid var(--thoja-border);border-radius:10px;
	transition:border-color .15s,background .15s,box-shadow .15s;
}
.thoja-field-input:hover{border-color:#cfc9df;}
.thoja-field-input:focus{outline:none;border-color:var(--thoja-accent);background:#fff;box-shadow:0 0 0 3px var(--thoja-accent-light);}
select.thoja-field-select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7385' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;padding-right:36px;cursor:pointer;}

/* Validate button + status row */
.thoja-validate-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;}
.thoja-validate-btn{
	display:inline-flex;align-items:center;gap:8px;
	padding:10px 18px;font-size:14px;font-weight:600;color:#fff;
	background:var(--thoja-accent);border:none;border-radius:10px;cursor:pointer;
	transition:background .15s,transform .1s,box-shadow .15s;
	box-shadow:0 1px 2px rgba(57,113,184,.25);
}
.thoja-validate-btn:hover{background:var(--thoja-accent-dark);}
.thoja-validate-btn:active{transform:translateY(1px);}
.thoja-validate-btn:disabled{opacity:.6;cursor:default;}
.thoja-validate-btn.is-loading::before{
	content:"";width:13px;height:13px;border-radius:50%;
	border:2px solid rgba(255,255,255,.5);border-top-color:#fff;
	animation:thoja-spin .7s linear infinite;
}
@keyframes thoja-spin{to{transform:rotate(360deg);}}

.thoja-validate-result{font-size:13px;font-weight:600;padding:6px 12px;border-radius:20px;color:var(--thoja-muted);}
.thoja-validate-result.thoja-state-pending{background:#f4f2f8;color:var(--thoja-muted);}
.thoja-validate-result.thoja-state-loading{background:var(--thoja-accent-light);color:var(--thoja-accent-dark);}
.thoja-validate-result.thoja-state-success{background:var(--thoja-success-bg);color:var(--thoja-success);}
.thoja-validate-result.thoja-state-error{background:var(--thoja-error-bg);color:var(--thoja-error);}

.thoja-cart-disabled{opacity:.45 !important;cursor:not-allowed !important;pointer-events:none;}

/* ===== Denomination / attribute picker ===== */
.thoja-picker{margin:0 0 22px;}
.thoja-buttons{display:grid;grid-template-columns:repeat(auto-fill, minmax(120px, 1fr));gap:10px;}

.thoja-pill{
	position:relative;
	border:1.5px solid var(--thoja-border);border-radius:12px;
	background:#fff;cursor:pointer;
	transition:border-color .15s,background .15s,box-shadow .15s,transform .1s;
	font-family:inherit;
}
.thoja-pill:hover:not(.thoja-disabled){border-color:var(--thoja-accent);background:var(--thoja-accent-light);transform:translateY(-1px);}
.thoja-pill:active:not(.thoja-disabled){transform:translateY(0);}

.thoja-country-pill{padding:10px 16px;font-size:14px;font-weight:600;color:var(--thoja-text);}
.thoja-country-pill.thoja-selected{border-color:var(--thoja-accent);background:var(--thoja-accent);color:#fff;box-shadow:0 2px 8px rgba(57,113,184,.25);}

.thoja-denom-pill{
	display:flex;flex-direction:column;align-items:center;justify-content:center;
	gap:4px;min-height:64px;padding:14px 10px;text-align:center;
}
.thoja-denom-pill .thoja-denom-label{font-weight:700;font-size:15px;color:var(--thoja-text);}
.thoja-denom-pill .thoja-denom-stock{font-size:11px;font-weight:600;color:var(--thoja-muted);}
.thoja-denom-pill.thoja-selected{
	border-color:var(--thoja-accent);background:var(--thoja-accent-light);
	box-shadow:0 0 0 1.5px var(--thoja-accent) inset;
}
.thoja-denom-pill.thoja-selected .thoja-denom-label{color:var(--thoja-accent-dark);}
.thoja-denom-pill.thoja-selected::after{
	content:"✓";position:absolute;top:6px;right:8px;
	font-size:11px;font-weight:700;color:var(--thoja-accent);
}
.thoja-denom-pill.thoja-disabled{opacity:.4;cursor:not-allowed;background:#fafafa;}
.thoja-denom-pill.thoja-disabled .thoja-denom-stock{text-decoration:line-through;}

@media (max-width:480px){
	.thoja-buttons{grid-template-columns:repeat(auto-fill, minmax(96px, 1fr));}
	.thoja-dynamic-fields{padding:16px;}
}

/* Backstop for third-party variation swatch plugins (e.g. WooCommerce Variation Swatches) that
   may re-render their own picker after our JS runs — keep it hidden on THOJA grouped products. */
.variations_form.thoja-hide-native-variations table.variations,
.variations_form.thoja-hide-native-variations .variations,
.variations_form.thoja-hide-native-variations .wvs-archive-variations-wrapper,
.variations_form.thoja-hide-native-variations .variable-items-wrapper{display:none !important;}

/* ===== FREE FIRE REGION VALIDATION STYLES ===== */
/* Icônes de validation */
.thoja-check-icon {
    font-size: 18px;
    font-weight: 700;
    display: inline-block;
    line-height: 1;
}

.thoja-check-icon.valid {
    color: #51cf66;
}

.thoja-check-icon.invalid {
    color: #ff6b6b;
}

/* Nom du joueur */
.thoja-player-name {
    font-size: 13px;
    color: inherit;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid currentColor;
    opacity: 0.8;
}

/* Alerte de région incorrecte */
.thoja-region-alert-wrapper {
	background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 100%);
	border: 2px solid #1e88e5;
	border-radius: 12px;
	padding: 24px;
	margin: 20px 0;
	animation: slideDown 0.4s ease-out;
	box-shadow: 0 4px 12px rgba(30, 136, 229, 0.12);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.thoja-region-alert {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.thoja-region-alert-icon {
    font-size: 32px;
    flex-shrink: 0;
    line-height: 1;
}

.thoja-region-alert-content {
    flex: 1;
}

.thoja-region-alert-content h3 {
	margin: 0 0 12px;
	font-size: 17px;
	color: #1e88e5;
	font-weight: 700;
	letter-spacing: 0.2px;
}

.thoja-region-alert-content p {
	margin: 0 0 8px;
	font-size: 14px;
	color: #1565c0;
	line-height: 1.7;
	font-weight: 500;
}

.thoja-region-alert-content p:last-child {
    margin-bottom: 0;
}

/* Actions / Boutons */
.thoja-region-alert-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thoja-region-btn-primary {
	display: inline-block;
	background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
	color: white;
	padding: 14px 28px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	border: none;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 3px 8px rgba(30, 136, 229, 0.3);
}

.thoja-region-btn-primary:hover {
	background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
	color: white;
	text-decoration: none;
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(30, 136, 229, 0.4);
}

.thoja-region-btn-primary:active {
    transform: translateY(0);
}

/* Masquage des sections */
.thoja-quantity-section {
    display: block;
    transition: opacity 0.3s ease;
}

.thoja-quantity-section:hidden,
button[name="add-to-cart"]:hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .thoja-region-alert {
        flex-direction: column;
    }

    .thoja-region-alert-icon {
        font-size: 24px;
    }

    .thoja-region-alert-content h3 {
	margin: 0 0 12px;
	font-size: 17px;
	color: #1e88e5;
	font-weight: 700;
	letter-spacing: 0.2px;
}

    .thoja-region-alert-content p {
	margin: 0 0 8px;
	font-size: 14px;
	color: #1565c0;
	line-height: 1.7;
	font-weight: 500;
}

    .thoja-region-btn-primary {
	display: inline-block;
	background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
	color: white;
	padding: 14px 28px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	border: none;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 3px 8px rgba(30, 136, 229, 0.3);
}
}
