button, .button { @apply relative inline-flex items-center cursor-pointer gap-2 rounded-md h-11 px-4 text-lg font-medium; transition: background-color 125ms ease-in-out; --button-border: var(--color-primary); --button-accent: var(--color-primary-hover); &.button--primary { @apply bg-cyan-400 border-md border-solid; border-color: var(--button-border); box-shadow: 2.5px 2.5px 0 0 var(--button-border); &:hover { @apply bg-cyan-500; border-color: var(--button-accent); } &:focus { box-shadow: none; left: 2.5px; top: 2.5px; } } &.button--icon { @apply justify-center p-0 h-12 top-px rounded-blob; aspect-ratio: 1 / 1; &:hover { background-color: rgba(0,0,0,0.075); } } &.button--sm { @apply text-base px-2 h-8; } } /* button groups are used with labels/checks as well as regular buttons */ .button-group { @apply relative flex flex-row items-center p-0 m-0 h-11 max-h-11 rounded-md; box-shadow: 2.5px 2.5px 0 0 var(--color-primary); > label, > button { @apply relative flex items-center justify-center h-full pl-3.5 pr-3 cursor-pointer; @apply border-md border-primary border-l-0 font-medium rounded-none; transition: background-color 100ms ease-in-out; &:hover { @apply bg-cyan-200; } &:has(input:checked), &:active { @apply bg-cyan-400 border-r-transparent; box-shadow: inset 2.5px 0 0 0 var(--color-primary), inset 0 0.25rem 0 0 var(--color-cyan-500); top: 2.5px; + label, + button { box-shadow: inset 1.5px 0 0 0 var(--color-primary); } &:hover { @apply bg-cyan-500; } } &:first-child { @apply rounded-l-md border-l-md; &:has(input:checked), &:active { box-shadow: inset 0 0.25rem 0 0 var(--color-cyan-500); } } &:last-child { @apply border-r-md rounded-r-md; &:has(input:checked), &:active { @apply border-r-primary; } } } > label { > input[type="radio"] { @apply hidden absolute top-0 left-0 w-0 h-0 max-w-0 max-h-0; } } &:has(> :last-child input:checked), &:has(> :last-child:active) { box-shadow: 1.5px 4.5px 0 -2px var(--color-primary); } }