/* ============================================================================
   FORTRADERS FLOATING BOOKMARKS STYLES
   ============================================================================ */

/* Floating bookmarks container */
.bookmarks-floating-container {
    position: absolute;
    top: 10px; /* Distance from navbar bottom */
    right: 20px; /* Right side positioning */
    left: auto;
    z-index: 1000;
    display: none;
    max-width: calc(100vw - 40px);
    pointer-events: none;
}

.bookmarks-floating-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

/* Floating bookmark item - styled like designv2-social-btn */
.bookmark-floating-item {
    position: relative;
    background: #ffc107;
    border: 1px solid #ffc107;
    border-radius: 3px;
    padding: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
}

.bookmark-floating-item:hover {
    background: #ffb300;
    border-color: #ffb300;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.bookmark-floating-link {
    color: #000;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.bookmark-floating-link:hover {
    color: #000;
    text-decoration: none;
}

.bookmark-floating-link svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

/* Tooltip for floating bookmarks */
.bookmark-floating-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 3px;
    max-width: 180px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

.bookmark-floating-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid transparent;
    border-bottom-color: #333;
}

.bookmark-floating-item:hover .bookmark-floating-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Remove button for floating bookmarks */
.bookmark-floating-remove {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #dc3545;
    color: white;
    border: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    font-size: 6px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1002;
}

.bookmark-floating-item:hover .bookmark-floating-remove {
    opacity: 1;
}

.bookmark-floating-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Animations */
.bookmark-floating-item.removing {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .bookmarks-floating-container {
        top: 70px;
        max-width: 95vw;
    }
    
    .bookmarks-floating-list {
        gap: 6px;
    }
    
    .bookmark-floating-item {
        min-width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .bookmark-floating-link svg {
        width: 14px;
        height: 14px;
    }
    
    .bookmark-floating-tooltip {
        font-size: 10px;
        padding: 4px 8px;
        max-width: 200px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bookmark-floating-item {
        background: #ffc107;
        border-color: #ffc107;
    }
    
    .bookmark-floating-item:hover {
        background: #ffb300;
        border-color: #ffb300;
    }
    
    .bookmark-floating-link {
        color: #000;
    }
}

/* Animation for appearing */
.bookmarks-floating-container {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   MAIN BOOKMARKS CONTAINER STYLES
   ============================================================================ */

/* Main bookmarks container */
.bookmarks-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin: 10px 0;
    padding: 15px;
    display: none;
    transition: all 0.3s ease;
}

.bookmarks-container.has-bookmarks {
    display: block;
}

.bookmarks-wrapper {
    position: relative;
}

.bookmarks-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#bookmarks-count {
    font-size: 14px;
    color: #666;
    font-weight: normal;
}

.bookmarks-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.bookmark-item {
    position: relative;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.bookmark-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bookmark-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bookmark-link:hover {
    color: #007bff;
    text-decoration: none;
}

.bookmark-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-bottom: 5px;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}

.bookmark-item:hover .bookmark-tooltip {
    opacity: 1;
    visibility: visible;
}

.bookmark-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bookmark-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.bookmarks-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.bookmarks-clear {
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.bookmarks-clear:hover {
    background: #5a6268;
}

/* Responsive design */
@media (max-width: 768px) {
    .bookmarks-container {
        margin: 5px 0;
        padding: 10px;
    }
    
    .bookmark-item {
        max-width: 100%;
        flex: 1;
        min-width: 0;
    }
    
    .bookmarks-list {
        flex-direction: column;
    }
}