/**
 * Feuille de style Front-Office — DFS Click & Collect for WooCommerce (v0.4.7-2c)
 * Compatible Checkout Classique ([woocommerce_checkout]), Order-Pay et Checkout Block.
 * Sélecteurs strictement limités aux conteneurs .dfs-cc-* du module.
 */

.dfs-cc-form-section-container {
	clear: both;
	width: 100%;
	margin: 16px 0;
	box-sizing: border-box;
	overflow: visible;
}

.dfs-cc-classic-selector-wrapper,
.dfs-cc-block-selector-wrapper {
	margin: 14px 0;
	font-family: var(--body_typography-font-family, Lora, Georgia, Arial, Helvetica, sans-serif);
	box-sizing: border-box;
	overflow: visible;
}

.dfs-cc-box {
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-left: 4px solid #0f766e;
	border-radius: 6px;
	padding: 18px 20px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	overflow: visible;
	position: relative;
}

.dfs-cc-box .dfs-cc-box-header {
	display: block;
	margin: 0 0 14px 0;
	padding: 0 0 10px 0;
	border-bottom: 1px solid #cbd5e1;
	text-align: left;
}

/* Neutralisation ciblée des règles Avada (.post-content h3 / .woocommerce .checkout h3 / Bebas Neue condensée) uniquement sur le titre DFS */
.dfs-cc-box .dfs-cc-box-header h3.dfs-cc-box-title,
.dfs-cc-box .dfs-cc-box-header .dfs-cc-box-title,
.dfs-cc-box .dfs-cc-box-header .dfs-cc-box-title.fusion-responsive-typography-calculated {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-bottom: none !important;
	font-family: var(--body_typography-font-family, Lora, Georgia, Arial, Helvetica, sans-serif) !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	font-style: normal !important;
	font-stretch: normal !important;
	font-variant: normal !important;
	line-height: 1.4 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-align: left !important;
	color: #0f172a !important;
	background: transparent !important;
	box-shadow: none !important;
}

.dfs-cc-step {
	margin-bottom: 14px;
	position: relative;
	overflow: visible;
}

.dfs-cc-step:last-of-type {
	margin-bottom: 4px;
}

.dfs-cc-box .dfs-cc-label {
	display: block;
	font-family: var(--body_typography-font-family, Lora, Georgia, Arial, Helvetica, sans-serif);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #1e293b;
	margin: 0 0 6px 0;
	text-align: left;
}

.dfs-cc-box .dfs-cc-label .required {
	color: #dc2626;
	text-decoration: none;
	margin-left: 2px;
}

.dfs-cc-box .dfs-cc-select {
	width: 100%;
	max-width: 100%;
	min-height: 42px;
	padding: 9px 12px;
	font-family: var(--body_typography-font-family, Lora, Georgia, Arial, Helvetica, sans-serif);
	font-size: 14.5px;
	line-height: 1.4;
	color: #0f172a;
	background-color: #ffffff;
	border: 1px solid #94a3b8;
	border-radius: 4px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dfs-cc-box .dfs-cc-select:focus,
.dfs-cc-box .dfs-cc-select:focus-visible {
	outline: none;
	border-color: #0f766e;
	box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
}

.dfs-cc-box .dfs-cc-select:disabled {
	background-color: #f1f5f9;
	color: #64748b;
	cursor: not-allowed;
	opacity: 1;
}

/* Sélecteur de date et calendrier mensuel */
.dfs-cc-date-picker {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.dfs-cc-box .dfs-cc-date-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	text-align: left;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	font-weight: 400;
}

.dfs-cc-box .dfs-cc-date-trigger.has-value {
	color: #0f172a;
	font-weight: 600;
}

.dfs-cc-box .dfs-cc-date-trigger.is-placeholder {
	color: #334155;
}

.dfs-cc-box .dfs-cc-date-trigger[aria-expanded="true"] {
	border-color: #0f766e;
	box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
}

.dfs-cc-box .dfs-cc-date-trigger:disabled {
	background-color: #f1f5f9;
	color: #64748b;
	cursor: not-allowed;
}

.dfs-cc-date-trigger-text {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dfs-cc-date-trigger-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #0f766e;
	line-height: 1;
}

.dfs-cc-box .dfs-cc-date-trigger:disabled .dfs-cc-date-trigger-icon {
	color: #94a3b8;
}

.dfs-cc-calendar-popover {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 9999;
	width: 348px;
	max-width: 100%;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 14px;
	box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.08);
	box-sizing: border-box;
	user-select: none;
}

