/* ============================================================
   .uk-cost-card — proposed canonical "cost of downtime" card (loaded only on /docs/ui-kit)
   ============================================================
   Replaces the downtime-costs section's card pattern in `public/css/style.css`:

     .cost-card                    -> .uk-cost-card
     .cost-card::before            -> .uk-cost-card::before        (gradient top accent bar)
     .cost-card:hover              -> warning-tinted lift + shadow
     .cost-icon                    -> .uk-cost-card-icon           (composes with .uk-icon-box)
     .cost-card h3                 -> .uk-cost-card-title
     .cost-card p                  -> .uk-cost-card-body
     .cost-card p strong           -> .uk-cost-card-body strong    (bumped to text colour)

   The signature feature is the 3-px gradient top accent bar (error →
   warning) — that's what makes a "cost-of-downtime" card visually
   distinct from a generic info card. Different from `.uk-card`
   (cards.css) and `.feature-card` because of that gradient bar +
   warning-tone hover treatment.

   This canonical owns only the card. Tile inside `.uk-grid-cards --4-col`
   or any host grid (4 cards across at desktop is the production rhythm).

   Composes with: nothing strict — but expects a leading `.uk-icon-box`
   (warning tone) inside `.uk-cost-card-icon` slot. The icon-box layout
   is delegated to uk-icon-box so the icon chrome stays consistent
   with the rest of the site.
   ============================================================ */

/* ============================================
   Root — card with gradient top bar
   ============================================
   `position: relative` + `overflow: hidden` so the ::before bar clips
   into the rounded corners. Hover pulls border to error-tinted +
   adds a soft warning-coloured shadow.
   ============================================ */
.uk-cost-card {
    position: relative;
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition:
        transform var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

.uk-cost-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--color-error) 0%,
        var(--color-warning) 100%
    );
    opacity: 0.6;
}

.uk-cost-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--color-error-rgb), 0.4);
    box-shadow: 0 8px 32px rgba(var(--color-error-rgb), 0.08);
}

@media (prefers-reduced-motion: reduce) {
    .uk-cost-card:hover {
        transform: none;
    }
}

/* ============================================
   Icon slot — composes with .uk-icon-box (warning tone)
   ============================================
   The icon slot is just a margin-bearing wrapper. Drop an
   `.uk-icon-box uk-icon-box--md uk-icon-box--accent` (or build a
   `--warning` tone modifier in uk-icon-box at Tier 7 if needed)
   inside it.
   ============================================ */
.uk-cost-card-icon {
    margin-bottom: var(--space-lg);
}

/* ============================================
   Title + body
   ============================================ */
.uk-cost-card-title {
    margin: 0 0 var(--space-sm);
    color: var(--color-text);
    font-size: var(--font-lg);
    font-weight: 600;
    line-height: var(--line-snug);
}

.uk-cost-card-body {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-md);
    line-height: var(--line-relaxed);
}

.uk-cost-card-body strong {
    color: var(--color-text);
    font-weight: 600;
}

/* ============================================
   Tone variants — recolour the top bar + hover halo
   ============================================
   Default is the error→warning "cost of downtime" gradient. These tone
   variants let the same card chrome carry different stories:
   `--gain` flips to a success→primary gradient (for "cost of NOT
   monitoring → savings from monitoring" framings); `--neutral` drops
   the bar to the muted border colour for general informational stat
   cards that want the same chrome.
   ============================================ */
.uk-cost-card--gain::before {
    background: linear-gradient(
        90deg,
        var(--color-success) 0%,
        var(--color-primary) 100%
    );
}

.uk-cost-card--gain:hover {
    border-color: rgba(var(--color-success-rgb), 0.4);
    box-shadow: 0 8px 32px rgba(var(--color-success-rgb), 0.08);
}

.uk-cost-card--neutral::before {
    background: var(--color-border);
    opacity: 1;
}

.uk-cost-card--neutral:hover {
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-card-hover-sm);
}
