/* ─── FLO Product Addons — Frontend Styles ──────────────────── */

/* Wrapper — no font overrides; inherits theme typography */
.flo-addons-wrapper {
	margin: 0 0 20px;
}

/* Group: CSS grid on the actual parent of .flo-field-wrap */
.flo-group {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px;
	margin-bottom: 16px;
	margin-top: 16px;
}

/* Field wrap — default full width, col classes narrow it */
.flo-group .flo-field-wrap {
	grid-column: span 12;
	min-width: 0;
}
.flo-group .flo-col-33  { grid-column: span 4; }
.flo-group .flo-col-50  { grid-column: span 6; }
.flo-group .flo-col-66  { grid-column: span 8; }
.flo-group .flo-col-100 { grid-column: span 12; }

.flo-field-wrap[data-conditional] { transition: opacity .15s; }

/* ─── Delivery & Time combined field ────────────────────────── */
.flo-delivery-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	align-items: start;
	margin-top: 6px;
}
.flo-delivery-date,
.flo-delivery-time { min-width: 0; }
.flo-delivery-time select,
.flo-delivery-custom-time { width: 100%; }
.flo-delivery-custom-time { margin-top: 6px; }
@media (max-width: 480px) {
	.flo-delivery-row { grid-template-columns: 1fr; }
}

/* Price inline with label */
.flo-field-price {
	font-size: .8em;
	font-weight: 700;
	color: inherit;
	margin-left: 6px;
}

/* ─── Label ──────────────────────────────────────────────── */
.flo-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: inherit;
}
.flo-required { color: #c00; margin-left: 2px; }
.flo-label-subtitle {
	display: block;
	font-size: .85em;
	font-weight: 400;
	opacity: .6;
	margin-top: 2px;
}

/* ─── Inputs — modern, full-column width ─────────────────── */
/* Scoped under .flo-addons-wrapper to override WooCommerce/theme defaults */
.flo-addons-wrapper .flo-date-input,
.flo-addons-wrapper .flo-text-input,
.flo-addons-wrapper .flo-time-select,
.flo-addons-wrapper .flo-textarea,
.flo-date-input,
.flo-text-input,
.flo-time-select,
.flo-textarea {
	width: 100% !important;
	max-width: 100% !important;
	padding: 10px 12px;
	border: 1.5px solid #d0d5dd;
	border-radius: 8px;
	font-size: inherit;
	font-family: inherit;
	color: inherit;
	background: #fff;
	box-sizing: border-box;
	transition: border-color .15s, box-shadow .15s;
	appearance: none;
	-webkit-appearance: none;
}

/* Calendar icon for date */
.flo-date-input {
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 40px;
}

/* Custom arrow for select */
.flo-time-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
	cursor: pointer;
}

.flo-textarea {
	resize: vertical;
	min-height: 90px;
	line-height: 1.5;
}

.flo-addons-wrapper .flo-date-input:focus,
.flo-addons-wrapper .flo-text-input:focus,
.flo-addons-wrapper .flo-time-select:focus,
.flo-addons-wrapper .flo-textarea:focus,
.flo-date-input:focus,
.flo-text-input:focus,
.flo-time-select:focus,
.flo-textarea:focus {
	outline: none !important;
	border-color: #2271b1 !important;
	box-shadow: 0 0 0 3px rgba(34,113,177,.12) !important;
}

.flo-date-input::placeholder,
.flo-text-input::placeholder,
.flo-textarea::placeholder { opacity: .5; }

