Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript
27.5 KB
Raw Blame
@import url('https://fonts.googleapis.com/css2?family=Jost&display=swap');

/* CSS Variables for theming */
:root {
  /* Dark theme (default) */
  --text-primary: white;
  --text-alternate: #dae2e6;
  --link-color: #d0d0d0;

  --bg-primary: #2b4353;
  --bg-alternate: #426074;
  --bg-tertiary: #7a97aa;

  --nav-background: #1c3445;
  --nav-active-item-bg: #4f6074;
  
  --button-primary-bg: rgb(78, 132, 225);
  --button-alternate-bg: rgba(78, 132, 225, 0.521);
  --button-shadow-color: rgba(40, 64, 140, 0.705);

  --current-step-indicator: rgb(20, 43, 59);

  --radio-button-group-bg: rgb(81, 114, 151);
  --radio-button-group-hover: rgb(37, 65, 97);

  --navigation-height: 40px;
  --icon-size: 20px;
  --navigation-icon-size: 30px;
}

/* Light theme */
[data-theme="light"] {
  --text-primary: #2c3e50;
  --text-alternate: #96a5ac;
  --link-color: #3b6081;

  --nav-background: #d9e5ee;
  --nav-active-item-bg: #b9d2d6;

  --bg-primary: #d5dde9;
  --bg-alternate: #c5dff0;
  --bg-tertiary: #a7c7e9;

  --button-primary-bg:  #73b6e2f8;
  --button-alternate-bg: rgb(176, 216, 240);
  --button-shadow-color: #70a3c5; 

  --current-step-indicator: rgb(169, 205, 214);

  --radio-button-group-bg: rgb(169, 193, 224);
  --radio-button-group-hover: rgb(221, 227, 241);
}

/* SVG inversion for light theme using body class */
body.light-theme img[src$=".svg"],
body.light-theme img[src$=".png"] {
  filter: invert(0.7);
}

img.ignore-filters {
    filter: none !important;
}

ul {
    padding: 0.5rem;
}

nav {
    width: 100vw;
    height: var(--navigation-height);
    background: var(--nav-background);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid grey;
    position: relative;
    z-index: 1;
}
nav a, nav span {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    height: var(--navigation-height);
    padding: 0 1.0rem;
    transition: 0.5s all ease;
    line-height: 100%;
}

nav .active-nav-item, nav a:hover {
    background: var(--nav-active-item-bg);
    text-decoration: none;
}


/* this was just a star (*) selector, but dark reader extension cannot parse that and crashes 
 It really just targets text related elements, so just use those instead
*/
html, body, li, p, div, span, label, input,
h1, h2, h3, h4, h5, h6, input, button, select {
    color: var(--text-primary);
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 400;
    display: inline-block;
}

/* the display rule above otherwise overrides the browser's [hidden] rule */
[hidden] {
    display: none !important;
}

div, p {
    display: block;
}

 a {
    color: var(--link-color);
    font-size: 80%;
 }
 a:hover {
    text-decoration: none;
 }

/* Icon toggle for show skeleton */
.icon-toggle label {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    color: #888;
    background: none;
    display: inline-flex;
    align-items: center;
}

.icon-toggle input[type="checkbox"]:checked + label,
.icon-toggle input[type="checkbox"] + label:hover {
    background: var(--button-primary-bg);
}
.icon-toggle input[type="checkbox"]:checked + label:hover {
    background: var(--button-alternate-bg);
}

#skeleton-toggle, #wireframe-toggle {
    padding: 0;
    margin: 0;
}



#skinned-step-tools
{
    flex-direction: column;
    row-gap: 1rem;
}

#animation-listing-count {
    color: var(--text-primary)
}

/* indicator on download buton with how many are selected */
#animation-selection-count {
    color: var(--text-primary);
    padding: 0.1rem .5rem;
    background-color: var(--bg-primary);
    border-radius: 50%;
    font-size: 80%;
}

hr {
    border:1px solid var(--bg-alternate);
    width: 100%;
    margin: 1rem 0rem;
}

