/* Shared presentation for Afterrun and Monthy. Their action handlers stay in each tool. */
:is(.athleteShell,.monthyShell) :is(.routeAddFieldBtn,.metricAddBtn){
background:transparent;
color:var(--muted-strong);
}

:is(.athleteShell,.monthyShell) :is(#downloadChartBtn,.monthyActionBtn:last-child){
border-color:var(--text);
background:var(--text);
color:var(--bg);
}

:is(.athleteShell,.monthyShell) .toolActionButton:hover:not(:disabled){
border-color:var(--border-strong);
background:var(--button-bg-hover);
color:var(--text);
box-shadow:var(--shadow-card);
transform:translateY(-1px);
}

:is(.athleteShell,.monthyShell) :is(#downloadChartBtn,.monthyActionBtn:last-child):is(:hover,:focus-visible):not(:disabled){
border-color:var(--text-soft);
background:var(--text-soft);
color:var(--bg-deep);
}

:is(.athleteShell,.monthyShell) .toolActionButton:active:not(:disabled){
transform:translateY(1px);
}

:is(.athleteShell,.monthyShell) .toolActionButton:disabled{
opacity:.48;
cursor:not-allowed;
box-shadow:none;
transform:none;
}

:is(.athleteShell,.monthyShell) :is(.routeRemoveFieldBtn,.metricRemoveBtn){
display:flex;
align-items:center;
justify-content:center;
min-width:44px;
min-height:44px;
margin:0;
padding:0;
border:0;
border-radius:var(--radius-sm);
background:var(--button-bg);
color:var(--button-text);
font-family:var(--font-mono);
font-size:1.1rem;
line-height:1;
cursor:pointer;
transition:background .18s ease,color .18s ease,transform .18s ease;
}

:is(.athleteShell,.monthyShell) :is(.routeSlotItem,.metricSlot):not(.isSingle){
grid-template-columns:minmax(0,1fr) 44px;
}

:is(.athleteShell,.monthyShell) :is(.routeRemoveFieldBtn,.metricRemoveBtn):is(:hover,:focus-visible):not(:disabled){
background:var(--danger-soft);
color:var(--danger);
transform:translateY(-1px);
}

:is(.athleteShell,.monthyShell) :is(.routeRemoveFieldBtn,.metricRemoveBtn):disabled{
opacity:.48;
cursor:not-allowed;
transform:none;
}

:is(.athleteShell,.monthyShell) :is(.btnRefreshActivity,.btnDisconnect):is(:hover,:focus-visible):not(:disabled){
background:var(--button-bg-hover);
color:var(--primary);
box-shadow:var(--shadow-card);
}

:is(.athleteShell,.monthyShell) :is(.toolActionButton,.btnRefreshActivity,.btnDisconnect):focus-visible:not(:disabled){
outline:2px solid var(--border-accent);
outline-offset:2px;
box-shadow:var(--shadow-focus);
}

:is(.athleteShell,.monthyShell) :is(.btnRefreshActivity,.btnDisconnect):disabled{
background:var(--button-bg);
color:var(--button-text);
opacity:.6;
cursor:default;
box-shadow:none;
transform:none;
}

:is(.athleteShell,.monthyShell) .btnRefreshActivity.isRefreshing svg,
.monthyShell .monthyPreviewSpinner{
animation:posterToolSpin .8s linear infinite;
}

:is(.athleteShell,.monthyShell) :is(.afterrunContentEnter,.monthyContentEnter,.routeMinimalImage){
animation:posterToolContentEnter .18s ease-out both;
}

@keyframes posterToolSpin{
to{transform:rotate(360deg)}
}

@keyframes posterToolContentEnter{
from{opacity:0}
to{opacity:1}
}

@media (prefers-reduced-motion:reduce){
:is(.athleteShell,.monthyShell) :is(.btnRefreshActivity.isRefreshing svg,.monthyPreviewSpinner,.afterrunContentEnter,.monthyContentEnter,.routeMinimalImage){
animation:none;
}
:is(.athleteShell,.monthyShell) :is(.toolActionButton,.btnRefreshActivity,.btnDisconnect,.routeRemoveFieldBtn,.metricRemoveBtn){
transition:none;
}
}
