/* ============================================================
 * Event Activity Pulse
 * Flippy's field report — compact activity feed for event pages.
 * Avatar sits inside the header; single-card layout that works
 * inside overflow-hidden parent containers.
 * ============================================================ */

/* --- Container ------------------------------------------------ */

.event-activity-pulse {
    background: var(--theme-surface-1, var(--surface-1, #ffffff));
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.1));
    border-radius: 12px;
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}

.event-activity-pulse:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

/* --- Header (avatar + title + chat link) --------------------- */

.event-activity-pulse__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.06));
    background: linear-gradient(
        135deg,
        rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.04),
        transparent 60%
    );
}

/* Flippy avatar in header */

.event-activity-pulse__avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.event-activity-pulse__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.event-activity-pulse:hover .event-activity-pulse__avatar {
    transform: scale(1.06) rotate(-4deg);
    border-color: rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.6);
}

.event-activity-pulse__avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--flipt-primary, #00a69c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Title area */

.event-activity-pulse__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.event-activity-pulse__title-text {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--theme-text-primary, #1a1a2e);
    letter-spacing: -0.01em;
}

.event-activity-pulse__count {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.1);
    color: var(--flipt-primary, #00a69c);
    white-space: nowrap;
}

/* Header chat shortcut */

.event-activity-pulse__chat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--flipt-secondary, var(--theme-primary, #0068ba));
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.event-activity-pulse__chat-link:hover {
    background: rgba(var(--flipt-secondary-rgb, 0, 104, 186), 0.08);
    color: var(--flipt-secondary, var(--theme-primary, #0068ba));
    text-decoration: none;
}

.event-activity-pulse__chat-link:focus-visible {
    outline: 2px solid var(--theme-info, #3b82f6);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.event-activity-pulse__chat-arrow {
    font-size: 0.6rem;
    transition: transform 0.15s ease;
}

.event-activity-pulse__chat-link:hover .event-activity-pulse__chat-arrow {
    transform: translateX(2px);
}

/* --- Activity list ------------------------------------------- */

.event-activity-pulse__list {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
}

.event-activity-pulse__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    transition: background 0.15s ease;
}

.event-activity-pulse__item:hover {
    background: rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.03);
}

/* Activity-type icon badges */

.event-activity-pulse__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.6rem;
    margin-top: 0.1rem;
}

.event-activity-pulse__item--registered .event-activity-pulse__icon {
    background: rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.12);
    color: var(--theme-success, #10b981);
}

.event-activity-pulse__item--cancelled .event-activity-pulse__icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--theme-danger, #ef4444);
}

.event-activity-pulse__item--moved .event-activity-pulse__icon {
    background: rgba(var(--flipt-secondary-rgb, 0, 104, 186), 0.1);
    color: var(--theme-info, #3b82f6);
}

/* Activity text */

.event-activity-pulse__text {
    flex: 1;
    min-width: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--theme-text-primary, #1a1a2e);
}

.event-activity-pulse__text strong {
    font-weight: 700;
    color: var(--theme-text-secondary, #374151);
}

.event-activity-pulse__flippy {
    font-style: italic;
    color: var(--theme-text-primary, #1a1a2e);
}

.event-activity-pulse__tee-time {
    display: inline;
    margin-left: 0.125rem;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--theme-text-secondary, #4b5563);
}

.event-activity-pulse__tee-time::before {
    content: "\00b7";
    margin: 0 0.25rem;
    font-weight: 400;
}

/* Timestamp */

.event-activity-pulse__time {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--theme-text-muted, #6b7280);
    white-space: nowrap;
    margin-top: 0.125rem;
}

/* --- CTA footer ---------------------------------------------- */

.event-activity-pulse__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    background: linear-gradient(
        135deg,
        rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.06),
        rgba(var(--flipt-secondary-rgb, 0, 104, 186), 0.04)
    );
    border-top: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.06));
    text-decoration: none;
    transition: background 0.2s ease;
}

.event-activity-pulse__cta:hover {
    background: linear-gradient(
        135deg,
        rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.12),
        rgba(var(--flipt-secondary-rgb, 0, 104, 186), 0.08)
    );
    text-decoration: none;
}

.event-activity-pulse__cta:focus-visible {
    outline: 2px solid var(--theme-info, #3b82f6);
    outline-offset: -2px;
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.event-activity-pulse__cta-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--flipt-primary, #00a69c);
}

.event-activity-pulse__cta-text i {
    font-size: 0.875rem;
}

.event-activity-pulse__cta-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.1);
    color: var(--flipt-primary, #00a69c);
    font-size: 0.625rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.event-activity-pulse__cta:hover .event-activity-pulse__cta-arrow {
    transform: translateX(3px);
    background: rgba(var(--flipt-primary-rgb, 0, 166, 156), 0.18);
}

/* --- Entrance animation -------------------------------------- */

@keyframes pulse-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-activity-pulse {
    animation: pulse-fade-in 0.3s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .event-activity-pulse {
        animation: none;
    }
}

/* --- Dark mode ----------------------------------------------- */

[data-bs-theme="dark"] .event-activity-pulse {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] .event-activity-pulse:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .event-activity-pulse__avatar {
    border-color: rgba(var(--flipt-primary-rgb, 0, 184, 169), 0.4);
}

[data-bs-theme="dark"] .event-activity-pulse__count {
    background: rgba(var(--flipt-primary-rgb, 0, 184, 169), 0.15);
}

[data-bs-theme="dark"] .event-activity-pulse__cta {
    background: linear-gradient(
        135deg,
        rgba(var(--flipt-primary-rgb, 0, 184, 169), 0.08),
        rgba(var(--flipt-secondary-rgb, 30, 123, 201), 0.06)
    );
}

[data-bs-theme="dark"] .event-activity-pulse__cta:hover {
    background: linear-gradient(
        135deg,
        rgba(var(--flipt-primary-rgb, 0, 184, 169), 0.16),
        rgba(var(--flipt-secondary-rgb, 30, 123, 201), 0.1)
    );
}

/* --- Responsive ---------------------------------------------- */

@media (max-width: 576px) {
    .event-activity-pulse {
        margin: 1rem 0;
        border-radius: 10px;
    }

    .event-activity-pulse__header {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    .event-activity-pulse__avatar-wrap {
        width: 32px;
        height: 32px;
    }

    .event-activity-pulse__avatar {
        width: 32px;
        height: 32px;
    }

    .event-activity-pulse__avatar-badge {
        width: 14px;
        height: 14px;
        font-size: 0.35rem;
    }

    .event-activity-pulse__title-text {
        font-size: 0.8rem;
    }

    .event-activity-pulse__chat-link span {
        display: none;
    }

    .event-activity-pulse__item {
        padding: 0.35rem 0.75rem;
        gap: 0.375rem;
    }

    .event-activity-pulse__text {
        font-size: 0.78rem;
    }

    .event-activity-pulse__cta {
        padding: 0.5rem 0.75rem;
    }

    .event-activity-pulse__cta-text {
        font-size: 0.78rem;
    }
}

@media (max-width: 380px) {
    .event-activity-pulse__count {
        display: none;
    }
}