li{
    display: list-item;
    line-height: 135%;
    color: var(--text-primary);
}

html {
    height: 100%;
}

body {
    background: var(--bg-primary);
    background: linear-gradient(180deg, var(--bg-primary) 41%, var(--bg-tertiary) 100%);
}

body.solid-background {
    background: var(--bg-primary);
}

#tool-selection-group {
    /* helps last element have breathing room when a scroll bar is present */
    margin-bottom: 2rem;
}

div {

    padding: 0.25rem;
}

input[type="number"] {
    padding: 0.5rem;
    border: 1px solid #878787;
    border-radius: 3px;
    background: var(--bg-primary);
    width: 40px;
}

input[type="text"] {
    width: 95%;
    padding: 0.5rem;
    background-color: var(--bg-primary);
    border: none;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
}
input[type="text"]::placeholder {
    color: var(--text-primary);
    opacity: 1; /* Firefox needs this to ensure full opacity */
    font-style: italic;;
}


/* used for animation play options */
button.secondary-button {
    background: linear-gradient(0deg, var(--bg-alternate) 0%, var(--bg-tertiary) 100%);
    box-shadow: 2px 2px 3px var(--button-shadow-color);
    border-radius: 3px;
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    transform: scale(1.00);
    display: inline-block;
    padding: 0.5em 1.5em;
    text-decoration: none;
    color: var(--text-primary);
}
button.secondary-button:hover,
a.secondary-button:hover {
    transform: scale(1.05);
    background: var(--bg-alternate);
}

button.secondary-button.play
{
    padding: 0;
    display: inline-flex;
    flex-grow: 1;
    align-items: center;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-right: 0;
    border: 1px solid var(--bg-tertiary);
    transform: scale(1.0);
    flex-grow: 0;
}
button.secondary-button.play:hover {
    border: 1px solid var(--text-primary);
    transition: all 0.4s ease;
    transform: scale(1.0);
}

/* icon-only bone picker in the weight painting step */
#weight-paint-step-pick-bone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
}

#weight-paint-step-pick-bone[aria-pressed="true"] {
    outline: 2px solid var(--button-primary-bg);
    outline-offset: 1px;
}

/* fixed-size, hairline brush outline shown while painting weights */
#weight-paint-brush-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
    z-index: 20;
}

.weight-paint-tools-heading {

    color: var(--text-secondary);
}

.weight-paint-bone-name {
    flex: 1;
    min-width: 0;
}

.weight-paint-slider-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weight-paint-slider-row label {
    flex: 0 0 auto;
}

.weight-paint-slider-row input[type="range"] {
    flex: 1;
    min-width: 0;
}

