/* Custom Elements - Availability — booking widget (Calendly-style).
   Tokens are overridable per element via css.twig / inline style. */
.ceav-widget, .ceav-modal {
    --ceav-accent: #0263ff;
    --ceav-bg: #ffffff;
    --ceav-text: #1d2939;
    --ceav-muted: #667085;
    --ceav-line: #e4e7ec;
    --ceav-radius: 12px;
    --ceav-max: 1000px;
    --ceav-type: var(--ceav-accent);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ceav-text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.ceav-widget { max-width: var(--ceav-max); width: 100%; margin: 0 auto; box-sizing: border-box; }
.ceav-widget *, .ceav-modal * { box-sizing: border-box; }
.ceav-widget button, .ceav-modal button { font: inherit; cursor: pointer; }
.ceav-loading { padding: 40px; text-align: center; color: var(--ceav-muted); }
.ceav-card {
    display: flex; background: var(--ceav-bg); border: 1px solid var(--ceav-line); border-radius: var(--ceav-radius);
    box-shadow: 0 10px 40px rgba(16, 24, 40, .08); overflow: hidden; min-height: 520px;
}
.ceav-card--narrow { max-width: 520px; margin: 0 auto; min-height: 0; }
.ceav-side {
    width: 300px; flex: 0 0 300px; padding: 28px 26px; border-right: 1px solid var(--ceav-line);
    display: flex; flex-direction: column; gap: 6px;
}
.ceav-side::before { content: ""; display: block; height: 4px; width: 46px; border-radius: 3px; background: var(--ceav-type); margin-bottom: 14px; }
.ceav-back { border: 1px solid var(--ceav-line); background: #fff; color: var(--ceav-accent); width: 40px; height: 40px; border-radius: 50%; font-size: 20px; line-height: 1; margin-bottom: 14px; display: inline-flex; align-items: center; justify-content: center; }
.ceav-back:hover { background: #f4f6f9; }
.ceav-host { display: flex; align-items: center; gap: 10px; color: var(--ceav-muted); font-weight: 600; font-size: 14px; }
.ceav-host img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ceav-title { font-size: 24px; font-weight: 700; margin: 4px 0 8px; line-height: 1.25; }
.ceav-meta { display: flex; align-items: flex-start; gap: 8px; color: var(--ceav-muted); font-size: 14px; font-weight: 600; margin: 2px 0; }
.ceav-meta .ceav-ico { width: 18px; text-align: center; flex: 0 0 18px; color: #98a2b3; }
.ceav-meta a { color: var(--ceav-accent); text-decoration: none; word-break: break-all; }
.ceav-desc { margin-top: 10px; color: var(--ceav-text); font-size: 14px; }
.ceav-desc p { margin: 0 0 8px; }
.ceav-former { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ceav-line); font-size: 13px; color: var(--ceav-muted); }
.ceav-former s { display: block; color: #98a2b3; }
.ceav-main { flex: 1; padding: 28px 26px; min-width: 0; }
.ceav-step-title { font-size: 20px; font-weight: 700; margin: 0 0 18px; }

/* picker */
.ceav-picker { display: flex; gap: 24px; }
.ceav-cal { flex: 1; min-width: 0; max-width: 420px; }
.ceav-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ceav-cal-head strong { font-size: 16px; font-weight: 600; }
.ceav-cal-head button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ceav-accent); font-size: 26px; line-height: 1; }
.ceav-cal-head button:hover:not(:disabled) { background: #f0f5ff; }
.ceav-cal-head button:disabled { color: #c9d2de; cursor: default; }
.ceav-cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 11px; letter-spacing: .04em; color: var(--ceav-muted); margin-bottom: 4px; }
.ceav-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ceav-cal-days > * { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.ceav-cal-days button {
    width: 100%; max-width: 44px; aspect-ratio: 1; border-radius: 50%; border: 0; background: transparent; color: #c0c7d1; font-weight: 600; font-size: 14px; position: relative; cursor: default;
}
.ceav-cal-days button.is-avail { background: color-mix(in srgb, var(--ceav-accent) 10%, #fff); color: var(--ceav-accent); cursor: pointer; }
.ceav-cal-days button.is-avail:hover { background: color-mix(in srgb, var(--ceav-accent) 20%, #fff); }
.ceav-cal-days button.is-sel { background: var(--ceav-accent) !important; color: #fff !important; }
.ceav-cal-days button.is-today::after { content: ""; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
@supports not (background: color-mix(in srgb, red, blue)) {
    .ceav-cal-days button.is-avail { background: #eaf1ff; }
}
.ceav-tz { margin-top: 18px; }
.ceav-tz label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.ceav-tz-sel { position: relative; }
.ceav-tz-sel select, .ceav-tz-sel > div { width: 100%; border: 0; background: transparent; color: var(--ceav-text); font: inherit; font-size: 14px; padding: 6px 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ceav-tz-row { display: flex; align-items: center; gap: 10px; }
.ceav-tz-row select { flex: 1; min-width: 0; }
.ceav-fmt { display: inline-flex; border: 1px solid var(--ceav-line); border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.ceav-fmt button { border: 0; background: #fff; padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--ceav-muted); }
.ceav-fmt button.is-on { background: var(--ceav-accent); color: #fff; }
.ceav-times { width: 220px; flex: 0 0 220px; }
.ceav-times-head { font-size: 15px; font-weight: 600; margin: 4px 0 12px; min-height: 22px; }
.ceav-times-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.ceav-slot {
    display: flex; width: 100%; border: 1px solid var(--ceav-accent); color: var(--ceav-accent); background: #fff;
    border-radius: 8px; font-weight: 700; font-size: 14px; padding: 11px 10px; justify-content: center; transition: background .12s;
}
.ceav-slot:hover { background: color-mix(in srgb, var(--ceav-accent) 8%, #fff); }
.ceav-slot.is-sel { padding: 0; border: 0; gap: 6px; background: transparent; }
.ceav-slot.is-sel .ceav-slot-time { flex: 1; background: #4b5563; color: #fff; border-radius: 8px; padding: 11px 10px; text-align: center; }
.ceav-slot.is-sel .ceav-slot-confirm { flex: 1; background: var(--ceav-accent); color: #fff; border-radius: 8px; padding: 11px 10px; text-align: center; cursor: pointer; }
.ceav-slot small { font-weight: 600; color: var(--ceav-muted); margin-left: 6px; }
.ceav-empty-times { color: var(--ceav-muted); font-size: 14px; padding: 8px 0; }

/* form */
.ceav-form { max-width: 520px; }
.ceav-f { margin-bottom: 16px; }
.ceav-f label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.ceav-f label .ceav-req { color: #d92d20; margin-left: 2px; }
.ceav-f input[type=text], .ceav-f input[type=email], .ceav-f input[type=tel], .ceav-f textarea, .ceav-f select {
    width: 100%; border: 1px solid #c9d2de; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ceav-text); background: #fff;
}
.ceav-f input:focus, .ceav-f textarea:focus, .ceav-f select:focus { outline: none; border-color: var(--ceav-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ceav-accent) 20%, transparent); }
.ceav-f textarea { min-height: 88px; resize: vertical; }
.ceav-f .ceav-opt { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; font-weight: 500; }
.ceav-f .ceav-opt input { width: 16px; height: 16px; margin: 0; }
.ceav-f.is-error input, .ceav-f.is-error textarea, .ceav-f.is-error select { border-color: #d92d20; }
.ceav-f-error { color: #d92d20; font-size: 13px; margin-top: 4px; }
.ceav-link-btn { border: 1px solid var(--ceav-accent); background: #fff; color: var(--ceav-accent); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; }
.ceav-policy { font-size: 13px; color: var(--ceav-muted); white-space: pre-wrap; margin: 12px 0; }
.ceav-submit { background: var(--ceav-accent); color: #fff; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: 15px; }
.ceav-submit:hover { filter: brightness(.95); }
.ceav-submit:disabled { opacity: .6; cursor: default; }
.ceav-btn { background: #fff; color: var(--ceav-text); border: 1px solid #c9d2de; border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.ceav-btn:hover { background: #f4f6f9; }
.ceav-btn--danger { color: #d92d20; border-color: #f0b4b5; }
.ceav-alert { background: #fdefef; color: #b32d2e; border-radius: 8px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }

/* done / manage */
.ceav-done { text-align: center; max-width: 560px; margin: 0 auto; padding: 8px 0; }
.ceav-check { width: 44px; height: 44px; border-radius: 50%; background: #12b76a; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 12px; }
.ceav-done h3 { font-size: 22px; margin: 0 0 4px; }
.ceav-done > p { color: var(--ceav-muted); margin: 0 0 18px; }
.ceav-details { text-align: left; border: 1px solid var(--ceav-line); border-radius: 10px; padding: 16px 18px; margin: 0 0 18px; }
.ceav-details h4 { margin: 0 0 10px; font-size: 18px; }
.ceav-details .ceav-meta { margin: 6px 0; }
.ceav-details .ceav-meta strong { color: var(--ceav-text); }
.ceav-addto { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.ceav-addto span { width: 100%; font-size: 13px; color: var(--ceav-muted); font-weight: 600; }
.ceav-manage-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ceav-done .ceav-msg { font-size: 14px; white-space: pre-wrap; margin-bottom: 14px; }
.ceav-status { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #fdefef; color: #b32d2e; margin-bottom: 10px; }
.ceav-cancel-form { max-width: 460px; margin: 0 auto; text-align: left; }

/* popup */
.ceav-popup-btn { background: var(--ceav-accent, #0263ff); color: #fff; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.ceav-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(16, 24, 40, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ceav-modal-box { position: relative; width: 100%; max-width: 1000px; max-height: 92vh; overflow: auto; }
.ceav-modal-close { position: absolute; top: -4px; right: -4px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: #344054; font-size: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }

/* landing */
.ceav-landing { max-width: 720px; margin: 0 auto; }
.ceav-landing-head { text-align: center; margin-bottom: 26px; }
.ceav-landing-head h1 { font-size: 28px; margin: 0 0 6px; }
.ceav-landing-head p { color: #667085; margin: 0; }
.ceav-landing-logo { max-height: 56px; margin-bottom: 14px; }
.ceav-landing-host { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 22px 0 10px; }
.ceav-landing-host img { width: 32px; height: 32px; border-radius: 50%; }
.ceav-landing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ceav-landing-card { display: block; position: relative; background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; padding: 18px 44px 18px 18px; text-decoration: none; color: #1d2939; transition: box-shadow .15s; }
.ceav-landing-card:hover { box-shadow: 0 6px 24px rgba(16, 24, 40, .08); }
.ceav-landing-bar { display: block; width: 36px; height: 4px; border-radius: 3px; background: var(--ceav-card, #0263ff); margin-bottom: 12px; }
.ceav-landing-card strong { display: block; font-size: 16px; }
.ceav-landing-card em { font-style: normal; color: #667085; font-size: 13px; }
.ceav-landing-go { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #98a2b3; font-size: 18px; }
.ceav-muted { color: #667085; text-align: center; }

@media (max-width: 760px) {
    .ceav-card { flex-direction: column; min-height: 0; }
    .ceav-side { width: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--ceav-line); }
    .ceav-picker { flex-direction: column; }
    .ceav-cal { max-width: none; }
    .ceav-times { width: auto; flex: none; }
    .ceav-times-list { max-height: none; }
}
