/* JF Click & Collect – checkout */

.jfcc-box {
	--jfcc-radius: 8px;
	--jfcc-border: rgba(0, 0, 0, .14);
	margin: 0 0 2em;
	padding: 1.25em 1.25em .5em;
	border: 1px solid var(--jfcc-border);
	border-radius: var(--jfcc-radius);
	box-sizing: border-box;
}

.jfcc-box *,
.jfcc-box *::before,
.jfcc-box *::after {
	box-sizing: border-box;
}

.jfcc-title {
	margin: 0 0 1em;
}

.jfcc-field {
	margin: 0 0 1.25em;
	padding: 0;
	border: 0;
	min-width: 0;
}

.jfcc-label {
	display: block;
	margin: 0 0 .5em;
	padding: 0;
	font-weight: 600;
}

/* Boutiques */
.jfcc-stores {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: .75em;
}

.jfcc-store {
	display: flex;
	gap: .75em;
	align-items: flex-start;
	margin: 0;
	padding: .9em 1em;
	border: 2px solid var(--jfcc-border);
	border-radius: var(--jfcc-radius);
	cursor: pointer;
	line-height: 1.4;
	transition: border-color .15s ease;
}

.jfcc-store:hover,
.jfcc-store.is-checked,
.jfcc-store:has(input:checked) {
	border-color: var(--jfcc-selected-bg);
}

.jfcc-store input {
	margin: .25em 0 0;
	accent-color: var(--jfcc-selected-bg);
}

.jfcc-store__name {
	display: block;
	font-weight: 600;
}

.jfcc-store__address {
	display: block;
	font-size: .9em;
	opacity: .75;
}

.jfcc-locked {
	margin: 0 0 1.25em;
	padding: .75em 1em;
	border: 2px solid var(--jfcc-selected-bg);
	border-radius: var(--jfcc-radius);
	line-height: 1.4;
}

.jfcc-locked strong {
	display: block;
}

.jfcc-box[hidden],
.jfcc-box [hidden] {
	display: none !important;
}

/* Champ date */
.jfcc-picker {
	position: relative;
	display: flex;
	max-width: 420px;
}

.jfcc-picker .jfcc-date-display {
	flex: 1 1 auto;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: .6em 3em .6em .8em;
	font-size: 1em;
	line-height: 1.3;
	cursor: pointer;
	background-color: transparent;
}

.jfcc-picker .jfcc-date-display:disabled {
	cursor: not-allowed;
	opacity: .6;
}

.jfcc-help,
.jfcc-info {
	margin: .5em 0 0;
	font-size: .9em;
	opacity: .8;
}

.jfcc-info:empty,
.jfcc-message:empty {
	display: none;
}

.jfcc-message {
	margin: .5em 0 0;
	padding: .6em .8em;
	border-left: 4px solid #b32d2e;
	background: rgba(179, 45, 46, .07);
	font-size: .95em;
}

/*
 * Calendrier.
 * Les sélecteurs passent par l'identifiant #jfcc-calendar (et #jfcc-box) pour
 * l'emporter sur les styles de boutons des thèmes et constructeurs de page
 * (Elementor, kits globaux…), qui sinon agrandissent les cases du calendrier.
 */
#jfcc-box .jfcc-toggle {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: auto;
	width: 44px;
	min-width: 0;
	height: auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	color: inherit !important;
	box-shadow: none;
	line-height: 1;
	cursor: pointer;
}

#jfcc-box .jfcc-toggle:disabled {
	cursor: not-allowed;
	opacity: .4;
}

#jfcc-calendar {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 9999;
	width: 340px;
	max-width: calc(100vw - 32px);
	padding: 12px;
	background: #fff;
	color: #222;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: var(--jfcc-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
	font-size: 15px;
	line-height: 1.2;
	text-align: left;
	box-sizing: border-box;
}

#jfcc-calendar[hidden] {
	display: none;
}

#jfcc-calendar *,
#jfcc-calendar *::before,
#jfcc-calendar *::after {
	box-sizing: border-box;
}

/* Remise à zéro de tous les boutons du calendrier (thèmes, Elementor). */
#jfcc-calendar button {
	width: auto;
	min-width: 0;
	max-width: none;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	box-shadow: none;
	background-image: none;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
	transform: none;
	transition: none;
	white-space: nowrap;
	-webkit-appearance: none;
	appearance: none;
}

