devonthesofa_obsidian-note-.../styles/components/status-button.css
2025-07-16 19:18:48 +02:00

146 lines
3 KiB
CSS

/* Status Button Component - BEM Pattern */
.status-btn {
display: inline-flex;
align-items: center;
gap: var(--size-2-1);
padding: var(--size-2-2) var(--size-2-3);
border: 1px solid var(--background-modifier-border);
border-radius: var(--radius-s);
background: var(--interactive-normal);
color: var(--text-normal);
cursor: pointer;
transition: all var(--anim-duration-fast) ease;
font-size: var(--font-ui-medium);
font-weight: var(--font-weight-medium);
text-decoration: none;
white-space: nowrap;
}
.status-btn:hover {
background: var(--interactive-hover);
transform: translateY(-1px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.status-btn:active {
background: var(--interactive-active);
transform: translateY(0);
}
.status-btn--primary {
background: var(--interactive-accent);
color: var(--text-on-accent);
border-color: var(--interactive-accent);
}
.status-btn--primary:hover {
background: var(--interactive-accent-hover);
border-color: var(--interactive-accent-hover);
}
.status-btn--primary:active {
background: var(--interactive-accent-active);
border-color: var(--interactive-accent-active);
}
.status-btn--secondary {
background: var(--background-secondary);
border-color: var(--background-modifier-border-hover);
}
.status-btn--secondary:hover {
background: var(--background-modifier-hover);
border-color: var(--interactive-accent);
}
.status-btn--danger {
background: var(--background-modifier-error);
color: var(--text-error);
border-color: var(--background-modifier-error);
}
.status-btn--danger:hover {
background: var(--background-modifier-error-hover);
border-color: var(--text-error);
}
.status-btn--small {
padding: var(--size-2-1) var(--size-2-2);
font-size: var(--font-ui-small);
min-height: 24px;
}
.status-btn--large {
padding: var(--size-2-3) var(--size-4-2);
font-size: var(--font-ui-large);
min-height: 40px;
}
.status-btn--full-width {
width: 100%;
justify-content: center;
}
.status-btn--disabled {
opacity: 0.6;
cursor: not-allowed;
pointer-events: none;
}
.status-btn--loading {
position: relative;
color: transparent;
}
.status-btn--loading::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 16px;
height: 16px;
margin: -8px 0 0 -8px;
border: 2px solid currentColor;
border-radius: 50%;
border-top-color: transparent;
animation: statusBtnSpin 1s linear infinite;
}
.status-btn__icon {
font-size: 1em;
line-height: 1;
transition: transform var(--anim-duration-fast) ease;
}
.status-btn:hover .status-btn__icon {
transform: scale(1.1);
}
.status-btn__text {
line-height: 1.2;
}
.status-btn__badge {
background: var(--background-modifier-active);
color: var(--text-muted);
font-size: var(--font-ui-smaller);
font-weight: var(--font-weight-semibold);
padding: 1px var(--size-2-1);
border-radius: var(--radius-s);
min-width: 16px;
text-align: center;
}
.status-btn--primary .status-btn__badge {
background: rgba(255, 255, 255, 0.2);
color: var(--text-on-accent);
}
@keyframes statusBtnSpin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}