/* ============================================================================
   Soft-conversion cluster — Save · Pin to trip · (Going hidden)
   INK-DEV-EVENT-DETAIL-LAYOUT-v3 W3 (revised 2026-05-13 — visual polish pass)
   Behaviour: ghost-button on idle, gold-accent border + icon-fill on hover,
   filled gold with subtle inner shadow on active. Count pill animates in
   when ≥ 3. Press feedback via scale + transition timing.
   ============================================================================ */

.ep-soft {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2, 0.5rem);
    margin-top: var(--space-3, 0.75rem);
}

.ep-soft__btn {
    --soft-bg:        transparent;
    --soft-border:    var(--color-border, rgba(255,255,255,0.18));
    --soft-fg:        var(--color-text, inherit);
    --soft-icon:      var(--text-secondary, currentColor);
    --soft-icon-fill: transparent;
    --soft-shadow:    0 0 0 0 transparent;

    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 0.5rem);
    padding: 0.625rem 1rem;
    min-height: 44px;
    background: var(--soft-bg);
    border: 1px solid var(--soft-border);
    border-radius: var(--radius-md, 8px);
    color: var(--soft-fg);
    font-family: var(--font-ui, system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    -webkit-user-select: none;
            user-select: none;
    box-shadow: var(--soft-shadow);
    transition:
        background-color 200ms cubic-bezier(0.4, 0, 0.2, 1),
        border-color    200ms cubic-bezier(0.4, 0, 0.2, 1),
        color           200ms cubic-bezier(0.4, 0, 0.2, 1),
        transform       180ms cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow      240ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* SVG icon inherits the variable, animates fill on state change */
.ep-soft__btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--soft-icon);
    fill: var(--soft-icon-fill);
    transition: stroke 200ms ease, fill 200ms ease, transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover — gold border, slight lift, icon-stroke turns gold */
.ep-soft__btn:hover {
    --soft-border: var(--color-brand-accent, #c9a86a);
    --soft-icon:   var(--color-brand-accent, #c9a86a);
    --soft-shadow: 0 4px 12px rgba(201, 168, 106, 0.12);
    transform: translateY(-1px);
}

/* Focus-visible — same gold ring but keyboard-only */
.ep-soft__btn:focus-visible {
    outline: none;
    --soft-border: var(--color-brand-accent, #c9a86a);
    --soft-shadow: 0 0 0 3px rgba(201, 168, 106, 0.32);
}

/* Press — squish back down */
.ep-soft__btn:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 80ms;
}

/* Active state (toggled on via JS — aria-pressed=true / .is-active) */
.ep-soft__btn.is-active,
.ep-soft__btn[aria-pressed="true"] {
    --soft-bg:        var(--color-brand-accent, #c9a86a);
    --soft-border:    var(--color-brand-accent, #c9a86a);
    --soft-fg:        var(--color-brand-ink, #0d0c0a);
    --soft-icon:      var(--color-brand-ink, #0d0c0a);
    --soft-icon-fill: var(--color-brand-ink, #0d0c0a);
    --soft-shadow:    inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(201, 168, 106, 0.28);
    font-weight: 600;
}

.ep-soft__btn.is-active svg,
.ep-soft__btn[aria-pressed="true"] svg {
    transform: scale(1.08);
}

/* Count pill — chip-shaped, animates in when content present */
.ep-soft__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.25rem;
    padding: 0 0.4rem;
    margin-left: 0.125rem;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 200ms ease, transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ep-soft__count:not([hidden]) {
    opacity: 1;
    transform: scale(1);
}

.ep-soft__btn.is-active .ep-soft__count {
    background: rgba(0, 0, 0, 0.22);
    color: var(--color-brand-ink, #0d0c0a);
}

/* Mobile — keep labels visible by default; collapse only below ~360px */
@media (max-width: 359px) {
    .ep-soft__btn {
        padding: 0.5rem 0.75rem;
    }
    .ep-soft__btn .ep-soft__label {
        display: none;
    }
}

/* Light theme adjustment — softer ghost border in light surfaces */
:root[data-theme="light"] .ep-soft__btn {
    --soft-border: rgba(0, 0, 0, 0.14);
    --soft-icon:   var(--text-secondary, rgba(0, 0, 0, 0.62));
}
:root[data-theme="light"] .ep-soft__btn:hover {
    --soft-shadow: 0 4px 12px rgba(201, 168, 106, 0.18);
}
:root[data-theme="light"] .ep-soft__count {
    background: rgba(0, 0, 0, 0.08);
}

/* Sticky-mobile context — soft cluster reused in sticky CTA; keep compact */
.ep-sticky .ep-soft__btn {
    padding: 0.5rem 0.75rem;
    min-height: 40px;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .ep-soft__btn,
    .ep-soft__btn svg,
    .ep-soft__count {
        transition: none;
    }
    .ep-soft__btn:hover {
        transform: none;
    }
}