.weight-paint-slider-row span {
    width: 3.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.weight-paint-animation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.weight-paint-animation-button {
    background: var(--bg-alternate);
    color: var(--text-primary);
    border: 1px solid var(--bg-tertiary);
    border-radius: 0.25rem;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.weight-paint-animation-button:hover {
    border-color: var(--text-primary);
}

.weight-paint-animation-button.active {
    background: var(--button-primary-bg);
    border-color: var(--button-primary-bg);
}

button.no-style-button {
    background: none;
    box-shadow: none;
    border: none;
}
button.no-style-button:hover {
    background: var(--bg-primary);
}

/* text that acts like a link, but is really an action (e.g. opening a dialog) */
button.link-button {
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
    text-decoration: underline;
    opacity: 0.75;
    cursor: pointer;
}
button.link-button:hover {
    background: none;
    opacity: 1;
    transform: none;
}

.analyze-model-row {
    display: flex;
    justify-content: flex-end;
}

button, .button {
    background: var(--button-primary-bg);
    background: linear-gradient(180deg, var(--button-primary-bg) 0%, var(--button-alternate-bg) 100%);
    box-shadow: 3px 3px 2px var(--button-shadow-color);
    padding: 0.5rem 1.0rem;
    margin-right: 0.5rem;
    border: 1px solid var(--button-shadow-color);
    border-radius: 0.25rem;
    cursor: pointer;
    text-align: center; /* useful for custom file upload label */
    transition: all 0.1s ease;
    text-decoration: none;
    font-size: 1.0rem;
    color: var(--text-primary);
}
button:hover, .button:hover {
    /* background: var(--button-primary-bg);  */
    transform: scale(1.05);
}

button:active, .button:active {
    transform: scale(0.98);
}

button:disabled {
    background: var(--button-alternate-bg);
    opacity: 0.5;
    cursor: not-allowed;
    border: none;
}



.button-icon-group {
    display: flex;
    align-items: anchor-center;
    justify-content: center;
    column-gap: 6px;
}
.button-icon-group span{
    align-self: center;
}

.download-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.download-combo {
    display: inline-flex;
    align-items: center;
}

.download-combo #export-button,
.download-combo #export-retargeting-button,
.download-combo #export-composer-button {
    margin-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.download-settings-popup-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#download-settings-toggle.download-split-toggle {
    margin-right: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    min-width: 2.2rem;
    padding: 0.5rem 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.download-settings-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.35rem);
    z-index: 1000;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding: 1rem;
    min-width: 16rem;
    max-width: 19rem;
    border: 1px solid var(--bg-tertiary);
    border-radius: 6px;
    background: color-mix(in srgb, var(--bg-primary) 90%, black);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* light theme: white panel, selected options keep the normal text color */
[data-theme="light"] .download-settings-panel {
    background: white;
}

[data-theme="light"] .download-settings-panel .toggle input:checked + label {
    background-color: color-mix(in srgb, var(--radio-button-group-bg) 45%, white);
}

[data-theme="light"] .download-settings-panel .toggle input:checked + label,
[data-theme="light"] .download-settings-panel .toggle input:checked + label::before {
    color: var(--text-primary);
}

.download-settings-panel[hidden] {
    display: none;
}

.download-settings-header {
    align-self: flex-start;
    color: var(--text-primary);
    font-size: 1.2rem;
    white-space: pre; /* no line breaks */
}

.download-settings-label {
    color: var(--text-primary);
    font-size: 1.0rem;
    white-space: pre; /* no line breaks */
}

.options-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0;
}

.options-container[hidden] {
    display: none;
}

#download-bone-naming-group {
    gap: 0;
}

#download-bone-naming-group input + label {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
}

#download-fbx-preset-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

#download-fbx-preset-group input + label {
    justify-content: center;
    border: solid 2px var(--radio-button-group-bg);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.95rem;
}

#download-fbx-preset-group input + label:first-of-type,
#download-fbx-preset-group input + label:last-of-type {
    border: solid 2px var(--radio-button-group-bg);
    border-radius: 6px;
}


.transform-icons {
    width: 25px;
    height: 25px;
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--text-primary);
    cursor: pointer;
}

.transform-icons:hover {
    background: var(--bg-primary);
}

canvas {
    /* take up entire screen */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

select {
    padding: 0.5rem;
    background: var(--bg-alternate);
    border: 1px solid var(--text-alternate);
    border-radius: 4px;
    color: var(--text-primary);
}

option {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    border-radius: 0;
}

#current-step-label {
    font-size: 20px;
}

#load-model-tools, #load-skeleton-tools, #transform-controls, #skeleton-step-actions, #weight-paint-step-tools {
    display: flex;
    flex-direction: column;
    row-gap: 0.4rem;
}

#model-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    border: 2px dashed var(--text-alternate);
    border-radius: 8px;
    background: color-mix(in srgb, var(--bg-alternate) 60%, transparent);
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

#model-drop-zone:hover,
#model-drop-zone.drag-over {
    border-color: var(--button-primary-bg);
    background: var(--bg-alternate);
}

/* keep child elements from firing their own dragleave events while hovering over the zone */
#model-drop-zone.drag-over * {
    pointer-events: none;
}

#model-drop-zone {
    font-size: 1.15rem;
}