/* ─── Error state ─────────────────────────────────────────── */
.flo-field-has-error .flo-date-input,
.flo-field-has-error .flo-text-input,
.flo-field-has-error .flo-time-select,
.flo-field-has-error .flo-textarea {
	border-color: #d32f2f;
	box-shadow: 0 0 0 3px rgba(211,47,47,.10);
}
.flo-field-has-error .flo-radio-list,
.flo-field-has-error .flo-swatches-container { border-color: #d32f2f; }

.flo-field-error {
	display: block;
	color: #d32f2f;
	font-size: .85em;
	margin-top: 5px;
}

/* ─── Radio ───────────────────────────────────────────────── */
.flo-radio-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.flo-radio-item label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}
.flo-radio-input { margin: 0; accent-color: #2271b1; }
.flo-radio-label { color: inherit; }
.flo-price-badge {
	background: #eef4fb;
	border: 1px solid #b5d0ea;
	color: #2271b1;
	font-size: .78em;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 4px;
	margin-left: 4px;
}

/* ─── Swatches ────────────────────────────────────────────── */
.flo-swatches-container {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 4px;
}
.flo-swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	cursor: pointer;
	border: 2px solid #e2e6ea;
	border-radius: 8px;
	padding: 6px;
	transition: border-color .15s, box-shadow .15s;
	min-width: 64px;
	max-width: 100px;
	text-align: center;
}
.flo-swatch:hover { border-color: #2271b1; }
.flo-swatch.flo-swatch--active {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34,113,177,.15);
}
.flo-swatch-img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.flo-swatch-color { display: block; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.flo-swatch-text { font-weight: 600; padding: 8px 6px; }
.flo-swatch-label { font-size: .8em; opacity: .7; }
.flo-swatch-price { display: block; font-size: .8em; font-weight: 700; color: #2271b1; }

/* ─── Upload ──────────────────────────────────────────────── */
.flo-file-input { font-size: inherit; }
.flo-upload-preview { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.flo-preview-img { width: 80px; height: 80px; object-fit: cover; border: 1px solid #e2e6ea; border-radius: 6px; }
.flo-remove-upload {
	background: #fff0f0;
	border: 1px solid #ffd5d5;
	color: #d32f2f;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 5px;
	font-size: .85em;
}

/* ─── Cart item addon label ───────────────────────────────── */
dl.variation dt,
.wc-block-components-product-details__name { font-weight: 700; }

/* ─── Price summary ───────────────────────────────────────── */
.flo-price-summary {
	border-top: 1px solid #eaecf0;
	padding-top: 14px;
	margin-top: 4px;
}
.flo-price-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}
.flo-price-label { opacity: .65; }
.flo-total-row { font-weight: 700; }
.flo-addon-price { font-weight: 600; color: #2271b1; }

/* ─── Flatpickr — modern calendar UI ─────────────────────── */
.flatpickr-calendar {
	font-family: inherit;
	border-radius: 14px;
	box-shadow: 0 6px 24px rgba(0,0,0,.11);
	border: 1px solid #e2e6ea;
	background: #fff;
	padding: 0;
	overflow: hidden;
}

/* ── Header (month + year nav) ── */
/* flo-frontend loads before flatpickr CDN, so !important is required to win */
.flatpickr-months {
	display: flex !important;
	align-items: center !important;
	position: relative !important;
	font-size: 12px !important;
	background: #fff;
	height: 50px !important;
	padding: 0 !important;
	border-bottom: 1px solid #f0f2f5;
}
.flatpickr-months .flatpickr-month {
	background: transparent;
	height: 50px !important;
	line-height: normal !important;
	border-radius: 0;
	color: inherit;
	fill: currentColor;
	flex: 1;
	position: relative;
	overflow: visible !important;
}
/* Arrows stay absolute (flatpickr default) but span full header height */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
	position: absolute !important;
	top: 0 !important;
	height: 50px !important;
	display: flex !important;
	align-items: center !important;
	padding: 0 10px !important;
	color: inherit !important;
	fill: currentColor !important;
	opacity: .5;
	border-radius: 8px;
	transition: background .12s, opacity .12s;
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
	background: #f0f2f5;
	opacity: 1;
}
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg { width: 13px; height: 13px; }

/* Month name dropdown + year spinner — override flatpickr's 7.48px top padding */
.flatpickr-current-month {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 2px;
	font-size: inherit;
	font-weight: 600;
	color: inherit;
}
.flatpickr-current-month .cur-month {
	font-weight: 600;
	color: inherit;
	margin: 0;
	padding: 0 !important;
}
/* Month dropdown select */
.flatpickr-monthDropdown-months {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: none;
	cursor: pointer;
	font-weight: 600;
	font-size: inherit;
	color: inherit;
	font-family: inherit;
	padding: 0 18px 0 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0 center;
}
.flatpickr-monthDropdown-months:focus { outline: none; }

/* Year number input */
.numInputWrapper {
	display: inline-flex;
	align-items: center;
	position: relative;
}
.numInputWrapper:hover { background: transparent; }
.numInput.cur-year {
	background: transparent;
	border: none;
	font-weight: 600;
	font-size: inherit;
	color: inherit;
	font-family: inherit;
	padding: 0;
	width: 52px;
}
.numInput.cur-year:focus { outline: none; }
.numInputWrapper span.arrowUp,
.numInputWrapper span.arrowDown {
	border: none;
	opacity: 0;
	right: 0;
}
.numInputWrapper:hover span.arrowUp,
.numInputWrapper:hover span.arrowDown { opacity: .6; }
.numInputWrapper span.arrowUp::after  { border-bottom-color: currentColor; }
.numInputWrapper span.arrowDown::after { border-top-color: currentColor; }

/* ── Weekday labels ── */
.flatpickr-weekdays {
	background: #fff;
	padding: 8px 0 2px;
}
.flatpickr-weekday {
	color: inherit;
	opacity: .4;
	font-weight: 700;
	font-size: .7em;
	text-transform: uppercase;
	letter-spacing: .5px;
}

/* ── Day cells ── */
.flatpickr-days { border: none; }
.dayContainer { padding: 4px 8px 10px; gap: 0; }
.flatpickr-day {
	border-radius: 50%;
	border: none;
	height: 36px;
	line-height: 36px;
	font-size: inherit;
	color: inherit;
	max-width: 36px;
	transition: background .1s, color .1s;
}
/* Today indicator — only when not blacked out */
.flatpickr-day.today:not(.selected):not(.disabled) {
	border: none;
	font-weight: 700;
}
.flatpickr-day.today:not(.selected):not(.disabled)::after { display: none; }
/* Selected */
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
	font-weight: 600;
}
/* Hover */
.flatpickr-day:hover:not(.disabled):not(.selected):not(.today) {
	background: #eef4fb;
	border-color: transparent;
	color: inherit;
}
/* Previous/next month days */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { opacity: .3; }
/* Blackout / disabled */
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
	background: #fef2f2;
	color: #fca5a5;
	text-decoration: line-through;
	cursor: not-allowed;
	border-color: transparent;
	border-radius: 50%;
}
/* Today + blackout — must beat flatpickr's own .today border/color */
.flatpickr-day.today.disabled,
.flatpickr-day.today.disabled:hover {
	background: #fef2f2 !important;
	color: #fca5a5 !important;
	font-weight: normal !important;
	border-color: transparent !important;
	text-decoration: line-through;
	cursor: not-allowed;
}
