/* The CRM-style pickers (cf_pickers.js): dropdown, list of times, month calendar. Shared by /crm and the website
   forms; the colours come from the CRM (Theme) variables, with plain fallbacks for the website. */
/* ---------------------------------------------------------------- dropdowns (cf_pickers.js) */
/* the real control stays for its value and events; the button below it is what shows */
select.cf-filter[data-cf-enhanced], input[data-cf-enhanced] { display: none !important; }
.cf-select { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; height: 32px; min-width: 150px; max-width: 240px; padding: 0 10px 0 12px;
	border-radius: 8px; border: 1px solid var(--outline-gray-2, #e2e2e2); background: var(--surface-base, #fff); color: var(--ink-gray-8, #383838);
	font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
	transition: border-color 0.12s, box-shadow 0.12s, background 0.12s; }
.cf-select:hover:not(:disabled) { border-color: var(--outline-gray-3, #d6d6d6); background: var(--surface-gray-1, #fafafa); }
.cf-select:focus-visible, .cf-select[aria-expanded="true"] { outline: none; border-color: var(--ct-primary, var(--outline-gray-4, #a3a3a3)); box-shadow: 0 0 0 3px var(--ct-primary-ring, var(--surface-gray-2, #f0f0f0)); }
.cf-select:disabled { cursor: not-allowed; opacity: 0.65; background: var(--surface-gray-1, #fafafa); }
.cf-select-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-select-blank .cf-select-label { color: var(--ink-gray-5, #7c7c7c); font-weight: 400; }
.cf-select-chevron { display: inline-flex; width: 14px; height: 14px; flex-shrink: 0; color: var(--ink-gray-5, #7c7c7c); transition: rotate 0.15s; }
.cf-select[aria-expanded="true"] .cf-select-chevron { rotate: 180deg; }
.cf-select-chevron svg { width: 100%; height: 100%; }
.cf-menu { position: fixed; z-index: 1200; display: flex; flex-direction: column; max-height: 300px; max-width: min(360px, calc(100vw - 16px)); padding: 4px; overflow: hidden;
	border-radius: 10px; background: var(--surface-elevation-2, var(--surface-base, #fff)); color: var(--ink-gray-8, #383838); font-size: 13px;
	box-shadow: var(--elevation-lg, 0 12px 32px -8px rgb(0 0 0 / 0.22)), 0 0 0 1px var(--outline-gray-2, #e2e2e2); animation: cf-menu-in 0.12s ease-out; }
@keyframes cf-menu-in { from { opacity: 0; translate: 0 -4px; } }
html[data-ct] .cf-menu { animation-duration: var(--ct-speed); animation-timing-function: var(--ct-ease); }
html[data-ct-popup="zoom"] .cf-menu { animation-name: ct-zoom-in; }
html[data-ct-popup="slide-up"] .cf-menu { animation-name: ct-rise-in; }
html[data-ct-popup="drop"] .cf-menu { animation-name: ct-drop-in; }
.cf-menu-search { padding: 2px 2px 6px; border-bottom: 1px solid var(--outline-gray-1, #ededed); margin-bottom: 4px; }
.cf-menu-search input { width: 100%; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--outline-gray-2, #e2e2e2); background: var(--surface-gray-1, #fafafa); color: var(--ink-gray-9, #171717); font: inherit; font-size: 13px; outline: none; }
.cf-menu-search input:focus { border-color: var(--ct-primary, var(--outline-gray-4, #a3a3a3)); }
.cf-menu-items { overflow-y: auto; }
.cf-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 30px; padding: 0 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.cf-option[hidden] { display: none; }
.cf-option > span { overflow: hidden; text-overflow: ellipsis; }
.cf-option.blank { color: var(--ink-gray-5, #7c7c7c); }
.cf-option[data-highlighted] { background: var(--ct-primary-soft, var(--surface-gray-2, #f3f3f3)); color: var(--ct-primary-ink, var(--ink-gray-9, #171717)); }
.cf-option[aria-selected="true"] { font-weight: 600; color: var(--ct-primary-ink, var(--ink-gray-9, #171717)); }
.cf-option i { display: inline-flex; width: 14px; height: 14px; flex-shrink: 0; color: var(--ct-primary, var(--ink-gray-9, #171717)); }
.cf-option i svg { width: 100%; height: 100%; }
html[data-ct-motion="off"] .cf-menu { animation: none; }

/* ---------------------------------------------------------------- time picker (a list of times) */
.cf-select.cf-time { font-variant-numeric: tabular-nums; }
.cf-select.cf-time .cf-select-chevron { width: 15px; height: 15px; }
.cf-menu-time { width: 190px; }
.cf-menu-time .cf-option { font-variant-numeric: tabular-nums; }
.cf-option small { margin-left: 4px; font-size: 11px; font-weight: 400; color: var(--ink-gray-5, #7c7c7c); }
/* ---------------------------------------------------------------- date picker (like frappe-ui's) */
.cf-select.cf-date .cf-select-chevron { width: 15px; height: 15px; }
.cf-cal { width: 260px; min-width: 0 !important; max-height: none; padding: 8px; user-select: none; }
.cf-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px 6px; }
.cf-cal-head strong { font-size: 13px; font-weight: 600; color: var(--ink-gray-8, #383838); }
.cf-cal-nav { display: flex; align-items: center; gap: 2px; }
.cf-cal-nav button { display: inline-flex; align-items: center; justify-content: center; height: 26px; min-width: 26px; padding: 0 6px; border: 0; border-radius: 6px;
	background: transparent; color: var(--ink-gray-6, #6b6b6b); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.cf-cal-nav button:hover { background: var(--surface-gray-2, #f3f3f3); color: var(--ink-gray-9, #171717); }
.cf-cal-nav svg { width: 15px; height: 15px; }
.cf-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cf-cal-dow { display: flex; align-items: center; justify-content: center; height: 24px; font-size: 11px; font-weight: 500; text-transform: uppercase; color: var(--ink-gray-4, #a1a1a1); }
.cf-cal-day { height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-gray-8, #383838); font: inherit; font-size: 13px;
	font-variant-numeric: tabular-nums; cursor: pointer; transition: background-color 0.1s, color 0.1s; }
.cf-cal-day:hover { background: var(--ct-primary-soft, var(--surface-gray-2, #f3f3f3)); color: var(--ct-primary-ink, var(--ink-gray-9, #171717)); }
.cf-cal-day.out { color: var(--ink-gray-3, #c7c7c7); }
.cf-cal-day.today { font-weight: 700; color: var(--ink-gray-9, #171717); box-shadow: inset 0 0 0 1px var(--outline-gray-3, #d6d6d6); }
.cf-cal-day.focus { box-shadow: inset 0 0 0 2px var(--ct-primary-ring, var(--outline-gray-4, #a3a3a3)); }
.cf-cal-day.selected, .cf-cal-day.selected:hover { background: var(--ct-primary, var(--surface-gray-9, #262626)); color: var(--ct-on-primary, var(--surface-base, #fff)); font-weight: 600; box-shadow: none; }
.cf-cal-foot { display: flex; justify-content: flex-end; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--outline-gray-1, #ededed); }
.cf-cal-foot button { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-gray-6, #6b6b6b); font: inherit; font-size: 12px; cursor: pointer; }
.cf-cal-foot button:hover { background: var(--surface-gray-2, #f3f3f3); color: var(--ink-gray-9, #171717); }
.cf-cal-day:disabled, .cf-cal-nav button:disabled { color: var(--ink-gray-3, #c7c7c7); background: transparent; cursor: not-allowed; text-decoration: line-through; }
.cf-cal-nav button:disabled { text-decoration: none; }

/* ---------------------------------------------------------------- time picker: parts of the day, times as chips */
.cf-menu.cf-tp { width: 300px; max-height: none; padding: 14px; gap: 12px; border-radius: 14px; user-select: none;
	box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.28), 0 0 0 1px var(--outline-gray-2, #e7e7e7); }
.cf-tp-head { display: flex; align-items: center; justify-content: space-between; }
.cf-tp-now { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--ink-gray-9, #171717); font-variant-numeric: tabular-nums; }
.cf-tp-now small { margin-left: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ink-gray-5, #7c7c7c); text-transform: uppercase; }
.cf-tp-now.blank { color: var(--ink-gray-3, #c7c7c7); }
.cf-tp-clear { height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--surface-gray-2, #f3f3f3); color: var(--ink-gray-6, #6b6b6b);
	font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.cf-tp-clear:hover { background: var(--surface-gray-3, #ebebeb); color: var(--ink-gray-9, #171717); }
.cf-tp-parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-gray-2, #f3f3f3); }
.cf-tp-parts button { height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-gray-6, #6b6b6b); font: inherit;
	font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.cf-tp-parts button:hover { color: var(--ink-gray-9, #171717); }
.cf-tp-parts button[aria-selected="true"] { background: var(--surface-base, #fff); color: var(--ct-primary-ink, var(--ink-gray-9, #171717));
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.cf-tp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 196px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.cf-tp-chip { height: 36px; border: 1px solid var(--outline-gray-2, #e7e7e7); border-radius: 9px; background: var(--surface-base, #fff);
	color: var(--ink-gray-8, #383838); font: inherit; font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer;
	transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.12s; }
.cf-tp-chip:hover { border-color: var(--ct-primary-ring, var(--outline-gray-4, #a3a3a3)); background: var(--ct-primary-softer, var(--surface-gray-1, #fafafa));
	color: var(--ct-primary-ink, var(--ink-gray-9, #171717)); transform: translateY(-1px); }
.cf-tp-chip.focus { outline: 2px solid var(--ct-primary-ring, var(--outline-gray-4, #a3a3a3)); outline-offset: 1px; }
.cf-tp-chip.selected { border-color: transparent; background: var(--ct-primary, var(--surface-gray-9, #262626)); color: var(--ct-on-primary, #fff);
	font-weight: 700; box-shadow: 0 4px 10px -4px var(--ct-primary, rgb(0 0 0 / 0.4)); }
.cf-tp-other { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--outline-gray-1, #ededed); }
.cf-tp-other span { font-size: 12px; font-weight: 500; color: var(--ink-gray-5, #7c7c7c); white-space: nowrap; }
.cf-tp-other input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--outline-gray-2, #e2e2e2);
	background: var(--surface-gray-1, #fafafa); color: var(--ink-gray-9, #171717); font: inherit; font-size: 13px; outline: none; }
.cf-tp-other input:focus { border-color: var(--ct-primary, var(--outline-gray-4, #a3a3a3)); background: var(--surface-base, #fff); }
.cf-tp-other input.bad { border-color: #d63637; }

/* the calendar's title opens months and years */
.cf-cal-title { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; margin-left: -4px; border: 0; border-radius: 7px;
	background: transparent; color: var(--ink-gray-8, #383838); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.cf-cal-title:hover { background: var(--surface-gray-2, #f3f3f3); color: var(--ink-gray-9, #171717); }
.cf-cal-title span { display: inline-flex; width: 13px; height: 13px; color: var(--ink-gray-5, #7c7c7c); }
.cf-cal-title svg { width: 100%; height: 100%; }
.cf-cal-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0 2px; }
.cf-cal-month { height: 40px; border: 1px solid var(--outline-gray-2, #e7e7e7); border-radius: 9px; background: var(--surface-base, #fff);
	color: var(--ink-gray-8, #383838); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.12s, border-color 0.12s; }
.cf-cal-month:hover:not(:disabled) { border-color: var(--ct-primary-ring, var(--outline-gray-4, #a3a3a3)); background: var(--ct-primary-softer, var(--surface-gray-1, #fafafa)); }
.cf-cal-month.today { font-weight: 700; }
.cf-cal-month.selected { border-color: transparent; background: var(--ct-primary, var(--surface-gray-9, #262626)); color: var(--ct-on-primary, #fff); }
.cf-cal-month:disabled { color: var(--ink-gray-3, #c7c7c7); cursor: not-allowed; }
/* a softer, roomier calendar */
.cf-menu.cf-cal { width: 284px; padding: 12px; border-radius: 14px; box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.28), 0 0 0 1px var(--outline-gray-2, #e7e7e7); }
.cf-cal-day { height: 34px; border-radius: 9px; }