.dfs-cc-calendar-popover[hidden] {
	display: none !important;
}

.dfs-cc-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e2e8f0;
}

.dfs-cc-cal-title {
	flex: 1 1 auto;
	text-align: center;
	font-family: var(--body_typography-font-family, Lora, Georgia, Arial, Helvetica, sans-serif);
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.3;
	color: #0f172a;
	margin: 0;
}

.dfs-cc-box .dfs-cc-cal-nav {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	min-width: 36px;
	min-height: 36px;
	padding: 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	color: #0f172a;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dfs-cc-box .dfs-cc-cal-nav:hover:not(:disabled) {
	background: #f0fdfa;
	border-color: #0f766e;
	color: #0f766e;
}

.dfs-cc-box .dfs-cc-cal-nav:focus,
.dfs-cc-box .dfs-cc-cal-nav:focus-visible {
	outline: 2px solid #0f766e;
	outline-offset: 1px;
}

.dfs-cc-box .dfs-cc-cal-nav:disabled {
	opacity: 0.38;
	background: #f8fafc;
	border-color: #e2e8f0;
	color: #94a3b8;
	cursor: not-allowed;
}

.dfs-cc-cal-weekdays {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	margin-bottom: 6px;
	text-align: center;
}

.dfs-cc-cal-weekday {
	font-size: 12px;
	font-weight: 700;
	color: #475569;
	padding: 4px 0;
	line-height: 1.2;
	text-decoration: none;
	border: 0;
}

.dfs-cc-cal-weekday abbr {
	text-decoration: none;
	border: 0;
	cursor: default;
}

.dfs-cc-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.dfs-cc-cal-cell--empty {
	display: block;
	width: 100%;
	height: 40px;
	pointer-events: none;
}

.dfs-cc-box .dfs-cc-cal-day {
	position: relative;
	width: 100%;
	height: 40px;
	min-height: 40px;
	padding: 0;
	margin: 0;
	border-radius: 6px;
	font-family: var(--body_typography-font-family, Lora, Georgia, Arial, Helvetica, sans-serif);
	font-size: 14px;
	line-height: 1;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.dfs-cc-box .dfs-cc-cal-day--available {
	background-color: #f0fdfa;
	border: 1px solid #99f6e4;
	color: #0f172a;
	font-weight: 600;
	cursor: pointer;
}

.dfs-cc-box .dfs-cc-cal-day--available:hover {
	background-color: #ccfbf1;
	border-color: #0f766e;
	color: #0f766e;
}

.dfs-cc-box .dfs-cc-cal-day--available:focus,
.dfs-cc-box .dfs-cc-cal-day--available:focus-visible {
	outline: 2px solid #0f766e;
	outline-offset: 1px;
	z-index: 2;
}

.dfs-cc-box .dfs-cc-cal-day--disabled {
	background-color: #f8fafc;
	border: 1px solid #f1f5f9;
	color: #cbd5e1;
	font-weight: 400;
	cursor: not-allowed;
}

/* Distinction visuelle d'aujourd'hui (sans le rendre sélectionnable s'il est interdit) */
.dfs-cc-box .dfs-cc-cal-day--today.dfs-cc-cal-day--disabled {
	background-color: #f1f5f9;
	border: 1.5px dashed #64748b;
	color: #64748b;
	font-weight: 600;
}

.dfs-cc-box .dfs-cc-cal-day--today.dfs-cc-cal-day--available:not(.dfs-cc-cal-day--selected) {
	border: 2px solid #0284c7;
	background-color: #f0f9ff;
	color: #0f172a;
}

.dfs-cc-cal-today-dot {
	display: block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: currentColor;
	margin-top: 3px;
}

/* Date sélectionnée clairement mise en évidence */
.dfs-cc-box .dfs-cc-cal-day--selected,
.dfs-cc-box .dfs-cc-cal-day--selected:hover {
	background-color: #0f766e !important;
	border: 2px solid #115e59 !important;
	color: #ffffff !important;
	font-weight: 700 !important;
	box-shadow: 0 2px 5px rgba(15, 118, 110, 0.3);
}

.dfs-cc-cal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #e2e8f0;
	font-size: 11.5px;
	color: #475569;
}

