/* Tohed Members — Bookmark Button (Icon Only) */

button.tm-bookmark-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    padding: 0;

    border: none;
    border-radius: 8px;

    cursor: pointer;
    position: relative;

    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);

    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;

    box-sizing: border-box;
}

button.tm-bookmark-icon-btn i {
    font-size: 20px;
    color: #FFB300 !important; /* Gold/Amber - bookmark color — !important to beat parent inheritance */
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(255, 179, 0, 0.5));
}

button.tm-bookmark-icon-btn:hover {
    background: rgba(255, 179, 0, 0.15);
    transform: translateY(-2px) scale(1.05);
}

button.tm-bookmark-icon-btn:hover i {
    color: #FFC107 !important;
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.7));
    transform: scale(1.1);
}

button.tm-bookmark-icon-btn:active {
    transform: translateY(0) scale(1);
}

/* Guest State - Muted Gray */
button.tm-bookmark-icon-btn.is-guest i {
    color: #B0BEC5 !important;
    filter: drop-shadow(0 0 2px rgba(176, 190, 197, 0.2));
}

button.tm-bookmark-icon-btn.is-guest:hover {
    background: rgba(176, 190, 197, 0.12);
}

button.tm-bookmark-icon-btn.is-guest:hover i {
    color: #CFD8DC !important;
}

/* Saving State - Spinning Animation */
button.tm-bookmark-icon-btn.is-saving {
    cursor: wait;
    pointer-events: none;
}

button.tm-bookmark-icon-btn.is-saving i {
    color: #FFC107 !important;
    animation: bookmarkSpin 1s linear infinite;
    filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.6));
}

@keyframes bookmarkSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Saved State - Solid Gold with Pulse */
button.tm-bookmark-icon-btn.is-saved i {
    font-weight: 900; /* Switch from regular (outline) to solid (filled) */
    color: #FFB300 !important;
    filter: drop-shadow(0 0 6px rgba(255, 179, 0, 0.6));
    animation: bookmarkPulse 2s ease-in-out infinite;
}

button.tm-bookmark-icon-btn.is-saved:hover {
    background: rgba(255, 179, 0, 0.15);
}

button.tm-bookmark-icon-btn.is-saved:hover i {
    color: #FFC107 !important;
    filter: drop-shadow(0 0 10px rgba(255, 193, 7, 0.7));
}

@keyframes bookmarkPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Fail State - Red Error */
button.tm-bookmark-icon-btn.is-fail i {
    color: #EF5350 !important;
    filter: drop-shadow(0 0 6px rgba(239, 83, 80, 0.6));
    animation: bookmarkShake 0.5s ease-in-out;
}

@keyframes bookmarkShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(3px); }
    75% { transform: translateX(-3px); }
}

/* Tooltip */
button.tm-bookmark-icon-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);

    background: rgba(0, 0, 0, 0.9);
    color: #fff !important;

    padding: 6px 12px;
    border-radius: 6px;

    font-size: 0.85rem;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

button.tm-bookmark-icon-btn:hover::before {
    opacity: 1;
}

/* Mobile */
@media (max-width: 600px) {
    button.tm-bookmark-icon-btn {
        width: 36px;
        height: 36px;
    }

    button.tm-bookmark-icon-btn i {
        font-size: 18px;
    }
}
