/* Datewise widget. * Inherits the theme's font and text colour; the merchant sets one accent (--dw-accent). * Every other colour is mixed from currentColor or the accent, so it works on light and dark themes. * Radius hierarchy: panel 14px · controls 10px · days round · time chips pill. */ .datewise { --dw-accent: #0d6b5d; --dw-on-accent: #fff; --dw-line: color-mix(in srgb, currentColor 16%, transparent); --dw-line-strong: color-mix(in srgb, currentColor 34%, transparent); --dw-wash: color-mix(in srgb, currentColor 4%, transparent); --dw-tint: color-mix(in srgb, var(--dw-accent) 10%, transparent); --dw-tint-strong: color-mix(in srgb, var(--dw-accent) 18%, transparent); --dw-warn: #a35a00; --dw-warn-tint: color-mix(in srgb, #e8a33d 18%, transparent); --dw-bad: #b42318; --dw-good: #1e7a3a; display: grid; gap: 14px; margin: 20px 0; padding: 18px; border: 1px solid var(--dw-line); border-radius: 14px; font-size: 0.95em; line-height: 1.45; min-width: 0; text-align: left; } /* Some themes put app blocks in a full-width section: keep the scheduler a readable width. */ .datewise:not(.datewise--drawer) { max-width: 760px; margin-inline: auto; } .datewise--drawer { margin: 0 0 12px; padding: 14px; font-size: 0.9em; gap: 12px; } .datewise * { box-sizing: border-box; } .datewise button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; } .datewise [aria-disabled="true"] { cursor: not-allowed; opacity: 0.45; } .datewise :focus-visible { outline: 2px solid var(--dw-accent); outline-offset: 2px; } .dw-h { margin: 0; font-size: 1.12em; font-weight: 600; letter-spacing: -0.005em; } /* messages */ .dw-live:empty { display: none; } .dw-msg { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--dw-tint); } .dw-critical { background: color-mix(in srgb, var(--dw-bad) 9%, transparent); color: var(--dw-bad); } .dw-success { background: color-mix(in srgb, var(--dw-good) 10%, transparent); color: var(--dw-good); } .dw-peak { background: var(--dw-warn-tint); color: var(--dw-warn); } .dw-note { margin: 0; font-size: 0.88em; opacity: 0.75; } /* method switcher: one segmented control */ .dw-methods { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--dw-wash); border: 1px solid var(--dw-line); } .dw-method { display: grid; justify-items: center; gap: 2px; padding: 10px 6px 9px; text-align: center; border: 0; border-radius: 9px; background: transparent; transition: background-color 0.15s, box-shadow 0.15s; } .dw-method b { font-weight: 600; font-size: 0.95em; } .dw-method small { font-size: 0.76em; opacity: 0.7; line-height: 1.25; } .datewise .dw-method[aria-pressed="true"] { background: var(--dw-accent); color: var(--dw-on-accent) !important; box-shadow: 0 1px 2px color-mix(in srgb, var(--dw-accent) 40%, transparent); } .dw-method[aria-pressed="true"] small { opacity: 0.85; } .dw-method:not([aria-pressed="true"]):not([aria-disabled="true"]):hover { background: var(--dw-tint); } .dw-ico { width: 22px; height: 22px; flex: none; } @media (max-width: 380px) { .dw-method:not([aria-disabled="true"]) small { display: none; } } /* locations */ .dw-locs { display: grid; gap: 6px; } .dw-loc { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; text-align: left; border-radius: 10px; border: 1px solid var(--dw-line); background: transparent; } .dw-loc span:first-child { display: grid; gap: 1px; } .dw-loc small { font-size: 0.82em; opacity: 0.7; } .dw-loc span:last-child { font-variant-numeric: tabular-nums; font-size: 0.9em; } .dw-loc[aria-pressed="true"] { border-color: var(--dw-accent); box-shadow: inset 0 0 0 1px var(--dw-accent); background: var(--dw-tint); } /* postal check */ .dw-postal { display: grid; gap: 6px; } .dw-postal label { font-size: 0.85em; opacity: 0.75; } .dw-row { display: flex; gap: 8px; flex-wrap: wrap; } .dw-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--dw-line-strong); border-radius: 10px; font: inherit; background: transparent; color: inherit; } .dw-row input:focus { outline: none; border-color: var(--dw-accent); box-shadow: 0 0 0 3px var(--dw-tint-strong); } .dw-row button { padding: 10px 16px; border-radius: 10px; border: 0; background: var(--dw-accent); color: var(--dw-on-accent); font-weight: 600; } /* calendar */ .dw-cal { display: grid; gap: 8px; } .dw-calhead { display: flex; justify-content: space-between; align-items: center; } .dw-calhead b { font-weight: 600; } .dw-calhead button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--dw-line); border-radius: 50%; background: transparent; font-size: 1.15em; line-height: 1; } .dw-calhead button:hover { border-color: var(--dw-line-strong); } .dw-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px 2px; } .dw-dow { text-align: center; font-size: 0.74em; opacity: 0.55; padding-bottom: 2px; } .dw-day { position: relative; justify-self: center; width: 100%; max-width: 44px; aspect-ratio: 1; border: 1px solid transparent; border-radius: 50%; background: transparent; padding: 0; font-variant-numeric: tabular-nums; transition: background-color 0.12s, border-color 0.12s; } .dw-avail { font-weight: 600; } .dw-avail:hover { border-color: var(--dw-accent); } .dw-avail::before { /* availability dot */ content: ""; position: absolute; left: 50%; bottom: 14%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--dw-accent); } .dw-full { color: var(--dw-warn); background: var(--dw-warn-tint); } .dw-closed { opacity: 0.32; text-decoration: line-through; text-decoration-thickness: 1px; } .dw-out { opacity: 0.18; } /* !important: themes style button:focus/:active colours, which hid the selected day's number. */ .datewise .dw-sel, .datewise .dw-sel:hover, .datewise .dw-sel:focus { background: var(--dw-accent) !important; color: var(--dw-on-accent) !important; border-color: var(--dw-accent); } .dw-sel::before { background: var(--dw-on-accent); } .dw-peakday::after { content: ""; position: absolute; top: 8%; right: 8%; width: 7px; height: 7px; border-radius: 50%; background: #d98a0b; } .dw-left { /* "3 left" — only shown when scarce */ position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%); padding: 0 5px; font-size: 0.58em; font-style: normal; font-weight: 600; line-height: 1.5; border-radius: 99px; background: var(--dw-warn-tint); color: var(--dw-warn); white-space: nowrap; } .dw-avail:has(.dw-left)::before { display: none; } /* day detail + time chips */ .dw-day-detail { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--dw-line); } .dw-day-detail h3 { margin: 0; font-size: 1em; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .dw-badge { font-size: 0.74em; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--dw-warn-tint); color: var(--dw-warn); } .dw-slots { display: flex; flex-wrap: wrap; gap: 8px; } .dw-slot { display: inline-grid; justify-items: center; gap: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--dw-line-strong); background: transparent; text-align: center; font-variant-numeric: tabular-nums; } .dw-slot b { font-weight: 600; white-space: nowrap; } .dw-slot small { font-size: 0.74em; opacity: 0.7; } .dw-slot small:empty { display: none; } .dw-slot:not([aria-disabled="true"]):hover { border-color: var(--dw-accent); } .datewise .dw-slot[aria-pressed="true"] { background: var(--dw-accent) !important; border-color: var(--dw-accent); color: var(--dw-on-accent) !important; } /* booking stub: the confirmation ticket */ .dw-stub { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px 14px 18px; border-radius: 12px; background: var(--dw-tint); border-left: 3px dashed var(--dw-accent); animation: dw-stub-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); } .dw-stub__main { display: grid; gap: 1px; min-width: 0; } .dw-stub__method { display: flex; align-items: center; gap: 6px; font-size: 0.82em; opacity: 0.8; } .dw-stub__method .dw-ico { width: 16px; height: 16px; } .dw-stub__date { font-size: 1.12em; font-weight: 650; letter-spacing: -0.01em; } .dw-stub__time { font-variant-numeric: tabular-nums; } .dw-stub__fee { font-size: 0.82em; opacity: 0.75; font-variant-numeric: tabular-nums; } .dw-stub__side { display: grid; justify-items: center; gap: 4px; text-align: center; max-width: 9em; } .dw-stub__hold { font-size: 0.74em; opacity: 0.8; line-height: 1.3; } .dw-stub__hold b { display: block; font-size: 1.25em; font-variant-numeric: tabular-nums; opacity: 1; } .dw-stub--expired { background: var(--dw-warn-tint); border-left-color: var(--dw-warn); } .dw-ring { width: 34px; height: 34px; transform: rotate(-90deg); } .dw-ring circle { fill: none; stroke: var(--dw-tint-strong); stroke-width: 3; } .dw-ring .dw-ring__arc { stroke: var(--dw-accent); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 1s linear; } .dw-check { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--dw-accent); fill: none; stroke: var(--dw-on-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; } @keyframes dw-stub-in { from { opacity: 0; transform: translateY(4px); } } /* loading */ .dw-skeleton { height: 132px; border-radius: 12px; background: linear-gradient(90deg, var(--dw-wash, rgba(127,127,127,.08)) 0%, rgba(127, 127, 127, 0.16) 50%, var(--dw-wash, rgba(127,127,127,.08)) 100%); background-size: 200% 100%; animation: dw-shimmer 1.3s infinite linear; } @keyframes dw-shimmer { to { background-position: -200% 0; } } .datewise[aria-busy="true"] .dw-slots, .datewise[aria-busy="true"] .dw-grid { opacity: 0.55; pointer-events: none; transition: opacity 0.2s; } @media (prefers-reduced-motion: reduce) { .dw-skeleton, .dw-stub { animation: none; } .dw-ring .dw-ring__arc, .dw-day, .dw-method { transition: none; } }