.dfs-cc-cal-legend {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.dfs-cc-cal-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.dfs-cc-cal-legend-swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	box-sizing: border-box;
}

.dfs-cc-cal-legend-swatch--avail {
	background-color: #f0fdfa;
	border: 1px solid #0f766e;
}

.dfs-cc-cal-legend-swatch--selected {
	background-color: #0f766e;
	border: 1px solid #115e59;
}

.dfs-cc-cal-legend-swatch--today {
	background-color: #f1f5f9;
	border: 1.5px dashed #64748b;
}

.dfs-cc-box .dfs-cc-cal-close {
	background: transparent;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	padding: 4px 9px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	line-height: 1.3;
}

.dfs-cc-box .dfs-cc-cal-close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.dfs-cc-box .dfs-cc-cal-close:focus,
.dfs-cc-box .dfs-cc-cal-close:focus-visible {
	outline: 2px solid #0f766e;
	outline-offset: 1px;
}

/* Ergonomie mobile : grille confortable (~44 px de hauteur de zone tactile), sans débordement ni découpe par un conteneur */
@media (max-width: 640px) {
	.dfs-cc-box {
		padding: 14px 12px;
	}

	.dfs-cc-box .dfs-cc-date-trigger {
		padding: 10px 10px;
		gap: 6px;
		font-size: 14.5px;
	}

	.dfs-cc-date-trigger-text {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		line-height: 1.3;
	}

	.dfs-cc-calendar-popover {
		position: relative;
		top: auto;
		left: auto;
		margin-top: 8px;
		width: 100%;
		max-width: 100%;
		padding: 12px 8px;
		z-index: 20;
	}

	.dfs-cc-cal-weekdays,
	.dfs-cc-cal-grid {
		gap: 3px;
	}

	.dfs-cc-cal-weekday {
		font-size: 11px;
	}

	.dfs-cc-box .dfs-cc-cal-nav {
		width: 42px;
		height: 42px;
		min-width: 42px;
		min-height: 42px;
	}

	.dfs-cc-cal-cell--empty,
	.dfs-cc-box .dfs-cc-cal-day {
		height: 44px;
		min-height: 44px;
		font-size: 14.5px;
	}
}

/* Carte du point de retrait unique présélectionné */
.dfs-cc-single-location-card {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	padding: 11px 14px;
	margin-bottom: 6px;
}

.dfs-cc-single-location-badge {
	display: inline-block;
	background: #ccfbf1;
	color: #115e59;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 2px 7px;
	border-radius: 3px;
	margin-bottom: 5px;
}

.dfs-cc-single-location-name {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 2px;
}

.dfs-cc-single-location-address,
.dfs-cc-single-location-phone {
	font-size: 13px;
	color: #334155;
	line-height: 1.4;
}

.dfs-cc-single-location-instructions {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px dashed #e2e8f0;
	font-size: 12.5px;
	color: #475569;
	font-style: italic;
}

.dfs-cc-selected-location-details {
	margin-top: 6px;
	padding: 8px 10px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	font-size: 13px;
	color: #334155;
}

/* Alertes et bannières */
.dfs-cc-alert {
	padding: 10px 13px;
	border-radius: 4px;
	font-size: 13.5px;
	line-height: 1.45;
	margin-bottom: 12px;
}

.dfs-cc-alert-error {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	border-left: 4px solid #dc2626;
	color: #991b1b;
}

.dfs-cc-alert-warning {
	background-color: #fffbeb;
	border: 1px solid #fde68a;
	border-left: 4px solid #d97706;
	color: #92400e;
}

.dfs-cc-alert-info {
	background-color: #f0f9ff;
	border: 1px solid #bae6fd;
	border-left: 4px solid #0284c7;
	color: #075985;
}

.dfs-cc-walkin-notice {
	padding: 10px 12px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-radius: 4px;
	color: #065f46;
	font-size: 13.5px;
	font-weight: 500;
}

.dfs-cc-loading-indicator {
	margin-top: 8px;
	font-size: 12.5px;
	color: #0f766e;
	font-weight: 500;
}
