.spark-theme-toggle {
    display: inline-grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
}

.spark-theme-icon {
    display: block;
    width: 21px;
    height: 21px;
    overflow: visible;
}

.spark-theme-disc, .spark-theme-rays {
    transform-box: view-box;
    transform-origin: center;
}

.spark-theme-mask-cutout { transform: translate(4px, -4px); }
.spark-theme-rays { opacity: 0; transform: rotate(-24deg) scale(.45); }
.dark .spark-theme-mask-cutout { transform: translate(17px, -17px); }
.dark .spark-theme-disc { transform: scale(.68); }
.dark .spark-theme-rays { opacity: 1; transform: none; }

.spark-theme-animate .spark-theme-mask-cutout,
.spark-theme-animate .spark-theme-disc {
    transition: transform .34s cubic-bezier(.23,.75,.25,1);
}

.spark-theme-animate .spark-theme-rays {
    transition: transform .34s cubic-bezier(.23,.75,.25,1), opacity .2s ease;
}

.dark.spark-theme-animate .spark-theme-rays { transition-delay: .06s; }

.spark-theme-toggle:focus-visible {
    outline: 2px solid var(--lg-focus, #2563eb);
    outline-offset: 2px;
}

@property --lg-page-fill {
    syntax: "<color>";
    inherits: true;
    initial-value: #f1f5f9;
}

@property --lg-content-fill {
    syntax: "<color>";
    inherits: true;
    initial-value: #f7f9fc;
}

@property --lg-input-fill {
    syntax: "<color>";
    inherits: true;
    initial-value: #fff;
}

@property --lg-secondary-fill {
    syntax: "<color>";
    inherits: true;
    initial-value: #eaf0f8;
}

@property --lg-header-fill {
    syntax: "<color>";
    inherits: true;
    initial-value: rgba(227, 238, 253, .61);
}

@property --lg-field-edge {
    syntax: "<color>";
    inherits: true;
    initial-value: rgba(87, 111, 150, .29);
}

@property --lg-ink {
    syntax: "<color>";
    inherits: true;
    initial-value: #10213c;
}

@property --lg-muted {
    syntax: "<color>";
    inherits: true;
    initial-value: #475569;
}

@property --lg-link {
    syntax: "<color>";
    inherits: true;
    initial-value: #1d4ed8;
}

.spark-theme-animate {
    transition: 200ms ease;
    transition-property: --lg-page-fill, --lg-content-fill, --lg-input-fill,
        --lg-secondary-fill, --lg-header-fill, --lg-field-edge, --lg-ink, --lg-muted, --lg-link;
}

.spark-theme-animate body { transition: none; }

@media (prefers-reduced-motion: reduce) {
    .spark-theme-animate,
    .spark-theme-animate :is(.spark-theme-mask-cutout, .spark-theme-disc, .spark-theme-rays) { transition: none; }
}
