/**
 * Interaction Buttons CSS
 * Apple-inspired design system
 * See docs/INTERACTIONS.md for full UX specification
 * 
 * Font Awesome icons only. Order: Like → Bookmark → Follow → Share → | → Report
 */

/* ============================================
   BASE INTERACTION BUTTON
   Apple-inspired: clean, minimal, responsive
   ============================================ */
.interaction-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-width: 40px;
    min-height: 40px;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--bs-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    
    /* Apple-style smooth transitions */
    transition: 
        color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
        background-color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1),
        opacity 0.2s ease;
}

/* Hover state - subtle background */
.interaction-btn:hover {
    background-color: rgba(var(--bs-body-color-rgb), 0.05);
    color: var(--bs-body-color);
}

/* Active/pressed state - scale down like iOS */
.interaction-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
}

/* Focus state - accessibility */
.interaction-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.25);
}

/* Loading state */
.interaction-btn--loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   ICON STYLING
   ============================================ */
.interaction-btn i {
    font-size: 1.125rem; /* 18px */
    line-height: 1;
    transition: 
        color 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Card/compact mode - smaller icons */
.interaction-bar-card .interaction-btn i,
.interaction-bar-compact .interaction-btn i {
    font-size: 1rem; /* 16px */
}

/* ============================================
   ACTIVE STATES - Per Interaction Type
   ============================================ */

/* Like - Red heart */
.interaction-btn-like.active {
    color: var(--bs-danger);
}
.interaction-btn-like.active i {
    color: var(--bs-danger);
}
.interaction-btn-like:hover:not(.active) i {
    color: var(--bs-danger);
    opacity: 0.7;
}

/* Bookmark/Favorite - Warning/Gold */
.interaction-btn-favorite.active {
    color: var(--bs-warning);
}
.interaction-btn-favorite.active i {
    color: var(--bs-warning);
}
.interaction-btn-favorite:hover:not(.active) i {
    color: var(--bs-warning);
    opacity: 0.7;
}

/* Follow/Watchlist - Primary/Blue */
.interaction-btn-follow.active,
.interaction-btn-watchlist.active {
    color: var(--bs-primary);
}
.interaction-btn-follow.active i,
.interaction-btn-watchlist.active i {
    color: var(--bs-primary);
}
.interaction-btn-follow:hover:not(.active) i,
.interaction-btn-watchlist:hover:not(.active) i {
    color: var(--bs-primary);
    opacity: 0.7;
}

/* Share button - no toggle state */
.interaction-btn-share:hover {
    color: var(--bs-primary);
}
.interaction-btn-share:hover i {
    color: var(--bs-primary);
}

/* Report button - danger on hover only */
.interaction-btn-report:hover {
    color: var(--bs-danger);
    background-color: rgba(var(--bs-danger-rgb), 0.1);
}
.interaction-btn-report:hover i {
    color: var(--bs-danger);
}

/* ============================================
   INTERACTION BAR LAYOUT
   ============================================ */
.interaction-bar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

/* Divider before Report button */
.interaction-bar-divider {
    width: 1px;
    height: 1.25rem;
    background-color: var(--bs-border-color);
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* ============================================
   LABELS AND COUNTS
   ============================================ */
.interaction-label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.interaction-count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-secondary);
    min-width: 1ch;
}

/* ============================================
   DETAIL PAGE VARIANT
   Show labels, more spacing
   ============================================ */
.interaction-bar-detail {
    gap: 0.5rem;
}

.interaction-bar-detail .interaction-btn {
    padding: 0.5rem 1rem;
}

.interaction-bar-detail .interaction-label {
    display: inline !important;
}

/* ============================================
   CARD/COMPACT VARIANT
   Icon only, tighter spacing
   ============================================ */
.interaction-bar-card .interaction-btn,
.interaction-bar-compact .interaction-btn {
    padding: 0.375rem 0.5rem;
    min-width: 36px;
    min-height: 36px;
}

.interaction-bar-card .interaction-label,
.interaction-bar-compact .interaction-label {
    display: none !important;
}

/* ============================================
   MOBILE RESPONSIVE
   Larger tap targets per Apple HIG (44x44)
   ============================================ */
@media (max-width: 767.98px) {
    .interaction-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.625rem;
    }
    
    /* Hide labels on mobile, accessible via aria-label/title */
    .interaction-label {
        display: none !important;
    }
    
    .interaction-bar {
        gap: 0.125rem;
    }
}

/* ============================================
   DROPDOWN MENU VARIANT
   Interaction buttons inside overflow menus
   ============================================ */
.dropdown-menu .interaction-btn {
    display: flex;
    width: 100%;
    min-width: unset;
    min-height: unset;
    padding: 0.25rem 1rem;
    border-radius: 0;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 400;
    text-align: left;
    justify-content: flex-start;
}

.dropdown-menu .interaction-btn:hover {
    background-color: var(--bs-dropdown-link-hover-bg);
}

.dropdown-menu .interaction-btn.active {
    color: var(--bs-dropdown-link-color);
}

.dropdown-menu .interaction-btn i {
    font-size: 0.875rem;
    width: 1.25rem;
    text-align: center;
}

/* ============================================
   ANIMATIONS
   Apple-style spring animations
   ============================================ */
@keyframes interaction-pop {
    0% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.3); 
    }
    100% { 
        transform: scale(1); 
    }
}

@keyframes interaction-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Pop animation on activation */
.interaction-btn.active i {
    animation: interaction-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Bell shake for follow/watch */
.interaction-btn-follow.active i,
.interaction-btn-watchlist.active i {
    animation: interaction-shake 0.4s ease-in-out;
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */
@media (prefers-color-scheme: dark) {
    .interaction-btn:hover {
        background-color: rgba(255, 255, 255, 0.08);
    }
    
    .interaction-bar-divider {
        background-color: rgba(255, 255, 255, 0.15);
    }
}