#model-drop-zone .model-drop-zone-subtext {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-primary);
}

#model-pose-instructions {
    background-color: var(--bg-alternate);
    border-left: 4px solid var(--button-primary-bg);
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;

    /* keep the panel at its normal width. the undo/redo buttons are positioned against it */
    max-width: 260px;
    box-sizing: border-box;
}

#model-pose-instructions p {
    margin: 0 0 0.5rem 0;
}

#model-pose-instructions .model-pose-instructions-heading {
    font-size: 1.1rem;
    cursor: pointer;
}

#model-pose-instructions[open] .model-pose-instructions-heading {
    margin-bottom: 0.5rem;
}

#model-pose-instructions ol {
    margin: 0;
    padding-left: 1.25rem;
}

#model-pose-instructions li {
    display: list-item;
    margin-bottom: 0.25rem;
}

#tool-panel {
    position: fixed;
    height: fit-content;

    background: var(--bg-tertiary);
    background: radial-gradient(circle, var(--bg-alternate) 0%, var(--bg-primary) 100%);

    box-shadow: 1px 1px 8px 0px var(--bg-primary);
    top: var(--navigation-height);
    right: 0;
    border-left: 1px solid var(--bg-tertiary);
    padding: 0.5rem;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

#animations-listing {
    display: flex;
    flex-direction: column;
    width: 100%;
}


  
  /* Track */
  ::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
  }
  
  /* Handle */
  ::-webkit-scrollbar-thumb {
    background: var(--bg-alternate);
    border-radius: 4px;
  }
  
  /* Handle on hover */
  ::-webkit-scrollbar-thumb:hover {
    background: var(--bg-primary);
  }

#toggle-select-all-container {
    display: flex; 
    gap: 1rem; 
    align-items: center; 
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

/* keep the tag button next to the Select All button instead of centered */
#animation-tag-filter-button {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5em 0.8em;
}

/* outline the tag button while a tag filter is applied */
#animation-tag-filter-button.active {
    outline: 1px solid var(--text-primary);
}

#animation-tag-filter-count {
    font-size: 0.9rem;
    line-height: 1;
}


#animations-items{
    max-height: calc(100vh - 22rem);
    max-height: calc(100dvh - 22rem); /* dvh accounts for iPad/iOS browser toolbars; 100vh line above is the fallback */
    display: inline-flex;
    overflow: auto;;
    flex-direction: row;
    margin-bottom: 1rem;
    background: var(--bg-alternate);
    border: 1px solid var(--bg-tertiary);
    gap: 0.25rem;
    flex-wrap: wrap;
    overflow-x: hidden;
    width: 24rem;
}

#animations-items.create-page {
    /* create page has a tile at the top so we need this listing grid slightly smaller */
     max-height: calc(100vh - 30rem);
     max-height: calc(100dvh - 30rem); /* dvh accounts for iPad/iOS browser toolbars; 100vh line above is the fallback */
}

#animations-items div {
    display: flex;
    padding: 0;
}
/* have every other div child be a different background color */
#animations-items > div:nth-child(odd) {
    background: var(--bg-alternate);
}




.anim-item, .anim-custom-item {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    position: relative;

    transition: box-shadow 0.2s ease-in-out;

    width: 103px;
    height: 160px;
}

.anim-custom-item {
    background: var(--bg-primary);
    border: 1px solid var(--bg-tertiary);
}


.anim-preview-label {
    font-size: 88%;
    cursor: pointer;
    line-height: 120%;
    text-align: left;
}

.anim-play-button {
    margin-right: 0;
    padding: 0;
    display: inline-flex;
    flex-grow: 1;
    align-items: center;
    flex-direction: column;
    border-radius: 0;
    border: none;
    box-shadow: none;
    width: 100%;
    height: 100%;
    transform: scale(1.0);
}

.anim-play-button .anim-preview-placeholder,
.anim-play-button .anim-preview {
    width: 100px;
    height: 120px;
    margin: 0;
    border-radius: 0;
    background: var(--bg-primary);
    object-fit: cover;
    pointer-events: none;
}

