/**
 * Favorite Button Component Styles
 *
 * Provides consistent heart button styling across the app.
 * Supports multiple sizes, labeled/icon-only variants, and hover-only visibility.
 */

/* ============================================
   BASE BUTTON STYLES
   ============================================ */

.fav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-tertiary, #888);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    flex-shrink: 0;
}

.fav-btn:hover {
    color: var(--text-secondary, #aaa);
}

.fav-btn:active {
    transform: scale(0.92);
}

/* Active (favorited) state */
.fav-btn--active {
    color: #ff4d6d;
}

.fav-btn--active:hover {
    color: #ff6b84;
}

/* ============================================
   SIZE VARIANTS
   ============================================ */

/* Small - 20px (inline with text) */
.fav-btn--small {
    width: 20px;
    height: 20px;
}

.fav-btn--small .fav-btn__icon {
    width: 16px;
    height: 16px;
}

/* Medium - 28px (default, matches action menu style) */
.fav-btn--medium {
    width: 28px;
    height: 28px;
}

.fav-btn--medium .fav-btn__icon {
    width: 18px;
    height: 18px;
}

/* Large - 32px (card overlays) */
.fav-btn--large {
    width: 32px;
    height: 32px;
}

.fav-btn--large .fav-btn__icon {
    width: 20px;
    height: 20px;
}

/* ============================================
   LABELED VARIANT
   ============================================ */

.fav-btn--labeled {
    width: auto;
    height: auto;
    padding: 6px 12px;
    border-radius: var(--radius-lg, 12px);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 500;
}

.fav-btn--labeled:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.fav-btn--labeled.fav-btn--active {
    background: rgba(255, 77, 109, 0.15);
    border-color: rgba(255, 77, 109, 0.3);
}

.fav-btn--labeled.fav-btn--active:hover {
    background: rgba(255, 77, 109, 0.25);
    border-color: rgba(255, 77, 109, 0.5);
}

.fav-btn__label {
    color: inherit;
    white-space: nowrap;
}

/* ============================================
   HOVER-ONLY VISIBILITY
   ============================================ */

.fav-btn--hover-only {
    opacity: 0;
}

/* Show on parent hover */
*:hover > .fav-btn--hover-only,
.fav-btn--hover-only:focus,
.fav-btn--hover-only.fav-btn--active {
    opacity: 1;
}

/* Always visible on mobile */
@media (hover: none) {
    .fav-btn--hover-only {
        opacity: 0.7;
    }

    .fav-btn--hover-only.fav-btn--active {
        opacity: 1;
    }
}

/* ============================================
   PULSE ANIMATION
   ============================================ */

@keyframes fav-btn-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.fav-btn--pulse {
    animation: fav-btn-pulse 0.3s ease-in-out;
}

/* ============================================
   ICON STYLES
   ============================================ */

.fav-btn__icon {
    display: block;
    flex-shrink: 0;
    transition: fill 0.15s ease;
}

/* ============================================
   CONTEXTUAL ADJUSTMENTS
   ============================================ */

/* When inside a dark card/row */
.fav-btn--card-overlay {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: white;
}

.fav-btn--card-overlay:hover {
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.fav-btn--card-overlay.fav-btn--active {
    background: rgba(255, 255, 255, 0.9);
    color: #ff4d6d;
}

/* Inline with text (artist name, venue name) */
.fav-btn--inline {
    vertical-align: middle;
    margin-left: 6px;
}
