<button class="btn btn-{{ variant }} btn-{{ size }} {% if attrs.class %}{{ attrs.class }}{% endif %}"
        {% if attrs.id %}id="{{ attrs.id }}"{% endif %}
        {% if attrs.onclick %}onclick="{{ attrs.onclick }}"{% endif %}
        {% if attrs.type %}type="{{ attrs.type }}"{% endif %}>
    {{ text }}
</button>

<style>
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: none;
    ring: 2px solid hsl(var(--ring));
    ring-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Sizes */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.btn-md {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5rem;
}

/* Variants */
.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    opacity: 0.8;
}

.btn-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
    opacity: 0.9;
}

.btn-ghost {
    background-color: transparent;
    color: hsl(var(--foreground));
}

.btn-ghost:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-link {
    background-color: transparent;
    color: hsl(var(--primary));
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-link:hover {
    text-decoration: none;
}
</style>