.anim-row-checkbox {
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    width: 100px;
    align-self: center;
    z-index: 2;
}

.anim-row-checkbox .anim-preview-label {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
}

.anim-mirror-segmented {
    display: none;
}

.anim-mirror-mode-toggle {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 35px;
    height: 35px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.2s ease, border-color 0.2s ease;
    opacity: 1.0;
}


.anim-mirror-mode-toggle .action-icon {
    width: 25px;
    height: 25px;
}

.anim-item[data-selected="false"] .anim-mirror-mode-toggle,
.anim-custom-item[data-selected="false"] .anim-mirror-mode-toggle {
    display: none;
}

.anim-item[data-mirror-mode="none"] .anim-mirror-mode-toggle,
.anim-custom-item[data-mirror-mode="none"] .anim-mirror-mode-toggle {
    border-color: var(--bg-tertiary);
    opacity: 0.3;
}

.anim-item[data-mirror-mode="none"] .anim-mirror-mode-toggle .action-icon,
.anim-custom-item[data-mirror-mode="none"] .anim-mirror-mode-toggle .action-icon {
    filter: grayscale(1);
}

.anim-item[data-mirror-mode="mirrored"] .anim-mirror-mode-toggle,
.anim-custom-item[data-mirror-mode="mirrored"] .anim-mirror-mode-toggle {
    opacity: 1.0;
}



@media (max-width: 980px) {
    #animations-items {
        width: 100%;
    }
}


input[type="file"] {
    display: none;
}

#github-logo {
    transition: opacity 0.5s ease-in-out;
    text-decoration: none;
    padding: 0.5rem;
}
#github-logo:hover {
    opacity: 0.6;
}

#github-logo img {
    width: 50px;
    height: auto;
}


/* Dropdown Button */

  /* The container <div> - needed to position the dropdown content */
  .dropdown {
    position: relative;
    display: inline-block;
  }
  
  /* Dropdown Content (Hidden by Default) */
  .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-tertiary);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
  }
  
  /* Links inside the dropdown */
  .dropdown-content a {
    color: var(--text-primary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
  }
  
  /* Change color of dropdown links on hover */
  .dropdown-content a:hover {background-color: var(--text-primary)}
  
  /* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
  .show {display:block;}

#header-ui {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    position: fixed;
    left: 5px;
    bottom: 140px;
}

.step-instructions {
    max-width: 220px;
}

/* tooltip styles (tippy) */
.tippy-box[data-theme~='mesh2motion'] {
  background-color: var(--bg-primary); /* container background */
  color: var(--text-primary);              /* text color */
  box-shadow: 3px 3px 6px #1420276b;
  padding: 0.5rem;
}

/* style checkbox */
.styled-checkbox {
    display: flex;
    align-items: center;
    align-self: start; /* left justify */
    gap: 0.2rem; /* Space between checkbox and label */
    margin-bottom: 0.4rem;
    margin-top: 0.4rem;
}

.styled-checkbox input[type="checkbox"] {
    width: 20px; /* Increase checkbox size */
    height: 20px;
    cursor: pointer;
}

.styled-checkbox label {
    cursor: pointer; /* Make the label clickable */
    padding: 0.2rem 0.5rem; /* Add padding for a larger clickable area */
    font-size: 1rem; /* Adjust font size for better readability */
}

.pill-switch-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin: 0.4rem 0;
}

.pill-switch-label {
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 0;
}

.pill-switch {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-alternate);
    padding: 0.2rem;
    gap: 0.2rem;
}

.pill-switch input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pill-switch label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    user-select: none;
}

.pill-switch label:hover {
    background: color-mix(in srgb, var(--bg-tertiary) 80%, transparent);
}

.pill-switch input[type="radio"]:checked + label {
    background: var(--button-primary-bg);
}

/* selected bone overlay banner shown over the 3D viewport */
#selected-bone-overlay {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 0;
    right: 300px; /* keep clear of the tool panel */
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

