/* Shared page and panel colors for home, calendar, errors and support. */
html:root[data-site-surfaces][data-theme="light"] {
  --page-background: #f5f5f5;
  --page-panel: #fff;
}

html:root[data-site-surfaces][data-theme="dark"] {
  --page-background: #000;
  --page-panel: #191919;
}

html:root[data-site-surfaces][data-theme] {
  --bg-color: var(--page-background) !important;
  --sidebar-bg: var(--page-background) !important;
  --card-bg: var(--page-panel) !important;
  --modal-bg-standard: var(--page-panel);
  --mobile-home-surface: var(--page-background);
  background: var(--page-background) !important;
}

html:root[data-site-surfaces][data-theme] :is(body, .rgl-main, .rgl-sidebar,
  .account-page-view, .schedule-app, .upgrade8-support-modal-panel),
html:root[data-site-surfaces][data-theme] .rgl-main:has(#contactTriggerBtn) {
  background: var(--page-background) !important;
}

html:root[data-site-surfaces][data-theme] :is(.mobile-store-card, .account-card,
  .bento-card, .support-profile, .support-workspace, .support-row, .support-dialog,
  .support-message, .error-directory-row, .error-detail-card, .modal-sheet,
  .upgrade8-help-section, .upgrade8-help-card, .upgrade8-link-card,
  .schedule-month, .schedule-day, .schedule-live, .schedule-live-item, .schedule-item) {
  background: var(--page-panel) !important;
}

html:root[data-site-surfaces][data-theme] #particleCanvas,
html:root[data-site-surfaces][data-theme] .mobile-store-card::before {
  display: none !important;
}

html:root[data-site-surfaces][data-theme] :is(.schedule-page, .schedule-app) {
  --sc-bg: var(--page-background) !important;
  --sc-card: var(--page-panel) !important;
}

html[data-site-surfaces] :is(.schedule-month, .schedule-day) {
  padding: clamp(10px, 2vw, 20px);
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-radius: 18px;
}

html[data-site-surfaces] .schedule-date.selected {
  box-shadow: inset 0 0 0 1px currentColor;
}

html:root[data-site-surfaces][data-theme] .content-refresh {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

html:root[data-site-surfaces][data-theme] .content-refresh:hover {
  background: rgba(128, 128, 128, .14);
}

html:root[data-site-surfaces][data-theme] .content-refresh:focus-visible {
  outline: 2px solid currentColor !important;
  outline-offset: 2px !important;
}

.content-refresh-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-refresh svg {
  width: 20px;
  height: 20px;
}

html[data-site-surfaces] .content-refresh[data-refresh-state="loading"] {
  opacity: .6;
  cursor: wait !important;
}

.content-refresh .refresh-check,
.content-refresh[data-refresh-state="complete"] .refresh-arrows {
  display: none;
}

.content-refresh[data-refresh-state="complete"] .refresh-check {
  display: inline;
}

.refresh-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .content-refresh[data-refresh-state="loading"] svg {
    animation: refresh-spin .8s linear infinite;
  }

  .content-refresh[data-refresh-state="complete"] .refresh-check {
    stroke-dasharray: 1;
    animation: refresh-draw .52s cubic-bezier(.38, .06, .45, 1) both;
  }
}

@keyframes refresh-spin {
  to { transform: rotate(360deg); }
}

@keyframes refresh-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