#jfcc-calendar .jfcc-cal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 10px;
	padding: 6px;
	background: #e6e6e6;
	border-radius: 4px;
}

#jfcc-calendar .jfcc-cal__month {
	font-weight: 600;
}

#jfcc-calendar .jfcc-cal__nav {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	background: transparent !important;
	color: #222 !important;
	font-size: 26px;
	cursor: pointer;
}

#jfcc-calendar .jfcc-cal__nav:hover:not(:disabled) {
	background: rgba(0, 0, 0, .08) !important;
}

#jfcc-calendar .jfcc-cal__nav:disabled {
	opacity: .3;
	cursor: default;
}

#jfcc-calendar .jfcc-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 3px;
	width: 100%;
}

#jfcc-calendar .jfcc-cal__wd {
	padding: 4px 0 8px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
}

#jfcc-calendar .jfcc-day {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	min-height: 34px;
	font-size: 15px;
}

#jfcc-calendar .jfcc-day.is-past {
	background: var(--jfcc-past-bg) !important;
	color: var(--jfcc-past-text) !important;
	cursor: default;
}

#jfcc-calendar .jfcc-day.is-blocked {
	background: var(--jfcc-blocked-bg) !important;
	color: var(--jfcc-blocked-text) !important;
	cursor: not-allowed;
}

#jfcc-calendar .jfcc-day.is-allowed {
	background: var(--jfcc-allowed-bg) !important;
	color: var(--jfcc-allowed-text) !important;
	font-weight: 600;
	cursor: pointer;
}

#jfcc-calendar .jfcc-day.is-allowed:hover,
#jfcc-calendar .jfcc-day.is-allowed:focus-visible {
	filter: brightness(.92);
	outline: 2px solid var(--jfcc-selected-bg);
	outline-offset: 1px;
}

#jfcc-calendar .jfcc-day.is-selected,
#jfcc-calendar .jfcc-day.is-selected:hover {
	background: var(--jfcc-selected-bg) !important;
	color: var(--jfcc-selected-text) !important;
	filter: none;
}

#jfcc-calendar .jfcc-day.is-today {
	box-shadow: inset 0 0 0 2px var(--jfcc-today-border);
}

#jfcc-calendar .jfcc-day:disabled {
	opacity: 1;
}

#jfcc-calendar .jfcc-cal__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin: 12px 0 0;
	padding: 10px 0 0;
	border-top: 1px solid #eee;
	font-size: 12px;
}

#jfcc-calendar .jfcc-legend {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

#jfcc-calendar .jfcc-legend i {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 2px;
}

#jfcc-calendar .jfcc-legend i.is-allowed { background: var(--jfcc-allowed-bg); }
#jfcc-calendar .jfcc-legend i.is-blocked { background: var(--jfcc-blocked-bg); }
#jfcc-calendar .jfcc-legend i.is-past { background: var(--jfcc-past-bg); border: 1px solid #ddd; }

#jfcc-calendar .jfcc-cal__clear {
	margin: 0 0 0 auto;
	padding: 8px 14px;
	border: 1px solid #ccc;
	background: #f2f2f2 !important;
	color: #333 !important;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

#jfcc-calendar .jfcc-cal__clear:hover {
	background: #e8e8e8 !important;
}

/* Fiche produit / récapitulatif */
.jfcc-product-notice p {
	margin: 0;
}

.jfcc-product-notice p + p {
	margin-top: .35em;
}

.jfcc-product-notice {
	margin: 0 0 1.5em;
	padding: .75em 1em;
	border-left: 4px solid currentColor;
	background: rgba(0, 0, 0, .04);
	font-weight: 600;
}

.jfcc-pickup-summary {
	margin: 0 0 2em;
}

@media (max-width: 480px) {
	.jfcc-box {
		padding: 1em 1em .25em;
	}

	#jfcc-calendar {
		position: fixed;
		top: auto;
		left: 16px;
		right: 16px;
		bottom: 16px;
		width: auto;
		max-width: none;
	}
}

/* Mode intégré : champ date placé sous le choix du lieu de retrait WooCommerce */
.jfcc-box.jfcc-box--inline {
	margin: 1em 0 1.5em;
	padding: 0;
	border: 0;
	border-radius: 0;
	text-align: left;
}

.jfcc-box--inline .jfcc-field {
	margin-bottom: 0;
}

#shipping_method + .jfcc-box--inline {
	margin-top: .75em;
}