#selected-bone-overlay .selected-bone-overlay-chip {
    display: flex;
    flex-direction: column;
    text-align: center;
    background: var(--bg-alternate);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: normal;
    padding: 0.5rem 1.25rem;
}

#selected-bone-overlay .selected-bone-overlay-label {
    font-size: 70%;
    color: var(--text-primary);
    margin:0;
    padding:0;
}

#selected-bone-overlay #selected-bone-overlay-text {
    font-size: 1.5rem;
}

.alternate-background-section {
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
    background-color: var(--bg-alternate); 
    padding: 1rem;
}


/* Theme toggle button styles */
#theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    width: 100%;
}

#theme-toggle:hover {
    background: var(--bg-alternate);
}

#theme-toggle .theme-icon {
    font-size: 30px;
    transition: transform 0.2s ease;
    padding: 0;
}

#theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}

/* this is a weird view helper three.js thing
   This helps place the view helper in the 3D scene by using a div
   The event listener for the click events latches onto this
*/
#view-control-hitbox {
    height: 120px;
    width: 120px;
    position: absolute;
    bottom: 0px;
    left: 0;
}

div.modal-dialog-body p.survey-thank-you {
    margin-bottom: 0;
    font-size: 120%;
}

#animations-items .no-animations-message,
.request-animation-link {
    padding: 0.5rem;
    font-style: italic;
    font-size: 100%;
    align-items: center;
}
.request-animation-link {
    color: var(--text-primary);
}

/* tile at the end of filtered results to request an animation */
#animations-items .anim-request-tile {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    width: 103px;
    height: 160px;
    padding: 0.5rem;
    box-sizing: border-box;
    border-width: 1px;
    text-align: center;
    text-decoration: none;
    font-style: normal;
    font-size: 85%;
    line-height: 120%;
}

#animations-items .anim-request-tile:hover {
    border-color: var(--text-primary);
    border: 1px dashed var(--bg-tertiary);
}

.anim-request-tile-icon {
    font-size: 200%;
    line-height: 100%;
}

.anim-request-tile-action {
    text-decoration: underline;
}
.anim-request-tile-action:hover {
    text-decoration: none;
}

#build-version {
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    color: var(--text-primary);
}

/* loading progress bar for animations */
#animation-progress-loader-container {
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    margin-bottom: 1rem;
}
#animation-progress-loader-container #loading-progress-bar {
    width: 0%;
    height: 8px;
    background-color: var(--button-primary-bg);
    transition: width 0.3s ease;
    justify-content: center;
    display: flex;
    height: auto;
    border: 1px solid grey;
}
#animation-progress-loader-container #current-file-progress-bar {
    width: 0%;
    height: 4px;
    background-color: var(--button-alternate-bg);
    transition: width 0.3s ease;
    margin-top: 2px;
    border: 1px solid grey;
}
#animation-progress-loader-container #loading-status-text {
    font-size: 1.1rem;
    color: var(--text-primary);     
}

.anim-custom-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    border-radius: 3rem;
    background: var(--button-alternate-bg);
    color: #ffffff;
    font-size: 0.9rem;
    pointer-events: none;
    padding: 0.5rem 1rem;
}

.action-icon {
    width: var(--icon-size);
    height: var(--icon-size);
}

.nav-icon {
    width: var(--navigation-icon-size);
    height: var(--navigation-icon-size);
}

#nav-support-mesh2motion {
    font-size: 1.5rem;
}


/* Skeleton Template Image Styles */
.skeleton-template-image-clickable {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  cursor: pointer;
  transition: border 0.2s ease;
  border: 2px solid transparent;
  border-radius: 4px;
}

.skeleton-template-image-clickable:hover {
  border: 2px solid var(--text-alternate);
}

.skeleton-template-image-preview {
    border-radius: 4px;
    padding: 4px;
}

/* custom message for our desktop application since we will
   be hiding most of the post-download stuff */
.download-success-desktop {
    display: none;
}